Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar improvements #383

Merged
merged 8 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 14 additions & 25 deletions myhpi/core/templates/core/information_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,23 @@ <h1 class="page-title">
<div class="col-lg-3">
<div class="side-panel-container">
<aside class="side-panel border-accent">
<h1 class="toc-title">{% translate "Last edited" %}</h1>
{% get_current_timezone as TIMEZONE %}
<time id="last-published" datetime="{{ page.last_published_at|date:"c" }}" title="{{ TIMEZONE }}">
{% blocktranslate with date=page.last_published_at|date:"SHORT_DATE_FORMAT" time=page.last_published_at|time:"TIME_FORMAT" trimmed %}
{{ date }} at {{ time }}
{% endblocktranslate %}
</time>
{% if page.author_visible %}
{% translate "by" %}
<h1 class="side-panel-title">{% translate "Last edited" %}</h1>
{% if not page.last_published_at %}
{% translate "A long time ago" %}
{% else %}
{% get_current_timezone as TIMEZONE %}
<time id="last-published" datetime="{{ page.last_published_at|date:"c" }}" title="{{ TIMEZONE }}">
{% blocktranslate with date=page.last_published_at|date:"SHORT_DATE_FORMAT" time=page.last_published_at|time:"TIME_FORMAT" trimmed %}
{{ date }} at {{ time }}
{% endblocktranslate %}
</time>
{% endif %}
{% if page.author_visible and page.last_edited_by %}
<i>{% translate "by" %}</i>
{{ page.last_edited_by }}
{% endif %}
</aside>
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="toc-title">{% translate "Table of contents" %}</h1>
{{ parsed_md.1 }}
</aside>
{% if page.attachments.all %}
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="toc-title">{% translate "Attachments" %}</h1>
<ul>
{% for attachment in page.attachments.all %}
<li>
<a href="{{ attachment.url }}">{{ attachment.title }}</a>
</li>
{% endfor %}
</ul>
</aside>
{% endif %}
{% include "core/sidebar.html" %}
</div>
</div>
</div>
Expand Down
102 changes: 51 additions & 51 deletions myhpi/core/templates/core/minutes.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,69 +8,69 @@
<div class="row minutes-container">
{% with page.body|markdown as parsed_md %}
<div class="d-none d-print-block minutes-title">
<h1>{{ page.title }}</h1>
<h1>{{ page.title }}</h1>
</div>
<div class="col-9 minutes-text">
{{ parsed_md.0 }}
</div>
<div class="col-3 minutes-meta">
<h4>{% translate "Date" %}</h4>
<p>{{ page.date }}</p>
<h4>{% translate "Moderator" %}</h4>
<p>{{ page.moderator.get_full_name }}</p>
<h4>{% translate "Minutes taker" %}</h4>
<p>{{ page.author.get_full_name }}</p>
<h4>{% translate "Participants" %}</h4>
<ul>
{% for participant in page.participants.all %}
<li>{{ participant.get_full_name }}</li>
{% endfor %}
</ul>
<h4>{% translate "Guests" %}</h4>
{% if page.guests %}
<aside class="side-panel border-accent">
<h1 class="side-panel-title">{% translate "Date" %}</h1>
<p>{{ page.date }}</p>
</aside>
<aside class="side-panel border-accent">
<h1 class="side-panel-title">{% translate "Moderator" %}</h1>
<p>{{ page.moderator.get_full_name }}</p>
</aside>
<aside class="side-panel border-accent">
<h1 class="side-panel-title">{% translate "Minutes taker" %}</h1>
<p>{{ page.author.get_full_name }}</p>
</aside>
<aside class="side-panel border-accent">
<h1 class="side-panel-title">{% translate "Participants" %}</h1>
<ul>
{% for guest in page.guests %}
<li>{{ guest }}</li>
{% endfor %}
{% for participant in page.participants.all %}
<li>{{ participant.get_full_name }}</li>
{% endfor %}
</ul>
{% else %}
<i>{% translate "No guests" %}</i>
{% endif %}
<h4>{% translate "Labels" %}</h4>
</aside>
<aside class="side-panel border-accent">
<h1 class="side-panel-title">{% translate "Guests" %}</h1>
{% if page.guests %}
<ul>
{% for guest in page.guests %}
<li>{{ guest }}</li>
{% endfor %}
</ul>
{% else %}
<i>{% translate "No guests" %}</i>
{% endif %}
</aside>
<aside class="side-panel border-accent">
<h1 class="side-panel-title">{% translate "Labels" %}</h1>
{% if page.labels.all %}
<p>
{% include "core/label.html" with minutes=page %}
</p>
{% else %}
<p>{% include "core/label.html" with minutes=page %}</p>
{% else %}
<i>{% translate "No labels"%}</i>
{% endif %}
<h4 class="d-print-none">{% translate "Table of contents" %}</h4>
{{ parsed_md.1 }}
{% if page.attachments.all %}
<h4 class="d-print-none">{% translate "Attachments" %}</h4>
<ul>
{% for attachment in page.attachments.all %}
<li>
<a href="{{ attachment.url }}">{{ attachment.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</aside>
{% include "core/sidebar.html" %}
</div>
<div id="minutes-footer" class="d-none d-print-block"></div>
<div id="minutes-navigation" class="row d-print-none">
<div class="col-6">
{% prev_minutes page as prev %}
{% if prev %}
<a href="{{ prev.url }}">< {% translate "Previous minutes" %}</a>
{% endif %}
</div>
<div class="col-6">
{% next_minutes page as next %}
{% if next %}
<a href="{{ next.url }}"> {% translate "Next minutes" %} ></a>
{% endif %}
</div>
<div id="minutes-navigation" class="row d-print-none">
frcroth marked this conversation as resolved.
Show resolved Hide resolved
<div class="col-6">
{% prev_minutes page as prev %}
{% if prev %}
<a href="{{ prev.url }}">< {% translate "Previous minutes" %}</a>
{% endif %}
</div>
<div class="col-6">
{% next_minutes page as next %}
{% if next %}
<a href="{{ next.url }}"> {% translate "Next minutes" %} ></a>
{% endif %}
</div>
</div>
{% endwith %}
</div>
{% endblock %}
Expand Down
4 changes: 2 additions & 2 deletions myhpi/core/templates/core/minutes_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ <h3 id="year{{ year }}">{{ year }}</h3>
<tr>
<td><a href="{{ minute.get_valid_url }}">{{ minute.date|date:"d.m.Y" }}</a></td>
<td>
{% if not minute.live %}
<span title={% translate "Draft" %} aria-hidden="true">⚠️</span>
{% if minute.has_unpublished_changes %}
<span title='{% translate "Page has unpublished changes!" %}' aria-hidden="true">⚠️</span>
{% endif %}
</td>
<td>
Expand Down
30 changes: 30 additions & 0 deletions myhpi/core/templates/core/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% load core_extras %}
{% load i18n %}

{% if perms.wagtail.edit_page %}
abc013 marked this conversation as resolved.
Show resolved Hide resolved
{% if page.has_unpublished_changes %}
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="side-panel-warning">{% translate "Page has unpublished changes!" %}</h1>
</aside>
{% endif %}
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="side-panel-title">{% translate "Visibility" %}</h1>
{{ page.visible_for.all|join:", " }}
</aside>
{% endif %}
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="side-panel-title">{% translate "Table of contents" %}</h1>
{{ parsed_md.1 }}
</aside>
{% if page.attachments.all %}
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="side-panel-title">{% translate "Attachments" %}</h1>
<ul>
{% for attachment in page.attachments.all %}
<li>
<a href="{{ attachment.url }}">{{ attachment.title }}</a>
</li>
{% endfor %}
</ul>
</aside>
{% endif %}
83 changes: 46 additions & 37 deletions myhpi/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-12 19:24+0100\n"
"POT-Creation-Date: 2024-02-13 11:43+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -18,120 +18,126 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: core/markdown/extensions.py:53
#: core/markdown/extensions.py:56
msgid "Begin of meeting"
msgstr "Beginn des Meetings"

#: core/markdown/extensions.py:56
#: core/markdown/extensions.py:59
msgid "End of meeting"
msgstr "Ende des Meetings"

#: core/markdown/extensions.py:70
#: core/markdown/extensions.py:73
#, python-brace-format
msgid "*Meeting break: {time_start_break} – {time_end_break}*"
msgstr "*Sitzungspause: {time_start_break} – {time_end_break}*"

#: core/markdown/extensions.py:87
#: core/markdown/extensions.py:90
msgid "quorate"
msgstr "beschlussfähig"

#: core/markdown/extensions.py:87
#: core/markdown/extensions.py:90
msgid "not quorate"
msgstr "nicht beschlussfähig"

#: core/markdown/extensions.py:90
#: core/markdown/extensions.py:93
#, python-brace-format
msgid "*{num_participants}/{max_num_participants} present → {quorate}* "
msgstr "*{num_participants}/{max_num_participants} anwesend → {quorate}* "

#: core/markdown/extensions.py:114
#: core/markdown/extensions.py:117
#, python-brace-format
msgid "*{time}: {name} {event} the meeting* "
msgstr "*{time}: {name} {event} das Meeting* "

#: core/markdown/extensions.py:119
#: core/markdown/extensions.py:122
#, python-brace-format
msgid "*{time}: {name} {event} the meeting via {mean_of_participation}* "
msgstr "*{time}: {name} {event} das Meeting via {mean_of_participation}* "

#: core/markdown/extensions.py:129
#: core/markdown/extensions.py:132
msgid "enters"
msgstr "betritt"

#: core/markdown/extensions.py:132
#: core/markdown/extensions.py:135
msgid "leaves"
msgstr "verlässt"

#: core/markdown/extensions.py:153
#: core/markdown/extensions.py:156
msgid "[missing link]"
msgstr "[link fehlt]"

#: core/templates/core/information_page.html:20
msgid "Last edited"
msgstr "Zuletzt bearbeitet"

#: core/templates/core/information_page.html:23
#: core/templates/core/information_page.html:22
msgid "A long time ago"
msgstr "Vor langer Zeit"

#: core/templates/core/information_page.html:26
#, python-format
msgid "%(date)s at %(time)s"
msgstr "%(date)s um %(time)s Uhr"

#: core/templates/core/information_page.html:28
#: core/templates/core/information_page.html:32
msgid "by"
msgstr "von"

#: core/templates/core/information_page.html:33
#: core/templates/core/minutes.html:47 polls/templates/polls/poll.html:29
msgid "Table of contents"
msgstr "Inhaltsverzeichnis"

#: core/templates/core/information_page.html:38
#: core/templates/core/minutes.html:50
msgid "Attachments"
msgstr "Anhänge"

#: core/templates/core/minutes.html:17
#: core/templates/core/minutes.html:18
msgid "Date"
msgstr "Datum"

#: core/templates/core/minutes.html:19
#: core/templates/core/minutes.html:22
msgid "Moderator"
msgstr "Sitzungsleitung"

#: core/templates/core/minutes.html:21
#: core/templates/core/minutes.html:26
msgid "Minutes taker"
msgstr "Protokollführung"

#: core/templates/core/minutes.html:23
#: core/templates/core/minutes.html:30
msgid "Participants"
msgstr "Teilnehmende"

#: core/templates/core/minutes.html:29
#: core/templates/core/minutes.html:38
msgid "Guests"
msgstr "Gäste"

#: core/templates/core/minutes.html:37
#: core/templates/core/minutes.html:46
msgid "No guests"
msgstr "Keine Gäste"

#: core/templates/core/minutes.html:39
#: core/templates/core/minutes.html:50
msgid "Labels"
msgstr "Labels"

#: core/templates/core/minutes.html:45
#: core/templates/core/minutes.html:54
msgid "No labels"
msgstr "Keine Labels"

#: core/templates/core/minutes.html:65
#: core/templates/core/minutes.html:64
msgid "Previous minutes"
msgstr "Vorheriges Protokoll"

#: core/templates/core/minutes.html:71
#: core/templates/core/minutes.html:70
msgid "Next minutes"
msgstr "Nächstes Protokoll"

#: core/templates/core/minutes_list.html:15
msgid "Draft"
msgstr "Entwurf"
#: core/templates/core/minutes_list.html:15 core/templates/core/sidebar.html:7
msgid "Page has unpublished changes!"
msgstr "Seite hat unveröffentlichte Änderungen!"

#: core/templates/core/sidebar.html:11
msgid "Visibility"
msgstr "Sichtbarkeit"

#: core/templates/core/sidebar.html:16 polls/templates/polls/poll.html:29
msgid "Table of contents"
msgstr "Inhaltsverzeichnis"

#: core/templates/core/sidebar.html:21
msgid "Attachments"
msgstr "Anhänge"

#: polls/templates/polls/poll.html:17
msgid "You have already voted and the results are not yet visible."
Expand Down Expand Up @@ -509,6 +515,9 @@ msgstr "{email} hat erfolgreich {list} verlassen."
msgid "The subscription of {email} onto {list} was rolled back."
msgstr "Die Anmeldung von {email} auf {list} wurde rückgänig gemacht."

#~ msgid "Draft"
#~ msgstr "Entwurf"

#, fuzzy
#~| msgid "[missing link]"
#~ msgid "[missing image]"
Expand Down
Loading
Loading