From a34a8a4039bf193ebd4d0dd621ee65cb092af357 Mon Sep 17 00:00:00 2001 From: Mara Karagianni Date: Fri, 18 Aug 2023 22:59:05 +0300 Subject: [PATCH] templates: add history navigation in ideas/topics --- .../a4_candy_budgeting/proposal_list.html | 2 +- .../includes/map_filter_and_sort.html | 4 ++-- .../a4_candy_contrib/includes/pagination.html | 4 ++-- .../templates/a4_candy_contrib/item_detail.html | 15 ++++++++++++--- .../a4_candy_debate/subject_detail.html | 17 +++++++++++++---- .../templates/a4_candy_ideas/idea_list.html | 2 +- .../a4_candy_mapideas/mapidea_list.html | 2 +- .../a4_candy_topicprio/topic_detail.html | 15 ++++++++++++--- .../a4_candy_topicprio/topic_list.html | 2 +- changelog/7429.md | 13 +++++++++++++ 10 files changed, 58 insertions(+), 18 deletions(-) create mode 100644 changelog/7429.md diff --git a/apps/budgeting/templates/a4_candy_budgeting/proposal_list.html b/apps/budgeting/templates/a4_candy_budgeting/proposal_list.html index 3a3fd4e632..631a3e472d 100644 --- a/apps/budgeting/templates/a4_candy_budgeting/proposal_list.html +++ b/apps/budgeting/templates/a4_candy_budgeting/proposal_list.html @@ -20,7 +20,7 @@ {% endblock %} {% block phase_content %} -
+
{% include "a4_candy_contrib/includes/map_filter_and_sort.html" with filter=view.filter mode=view.mode %} diff --git a/apps/contrib/templates/a4_candy_contrib/includes/map_filter_and_sort.html b/apps/contrib/templates/a4_candy_contrib/includes/map_filter_and_sort.html index 0c5f03a1fb..69051bf343 100644 --- a/apps/contrib/templates/a4_candy_contrib/includes/map_filter_and_sort.html +++ b/apps/contrib/templates/a4_candy_contrib/includes/map_filter_and_sort.html @@ -3,13 +3,13 @@
{% if mode == 'map' %} {% combined_url_parameter request.GET mode='list' as url_par %} - + {% translate 'View' %} {% else %} {% combined_url_parameter request.GET mode='map' as url_par %} - + {% translate 'View' %} diff --git a/apps/contrib/templates/a4_candy_contrib/includes/pagination.html b/apps/contrib/templates/a4_candy_contrib/includes/pagination.html index c19c64c790..b41e79c7a3 100644 --- a/apps/contrib/templates/a4_candy_contrib/includes/pagination.html +++ b/apps/contrib/templates/a4_candy_contrib/includes/pagination.html @@ -6,7 +6,7 @@
  • {% if page_obj.has_previous %} {% combined_url_parameter request.GET page=page_obj.previous_page_number as url_par %} - {% translate 'Previous page' %} + {% translate 'Previous page' %} {% endif %}
  • @@ -16,7 +16,7 @@
  • {% if page_obj.has_next %} {% combined_url_parameter request.GET page=page_obj.next_page_number as url_par %} - {% translate 'Next page' %} + {% translate 'Next page' %} {% endif %}
  • diff --git a/apps/contrib/templates/a4_candy_contrib/item_detail.html b/apps/contrib/templates/a4_candy_contrib/item_detail.html index 51b3886801..ec0144b6d9 100644 --- a/apps/contrib/templates/a4_candy_contrib/item_detail.html +++ b/apps/contrib/templates/a4_candy_contrib/item_detail.html @@ -17,10 +17,19 @@ diff --git a/apps/debate/templates/a4_candy_debate/subject_detail.html b/apps/debate/templates/a4_candy_debate/subject_detail.html index 9747179e5c..232f7c3da7 100644 --- a/apps/debate/templates/a4_candy_debate/subject_detail.html +++ b/apps/debate/templates/a4_candy_debate/subject_detail.html @@ -17,10 +17,19 @@ diff --git a/apps/ideas/templates/a4_candy_ideas/idea_list.html b/apps/ideas/templates/a4_candy_ideas/idea_list.html index b272249c4e..857a837b86 100644 --- a/apps/ideas/templates/a4_candy_ideas/idea_list.html +++ b/apps/ideas/templates/a4_candy_ideas/idea_list.html @@ -11,7 +11,7 @@ {% endblock %} {% block phase_content %} -
    +
    {% include "a4_candy_contrib/includes/filter_and_sort.html" with filter=view.filter %} diff --git a/apps/mapideas/templates/a4_candy_mapideas/mapidea_list.html b/apps/mapideas/templates/a4_candy_mapideas/mapidea_list.html index 8045320f12..0fe196b03a 100644 --- a/apps/mapideas/templates/a4_candy_mapideas/mapidea_list.html +++ b/apps/mapideas/templates/a4_candy_mapideas/mapidea_list.html @@ -20,7 +20,7 @@ {% endblock %} {% block phase_content %} -
    +
    {% include "a4_candy_contrib/includes/map_filter_and_sort.html" with filter=view.filter mode=view.mode %} diff --git a/apps/topicprio/templates/a4_candy_topicprio/topic_detail.html b/apps/topicprio/templates/a4_candy_topicprio/topic_detail.html index 1ffa27812c..1efb923de9 100644 --- a/apps/topicprio/templates/a4_candy_topicprio/topic_detail.html +++ b/apps/topicprio/templates/a4_candy_topicprio/topic_detail.html @@ -8,10 +8,19 @@ diff --git a/apps/topicprio/templates/a4_candy_topicprio/topic_list.html b/apps/topicprio/templates/a4_candy_topicprio/topic_list.html index 71717c3f25..dfbea4a1fe 100644 --- a/apps/topicprio/templates/a4_candy_topicprio/topic_list.html +++ b/apps/topicprio/templates/a4_candy_topicprio/topic_list.html @@ -2,7 +2,7 @@ {% load i18n module_tags rules static maps_tags %} {% block phase_content %} -
    +
    {% include "a4_candy_contrib/includes/filter_and_sort.html" with filter=view.filter %} diff --git a/changelog/7429.md b/changelog/7429.md new file mode 100644 index 0000000000..dcab68928b --- /dev/null +++ b/changelog/7429.md @@ -0,0 +1,13 @@ +### Added + +- in contrib templates for item_detail: + request http referer for go back/overview to filtered/paginated list +- in topicprio templates for topic_detail: + request http referer for go back/overview to filtered/paginated list +- in budgeting, idea, mapidea, topicprio: + index id to be used with href anchor to navigate back to item list +- in contrib templates for map_filter_and_sort and pagination: + index id to be used with href anchor to navigate back to item list + + +