From 3729e7f92a69e12406aab789c6168d07f0dda697 Mon Sep 17 00:00:00 2001 From: OndraRehounek <ondra.rehounek@seznam.cz> Date: Mon, 12 Sep 2022 14:25:24 +0200 Subject: [PATCH] main: Fix missing SEO tab --- main/models.py | 4 +++- main/templates/main/base.html | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/main/models.py b/main/models.py index 128f3e5c..4a58027f 100644 --- a/main/models.py +++ b/main/models.py @@ -1,4 +1,3 @@ -from datetime import timedelta from functools import cached_property from dateutil.relativedelta import relativedelta @@ -131,6 +130,8 @@ class MainHomePage( FieldPanel("footer_person_list"), ] + promote_panels = make_promote_panels(admin_help.build(admin_help.IMPORTANT_TITLE)) + settings_panels = [ FieldPanel("contact_newcomers"), PageChooserPanel("gdpr_and_cookies_page"), @@ -145,6 +146,7 @@ class MainHomePage( edit_handler = TabbedInterface( [ ObjectList(content_panels, heading="Obsah"), + ObjectList(promote_panels, heading="Propagovat"), ObjectList(settings_panels, heading="Nastavení"), ObjectList(MenuMixin.menu_panels, heading="Menu"), ] diff --git a/main/templates/main/base.html b/main/templates/main/base.html index 45f89e64..9d621693 100644 --- a/main/templates/main/base.html +++ b/main/templates/main/base.html @@ -2,25 +2,25 @@ <!doctype html> <html lang="cs"> <head> - <!-- Meta --> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width"/> - {% meta_tags %} - {% if settings.MAJAK_ENV == "test" %} - <meta name="robots" content="noindex, nofollow"> - {% endif %} + <!-- Meta --> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width"/> + {% meta_tags %} + {% if settings.MAJAK_ENV == "test" %} + <meta name="robots" content="noindex, nofollow"> + {% endif %} - <!-- Favicon --> - {% include "shared/favicon_snippet.html" %} + <!-- Favicon --> + {% include "shared/favicon_snippet.html" %} - <!-- Styles --> - <link rel="stylesheet" href="{% static 'main/css/styles.css' %}"> + <!-- Styles --> + <link rel="stylesheet" href="{% static 'main/css/styles.css' %}"> - {% block styles %}{% endblock styles %} + {% block styles %}{% endblock styles %} - {% if page.root_page.matomo_id %} - {% include "shared/matomo_snippet.html" with matomo_id=page.root_page.matomo_id %} - {% endif %} + {% if page.root_page.matomo_id %} + {% include "shared/matomo_snippet.html" with matomo_id=page.root_page.matomo_id %} + {% endif %} </head> <body> -- GitLab