Skip to content

Commit e2e9906

Browse files
committed
✨ add pagination to pub base
1 parent 2523360 commit e2e9906

File tree

6 files changed

+105
-107
lines changed

6 files changed

+105
-107
lines changed

fragdenstaat_de/fds_blog/locale/de/LC_MESSAGES/django.po

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: fragdenstaat.defds_blog\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-10-09 09:17-0500\n"
10+
"POT-Creation-Date: 2023-11-20 11:44-0600\n"
1111
"PO-Revision-Date: 2023-06-28 10:59+0200\n"
1212
"Last-Translator: Stefan Wehrmeyer <[email protected]>\n"
1313
"Language-Team: \n"
@@ -135,7 +135,7 @@ msgstr "Details-Box"
135135
msgid "Infotextbox Box"
136136
msgstr "Infotextbox-Box"
137137

138-
#: fragdenstaat_de/fds_blog/cms_toolbars.py
138+
#: fragdenstaat_de/fds_blog/cms_toolbars.py fragdenstaat_de/fds_blog/views.py
139139
msgid "Blog"
140140
msgstr "Blog"
141141

@@ -434,6 +434,7 @@ msgid "Read article"
434434
msgstr "Artikel lesen"
435435

436436
#: fragdenstaat_de/fds_blog/templates/fds_blog/article_list.html
437+
#: fragdenstaat_de/fds_blog/views.py
437438
msgid "Archive"
438439
msgstr "Archiv"
439440

fragdenstaat_de/fds_cms/locale/de/LC_MESSAGES/django.po

+42-40
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-06-28 02:30-0500\n"
10+
"POT-Creation-Date: 2023-11-20 11:44-0600\n"
1111
"PO-Revision-Date: 2023-06-28 11:06+0200\n"
1212
"Last-Translator: Stefan Wehrmeyer <[email protected]>\n"
1313
"Language-Team: \n"
@@ -553,33 +553,6 @@ msgstr ""
553553
msgid "Banner is dark-themed, button should therefore be light"
554554
msgstr ""
555555

556-
#: fragdenstaat_de/fds_cms/templates/cms/help_base.html
557-
msgid "Support area: FragDenStaat and Freedom of Information"
558-
msgstr "Hilfebereich: FragDenStaat und Informationsfreiheit"
559-
560-
#: fragdenstaat_de/fds_cms/templates/cms/help_base.html
561-
msgid ""
562-
"Support area: FragDenStaat and <abbr title=\"Freedom of Information\">FOI</"
563-
"abbr>"
564-
msgstr ""
565-
"Hilfebereich: FragDenStaat und <abbr "
566-
"title=\"Informationsfreiheitsgesetz\">IFG</abbr>"
567-
568-
#: fragdenstaat_de/fds_cms/templates/cms/help_base.html
569-
msgid "Support area"
570-
msgstr "Hilfebereich"
571-
572-
#. Translators: Search as noun
573-
#: fragdenstaat_de/fds_cms/templates/cms/help_base.html
574-
#: fragdenstaat_de/fds_cms/templates/cms/pub_base.html
575-
#: fragdenstaat_de/fds_cms/templates/fds_cms/search.html
576-
msgid "Search"
577-
msgstr "Suchen"
578-
579-
#: fragdenstaat_de/fds_cms/templates/cms/help_base.html
580-
msgid "Support"
581-
msgstr "Hilfe"
582-
583556
#: fragdenstaat_de/fds_cms/templates/cms/help_base.html
584557
msgid "Topics"
585558
msgstr "Themen"
@@ -593,17 +566,32 @@ msgid "Read more"
593566
msgstr "Weiterlesen"
594567

595568
#: fragdenstaat_de/fds_cms/templates/cms/pub_base.html
596-
msgid "Toggle chapter navigation"
597-
msgstr "Kapitel-Navigation umschalten"
569+
msgid "In this chapter:"
570+
msgstr "In diesem Kapitel:"
598571

599572
#: fragdenstaat_de/fds_cms/templates/cms/pub_base.html
600-
msgid "Chapters"
601-
msgstr "Kapitel"
573+
msgid "Chapter overview:"
574+
msgstr "Kapitelübersicht:"
602575

603576
#: fragdenstaat_de/fds_cms/templates/fds_cms/feedback.html
604577
msgid "Submit"
605578
msgstr "Abschicken"
606579

