From af7a79494e7e0a7ec7797900c937ffb909ab6753 Mon Sep 17 00:00:00 2001 From: abc013 Date: Wed, 16 Aug 2023 15:28:18 +0200 Subject: [PATCH 1/8] Add page visibility side panel to information pages --- myhpi/core/templates/core/information_page.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/myhpi/core/templates/core/information_page.html b/myhpi/core/templates/core/information_page.html index bb77f44f..cfb240d2 100644 --- a/myhpi/core/templates/core/information_page.html +++ b/myhpi/core/templates/core/information_page.html @@ -29,6 +29,12 @@

{% translate "Last edited" %}

{{ page.last_edited_by }} {% endif %} + {% if perms.wagtail.edit_page %} + + {% endif %} - {% if perms.wagtail.edit_page %} - - {% endif %} - - {% if page.attachments.all %} - - {% endif %} + {% include "core/sidebar.html" %} diff --git a/myhpi/core/templates/core/minutes.html b/myhpi/core/templates/core/minutes.html index f1e4beea..14928ca7 100644 --- a/myhpi/core/templates/core/minutes.html +++ b/myhpi/core/templates/core/minutes.html @@ -8,69 +8,69 @@
{% with page.body|markdown as parsed_md %}
-

{{ page.title }}

+

{{ page.title }}

{{ parsed_md.0 }}
-

{% translate "Date" %}

-

{{ page.date }}

-

{% translate "Moderator" %}

-

{{ page.moderator.get_full_name }}

-

{% translate "Minutes taker" %}

-

{{ page.author.get_full_name }}

-

{% translate "Participants" %}

-
    - {% for participant in page.participants.all %} -
  • {{ participant.get_full_name }}
  • - {% endfor %} -
-

{% translate "Guests" %}

- {% if page.guests %} + + + + + + + {% include "core/sidebar.html" %}
-
-
- {% prev_minutes page as prev %} - {% if prev %} - < {% translate "Previous minutes" %} - {% endif %} -
-
- {% next_minutes page as next %} - {% if next %} - {% translate "Next minutes" %} > - {% endif %} -
+
+
+ {% prev_minutes page as prev %} + {% if prev %} + < {% translate "Previous minutes" %} + {% endif %} +
+
+ {% next_minutes page as next %} + {% if next %} + {% translate "Next minutes" %} > + {% endif %} +
+
{% endwith %}
{% endblock %} diff --git a/myhpi/core/templates/core/sidebar.html b/myhpi/core/templates/core/sidebar.html new file mode 100644 index 00000000..d3341c35 --- /dev/null +++ b/myhpi/core/templates/core/sidebar.html @@ -0,0 +1,25 @@ +{% load core_extras %} +{% load i18n %} + +{% if perms.wagtail.edit_page %} + +{% endif %} + +{% if page.attachments.all %} + +{% endif %} \ No newline at end of file From 912282bb7ce66955ac273b93f64ccac035e3466f Mon Sep 17 00:00:00 2001 From: abc013 Date: Wed, 16 Aug 2023 17:03:50 +0200 Subject: [PATCH 3/8] Also consider empty dates and authors in the sidebar panel --- .../core/templates/core/information_page.html | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/myhpi/core/templates/core/information_page.html b/myhpi/core/templates/core/information_page.html index 1d3d4d36..823da25a 100644 --- a/myhpi/core/templates/core/information_page.html +++ b/myhpi/core/templates/core/information_page.html @@ -18,14 +18,18 @@

From 82fee23a35380b6c8fda6d2af78cab664765a36e Mon Sep 17 00:00:00 2001 From: abc013 Date: Wed, 20 Dec 2023 18:01:23 +0100 Subject: [PATCH 4/8] Rename toc-title to side-panel-title --- .../core/templates/core/information_page.html | 2 +- myhpi/core/templates/core/minutes.html | 12 +++++----- myhpi/core/templates/core/sidebar.html | 6 ++--- myhpi/static/scss/myHPI.scss | 22 +++++++++---------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/myhpi/core/templates/core/information_page.html b/myhpi/core/templates/core/information_page.html index 823da25a..f2257080 100644 --- a/myhpi/core/templates/core/information_page.html +++ b/myhpi/core/templates/core/information_page.html @@ -17,7 +17,7 @@

+ {% if not page.live %} + + {% endif %}
+ {% if not page.live %} + + {% endif %}
- {% if not page.live %} - - {% endif %}
- {% if not page.live %} - - {% endif %}