0.4.27 footer contacts

This commit is contained in:
SDE
2023-12-22 17:49:09 +05:00
parent f98873c996
commit 91975e0891
2 changed files with 11 additions and 3 deletions

View File

@@ -217,12 +217,12 @@ class Admin_Option(Admin_Trans_BaseModel):
(_('Контент'), {
'classes': ['wide'],
'fields': (
'name', 'opt_type', 'prefix', 'value', 'picture'
'name', 'opt_type', 'order', 'prefix', 'value', 'picture'
)
}),
]
list_display = ['image_thumb', 'opt_type', 'name', 'prefix', 'value']
list_display = ['image_thumb', 'opt_type', 'name', 'order', 'value', 'prefix']
list_editable = ['value', 'prefix']
list_filter = ['opt_type']

View File

@@ -5,6 +5,13 @@ def get_logo_url():
theme = get_admin_interface_theme()
return theme.logo.url
def get_footer_contacts():
from .models import Option
options = Option.objects.footer(enable=True, opt_type='footer_contacts')
return options
def get_inter_Dict(user, context_Dict):
form_name = None
@@ -36,7 +43,8 @@ def get_inter_Dict(user, context_Dict):
Dict.update({
'sections': sections,
'logo': get_logo_url(),
'hide_form_field_description': hide_form_field_description
'hide_form_field_description': hide_form_field_description,
'footer_contacts': get_footer_contacts(),
})
# from SubscribesApp.funcs import get_cur_user_subscribe
# user_subscribe = get_cur_user_subscribe(user)