580+
#: fragdenstaat_de/fds_cms/templates/fds_cms/pagination.html
581+
#: fragdenstaat_de/fds_cms/templates/fds_cms/slider.html
582+
msgid "Previous"
583+
msgstr "Zurück"
584+
585+
#: fragdenstaat_de/fds_cms/templates/fds_cms/pagination.html
586+
#: fragdenstaat_de/fds_cms/templates/fds_cms/slider.html
587+
msgid "Next"
588+
msgstr "Weiter"
589+
590+
#. Translators: Search as noun
591+
#: fragdenstaat_de/fds_cms/templates/fds_cms/search.html
592+
msgid "Search"
593+
msgstr "Suchen"
594+
607595
#: fragdenstaat_de/fds_cms/templates/fds_cms/search.html
608596
#, python-format
609597
msgid "Search in %(title)s"
@@ -622,21 +610,35 @@ msgstr "Keine Ergebnisse gefunden."
622610
msgid "Please enter a search term."
623611
msgstr "Bitte geben Sie einen Suchbegriff ein."
624612

625-
#: fragdenstaat_de/fds_cms/templates/fds_cms/slider.html
626-
msgid "Previous"
627-
msgstr "Zurück"
628-
629-
#: fragdenstaat_de/fds_cms/templates/fds_cms/slider.html
630-
msgid "Next"
631-
msgstr "Weiter"
632-
633613
#: fragdenstaat_de/fds_cms/templates/fds_cms/social_meta.html
634614
#, python-format
635615
msgid ""
636616
"%(site)s helps you to make freedom of information requests to public bodies"
637617
msgstr ""
638618
"%(site)s hilft Ihnen Informationsfreiheitsanfragen an Behörden zu stellen"
639619

620+
#~ msgid "Support area: FragDenStaat and Freedom of Information"
621+
#~ msgstr "Hilfebereich: FragDenStaat und Informationsfreiheit"
622+
623+
#~ msgid ""
624+
#~ "Support area: FragDenStaat and <abbr title=\"Freedom of Information"
625+
#~ "\">FOI</abbr>"
626+
#~ msgstr ""
627+
#~ "Hilfebereich: FragDenStaat und <abbr title=\"Informationsfreiheitsgesetz"
628+
#~ "\">IFG</abbr>"
629+
630+
#~ msgid "Support area"
631+
#~ msgstr "Hilfebereich"
632+
633+
#~ msgid "Support"
634+
#~ msgstr "Hilfe"
635+
636+
#~ msgid "Toggle chapter navigation"
637+
#~ msgstr "Kapitel-Navigation umschalten"
638+
639+
#~ msgid "Chapters"
640+
#~ msgstr "Kapitel"
641+
640642
#~ msgid "Help pages"
641643
#~ msgstr "Hilfebereich"
642644

fragdenstaat_de/fds_cms/templates/cms/help_base.html

