From: Frédéric Péters Date: Thu, 1 Dec 2022 14:29:19 +0000 (+0100) Subject: add agendas to top links if there are any X-Git-Tag: v2023~3 X-Git-Url: https://git.0d.be/?p=panikdb.git;a=commitdiff_plain;h=3ec04091c09b32e64b6478092999725027d2a584 add agendas to top links if there are any --- diff --git a/panikdb/static/css/style.scss b/panikdb/static/css/style.scss index a1fb0e8..cb6713c 100644 --- a/panikdb/static/css/style.scss +++ b/panikdb/static/css/style.scss @@ -415,6 +415,7 @@ a [class^="icon-"], a [class*=" icon-"] { .icon-regie::before { content: "\f130 "; } .icon-download::before { content: "\f019 "; } .icon-image::before { content: "\f03e "; } +.icon-agenda::before { content: "\f073 "; } .icon-circle-arrow-down:after { content: "  \f0ab"; } .icon-arrow-left:after { content: "\f060"; } diff --git a/panikdb/templates/home.html b/panikdb/templates/home.html index 09611e6..8cd05ac 100644 --- a/panikdb/templates/home.html +++ b/panikdb/templates/home.html @@ -28,6 +28,9 @@ {% trans "Studio" %} {% endif %} {% trans "Members directory" %} +{% if has_agendas %} +{% trans "Agendas" %} +{% endif %} {% if has_nonstop and perms.nonstop.add_track %} {% trans "Nonstop management" %} {% endif %} diff --git a/panikdb/views.py b/panikdb/views.py index 1d358b5..a2f2738 100644 --- a/panikdb/views.py +++ b/panikdb/views.py @@ -3,6 +3,7 @@ import logging import emissions.views import newsletter.views +from agendas.models import Agenda from combo.data.models import Page from django.conf import settings from django.contrib import messages @@ -53,6 +54,7 @@ class Home(TemplateView, PigeDownloadMixin): '-last_update_timestamp' ) context['extra_top_links'] = settings.HOME_EXTRA_TOP_LINKS + context['has_agendas'] = bool(Agenda.objects.all().exists()) return context