diff --git a/ServicesApp/admin.py b/ServicesApp/admin.py index af095f2..fa3a8f0 100644 --- a/ServicesApp/admin.py +++ b/ServicesApp/admin.py @@ -51,7 +51,7 @@ class Admin_Section(SuperModelAdmin, Admin_Trans_BaseModelViewPage): 'classes': ['wide'], 'fields': ('name', 'url', - # 'title', + 'title', 'description', 'text', 'picture', 'order', diff --git a/ServicesApp/js_views.py b/ServicesApp/js_views.py index 1b8952b..680b933 100644 --- a/ServicesApp/js_views.py +++ b/ServicesApp/js_views.py @@ -51,7 +51,7 @@ def get_content_for_section_ajax(request): # els_footer_list = [one_list_el] # Dict = { - 'cur_section': section, + 'page': section, # 'sections': get_sections(), # 'services': services, } @@ -59,7 +59,7 @@ def get_content_for_section_ajax(request): from .funcs import get_section_views_Dict Dict.update(get_section_views_Dict(section)) - html = render_to_string('pages/content/c_blocks_constructor.html', Dict, request=request) + html = render_to_string('pages/content/c_section_content.html', Dict, request=request) res_Dict = { 'html': html, diff --git a/templates/pages/content/c_blocks_constructor.html b/templates/pages/content/c_blocks_constructor.html index eb97bf9..e6d6cdd 100644 --- a/templates/pages/content/c_blocks_constructor.html +++ b/templates/pages/content/c_blocks_constructor.html @@ -1,13 +1,13 @@ -{% include 'blocks/dynamic/b_sections_buttons.html' %} -{% if services_view_scheme == '3_cols_w_group' %} - {% include 'blocks/b_service.html' %} -{% elif services_view_scheme == '2_cols_wo_group' %} - {% include 'blocks/b_service_2_col.html' %} -{% endif %} +{#{% include 'blocks/dynamic/b_sections_buttons.html' %}#} +{#{% if services_view_scheme == '3_cols_w_group' %}#} +{# {% include 'blocks/b_service.html' %}#} +{#{% elif services_view_scheme == '2_cols_wo_group' %}#} +{# {% include 'blocks/b_service_2_col.html' %}#} +{#{% endif %}#} {#{% include 'blocks/b_how_with_us_working.html' %}#} -{% for block in cur_section.blocks.all %} +{% for block in page.blocks.all %} {% if block.block_type == 'photo150_n_title' %} {% include 'blocks/b_photo150_n_title.html' %} {% elif block.block_type == 'how_work' %} @@ -22,6 +22,6 @@ {% endfor %} -{% if cur_section.plugin_presentation.all %} - {% include 'blocks/b_3d_s_d.html' with block=cur_section.plugin_presentation.all.0 %} +{% if page.plugin_presentation.all %} + {% include 'blocks/b_3d_s_d.html' with block=page.plugin_presentation.all.0 %} {% endif %} diff --git a/templates/pages/content/c_section_content.html b/templates/pages/content/c_section_content.html new file mode 100644 index 0000000..afee3ec --- /dev/null +++ b/templates/pages/content/c_section_content.html @@ -0,0 +1,32 @@ +{% include 'blocks/dynamic/b_sections_buttons.html' %} + +{% if page.description %} +