+1-25
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{% load i18n %}
33
{% load cms_tags %}
44
{% load menu_tags %}
5-
{% load cms_pagination %}
65
{% block body %}
76
{% page_url 'help' as help_url %}
87
<div class="app">
@@ -11,30 +10,7 @@
1110
<div class="col-md-8 order-md-last mt-3 mb-3">
1211
{% block app_body %}
1312
{% placeholder "content" %}
14-
{% get_previous_next_pages request.current_page as pagination %}
15-
{% if pagination.next or pagination.previous and request.page.level %}
16-
<nav class="d-flex gap-3">
17-
{% if pagination.previous %}
18-
<div href="{{ pagination.previous.get_absolute_url }}"
19-
class="card position-relative w-100">
20-
<div class="card-body">
21-
<div class="small text-muted mb-1">{% trans "Previous" %}:</div>
22-
<a href="{{ pagination.previous.get_absolute_url }}"
23-
class="stretched-link">{{ pagination.previous.get_menu_title }}</a>
24-
</div>
25-
</div>
26-
{% endif %}
27-
{% if pagination.next %}
28-
<div href="{{ pagination.next.get_absolute_url }}"
29-
class="card position-relative w-100">
30-
<div class="card-body text-end">
31-
<div class="small text-muted mb-1">{% trans "Next" %}:</div>
32-
<a href="{{ pagination.next.get_absolute_url }}" class="stretched-link">{{ pagination.next.get_menu_title }}</a>
33-
</div>
34-
</div>
35-
{% endif %}
36-
</nav>
37-
{% endif %}
13+
{% include "fds_cms/pagination.html" %}
3814
{% endblock %}
3915
</div>
4016
<nav class="col-md-4 order-md-first mb-3 mt-3">
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,39 @@
11
{% extends "cms/page_breadcrumb.html" %}
2-
32
{% load i18n %}
43
{% load cms_tags %}
54
{% load menu_tags %}
65
{% load fds_cms_tags %}
76
{% block body %}
8-
{% page_url request.current_page|get_soft_root as base_url %}
9-
{% page_attribute "page_title" request.current_page|get_soft_root as base_title %}
10-
11-
<div class="app container-md-full">
12-
<div class="row">
13-
<div class="col-md-8 col-xl-6 offset-xl-1 mt-3 mb-3 order-md-last">
14-
<div id="content" class="container">
15-
{% block app_body %}
16-
{% placeholder "content" %}
17-
{% endblock app_body %}
18-
</div>
19-
</div>
20-
21-
{% if not request.current_page.soft_root and request.current_page.in_navigation %}
22-
<div class="col col-md-4 col-xl-3">
23-
<div class="sticky-top z-2 pt-md-1 small">
24-
<div class="bg-blue-100 p-3 tight-margin">
25-
<p class="text-muted">{% trans "In this chapter:" %}</p>
26-
<div id="toc" class="toc"></div>
27-
</div>
28-
29-
<div class="bg-body-tertiary p-3 tight-margin mt-3">
30-
<p class="text-muted">{% trans "Chapter overview:" %}</p>
31-
32-
<ol class="overflow-auto m-0" style="max-height: 50vh">
33-
{% show_menu 1 100 0 1 %}
34-
</ol>
35-
</div>
7+
{% page_url request.current_page|get_soft_root as base_url %}
8+
{% page_attribute "page_title" request.current_page|get_soft_root as base_title %}
9+
<div class="app container-md-full">
10+
<div class="row">
11+
<div class="col-md-8 col-xl-6 offset-xl-1 mt-3 mb-3 order-md-last">
12+
<div id="content" class="container">
13+
{% block app_body %}
14+
{% placeholder "content" %}
15+
{% endblock app_body %}
16+
</div>
17+
{% include "fds_cms/pagination.html" with min_level=-1 %}
3618
</div>
37-
</div>
38-
{% endif %}
39-
</div>
40-
41-
</div>
42-
43-
{% static_placeholder "book_pub_footer" %}
44-
45-
{% include "_frontend.html" with entry_point="bookpub.js" %}
19+
{% if not request.current_page.soft_root and request.current_page.in_navigation %}
20+
<div class="col col-md-4 col-xl-3">
21+
<div class="sticky-top z-2 pt-md-1 small">
22+
<div class="bg-blue-100 p-3 tight-margin">
23+
<p class="text-muted">{% trans "In this chapter:" %}</p>
24+
<div id="toc" class="toc"></div>
25+
</div>
26+
<div class="bg-body-tertiary p-3 tight-margin mt-3">
27+
<p class="text-muted">{% trans "Chapter overview:" %}</p>
28+
<ol class="overflow-auto m-0" style="max-height: 50vh">
29+
{% show_menu 1 100 0 1 %}
30+
</ol>
31+
</div>
32+
</div>
33+
</div>
34+
{% endif %}
35+
</div>
36+
</div>
37+
{% static_placeholder "book_pub_footer" %}
38+
{% include "_frontend.html" with entry_point="bookpub.js" %}
4639
{% endblock body %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{% load i18n %}
2+
{% load cms_pagination %}
3+
{% get_previous_next_pages request.current_page as pagination %}
4+
{% if request.current_page.node.get_depth >= min_level|default:3 %}
5+
{% if pagination.next or pagination.previous %}
6+
<nav>
7+
<ul class="list-unstyled d-flex flex-column flex-md-row">
8+
{% if pagination.previous %}
9+
<li class="w-100">
10+
<div>
11+
<div class="small text-muted mb-1">{% trans "Previous" %}:</div>
12+
<a href="{{ pagination.previous.get_absolute_url }}">{{ pagination.previous.get_menu_title }}</a>
13+
</div>
14+
</li>
15+
{% endif %}
16+
{% if pagination.next %}
17+
<li class="w-100">
18+
<div class="text-end">
19+
<div class="small text-muted mb-1">{% trans "Next" %}:</div>
20+
<a href="{{ pagination.next.get_absolute_url }}">{{ pagination.next.get_menu_title }}</a>
21+
</div>
22+
</li>
23+
{% endif %}
24+
</ul>
25+
</nav>
26+
{% endif %}
27+
{% endif %}

fragdenstaat_de/locale/de/LC_MESSAGES/django.po

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2023-10-09 09:17-0500\n"
10+
"POT-Creation-Date: 2023-11-20 11:44-0600\n"
1111
"PO-Revision-Date: 2023-06-28 09:34+0200\n"
1212
"Last-Translator: Karl Engelhardt <[email protected]>\n"
1313
"Language-Team: German <https://weblate.frag-den-staat.de/projects/froide/"
@@ -752,7 +752,6 @@ msgstr "Organisationen"
752752
msgid "No organizations found."
753753
msgstr "Keine Organisation gefunden."
754754

755-
#. Translators: meta keywords
756755
#: fragdenstaat_de/templates/snippets/meta.html
757756
msgid ""
758757
"Freedom of Information Requests, Freedom of Information Law, Public Body "

0 commit comments

Comments
 (0)