From 87c9f744f10d084150b20c5fae1cc65a115bd000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com> Date: Tue, 22 Jun 2021 10:08:04 +0200 Subject: [PATCH] elections2021: Menu for downloads --- elections2021/models.py | 8 ++++++++ elections2021/templates/elections2021/base.html | 3 +++ 2 files changed, 11 insertions(+) diff --git a/elections2021/models.py b/elections2021/models.py index 378fce47..03b0d3fd 100644 --- a/elections2021/models.py +++ b/elections2021/models.py @@ -140,6 +140,8 @@ class MenuItemBlock(blocks.StructBlock): "elections2021.Elections2021TextPage", "elections2021.Elections2021StrategicListPage", "elections2021.Elections2021StrategicPage", + "elections2021.Elections2021MythsPage", + "elections2021.Elections2021DownloadsPage", ], ) @@ -163,6 +165,8 @@ class SlideBlock(blocks.StructBlock): "elections2021.Elections2021TextPage", "elections2021.Elections2021StrategicListPage", "elections2021.Elections2021StrategicPage", + "elections2021.Elections2021MythsPage", + "elections2021.Elections2021DownloadsPage", ], required=False, ) @@ -340,6 +344,10 @@ class Elections2021HomePage(MetadataPageMixin, RoutablePageMixin, Page): def strategic_list_page_url(self): return get_subpage_url(self, Elections2021StrategicListPage) + @cached_property + def downloads_page_url(self): + return get_subpage_url(self, Elections2021DownloadsPage) + @cached_property def gdpr_and_cookies_url(self): if self.gdpr_and_cookies_page: diff --git a/elections2021/templates/elections2021/base.html b/elections2021/templates/elections2021/base.html index 4ef1eba6..4c198920 100644 --- a/elections2021/templates/elections2021/base.html +++ b/elections2021/templates/elections2021/base.html @@ -87,6 +87,9 @@ <a href="{{ page.root_page.strategic_list_page_url }}" class="navbar-menu__link">Strategické dokumenty</a> </li> {% endcomment %} + <li class="navbar-menu__item"> + <a href="{{ page.root_page.downloads_page_url }}" class="navbar-menu__link">Ke stažení</a> + </li> </ul> </div> <div class="navbar__actions navbar__section lg:container-padding--auto self-start flex flex-col sm:flex-row lg:flex-col sm:space-x-4 space-y-2 sm:space-y-0 lg:space-y-2 xl:flex-row xl:space-x-2 xl:space-y-0 h-full justify-center"> -- GitLab