diff --git a/AKDashboard/locale/de_DE/LC_MESSAGES/django.po b/AKDashboard/locale/de_DE/LC_MESSAGES/django.po index b641a0390f938bff9519e523f82186b554ec586e..4bc357378058b84ba589f6702dc034faed47c73d 100644 --- a/AKDashboard/locale/de_DE/LC_MESSAGES/django.po +++ b/AKDashboard/locale/de_DE/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-16 20:26+0000\n" +"POT-Creation-Date: 2020-05-19 20:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -75,23 +75,23 @@ msgstr "" msgid "AK List" msgstr "AK Liste" -#: AKDashboard/templates/AKDashboard/dashboard_row.html:23 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:24 msgid "Current AKs" msgstr "Aktuelle AKs" -#: AKDashboard/templates/AKDashboard/dashboard_row.html:30 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:31 msgid "AK Wall" msgstr "AK-Wall" -#: AKDashboard/templates/AKDashboard/dashboard_row.html:38 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:39 msgid "Schedule" msgstr "AK-Plan" -#: AKDashboard/templates/AKDashboard/dashboard_row.html:48 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:50 msgid "AK Submission" msgstr "AK-Submission" -#: AKDashboard/templates/AKDashboard/dashboard_row.html:64 +#: AKDashboard/templates/AKDashboard/dashboard_row.html:66 msgid "Write to organizers of this event for questions and comments" msgstr "" "Kontaktiere die Organisator*innen des Events bei Fragen oder Kommentaren" diff --git a/AKDashboard/templates/AKDashboard/dashboard_row.html b/AKDashboard/templates/AKDashboard/dashboard_row.html index 4b3e40c53f1ece45df17a6253e7547e6b0ca31e5..8b8a947affb5933a7a754de0db79ed4adf6178e1 100644 --- a/AKDashboard/templates/AKDashboard/dashboard_row.html +++ b/AKDashboard/templates/AKDashboard/dashboard_row.html @@ -15,29 +15,31 @@ </a> {% endif %} {% if 'AKPlan'|check_app_installed %} - {% if event.active %} - <a class="dashboard-box btn btn-primary" - href="{% url 'plan:plan_overview' event_slug=event.slug %}"> - <div class="col-sm-12 col-md-3 col-lg-2 dashboard-button"> - <span class="fa fa-clock"></span> - <span class='text'>{% trans 'Current AKs' %}</span> - </div> - </a> - <a class="dashboard-box btn btn-primary" - href="{% url 'plan:plan_wall' event_slug=event.slug %}"> - <div class="col-sm-12 col-md-3 col-lg-2 dashboard-button"> - <span class="fa fa-calendar"></span> - <span class='text'>{% trans 'AK Wall' %}</span> - </div> - </a> - {% else %} - <a class="dashboard-box btn btn-primary" - href="{% url 'plan:plan_overview' event_slug=event.slug %}"> - <div class="col-sm-12 col-md-3 col-lg-2 dashboard-button"> - <span class="fa fa-calendar-alt"></span> - <span class='text'>{% trans 'Schedule' %}</span> - </div> - </a> + {% if not event.plan_hidden or user.is_staff %} + {% if event.active %} + <a class="dashboard-box btn btn-primary" + href="{% url 'plan:plan_overview' event_slug=event.slug %}"> + <div class="col-sm-12 col-md-3 col-lg-2 dashboard-button"> + <span class="fa fa-clock"></span> + <span class='text'>{% trans 'Current AKs' %}</span> + </div> + </a> + <a class="dashboard-box btn btn-primary" + href="{% url 'plan:plan_wall' event_slug=event.slug %}"> + <div class="col-sm-12 col-md-3 col-lg-2 dashboard-button"> + <span class="fa fa-calendar"></span> + <span class='text'>{% trans 'AK Wall' %}</span> + </div> + </a> + {% else %} + <a class="dashboard-box btn btn-primary" + href="{% url 'plan:plan_overview' event_slug=event.slug %}"> + <div class="col-sm-12 col-md-3 col-lg-2 dashboard-button"> + <span class="fa fa-calendar-alt"></span> + <span class='text'>{% trans 'Schedule' %}</span> + </div> + </a> + {% endif %} {% endif %} {% endif %} {% if 'AKSubmission'|check_app_installed and event.active %} diff --git a/AKModel/locale/de_DE/LC_MESSAGES/django.po b/AKModel/locale/de_DE/LC_MESSAGES/django.po index d16f7bb12d63a8b38eade5515da7fcf453281754..4aabb18156486b5517903115bf67172d2b687955 100644 --- a/AKModel/locale/de_DE/LC_MESSAGES/django.po +++ b/AKModel/locale/de_DE/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 18:41+0000\n" +"POT-Creation-Date: 2020-05-19 20:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -56,15 +56,15 @@ msgstr "Die eingegebene Verfügbarkeit enthält ein ungültiges Datum." msgid "Please fill in your availabilities!" msgstr "Bitte Verfügbarkeiten eintragen!" -#: AKModel/availability/models.py:38 AKModel/models.py:39 AKModel/models.py:68 -#: AKModel/models.py:120 AKModel/models.py:139 AKModel/models.py:171 -#: AKModel/models.py:224 AKModel/models.py:266 AKModel/models.py:296 +#: AKModel/availability/models.py:38 AKModel/models.py:41 AKModel/models.py:70 +#: AKModel/models.py:122 AKModel/models.py:141 AKModel/models.py:173 +#: AKModel/models.py:226 AKModel/models.py:268 AKModel/models.py:298 msgid "Event" msgstr "Event" -#: AKModel/availability/models.py:39 AKModel/models.py:69 AKModel/models.py:121 -#: AKModel/models.py:140 AKModel/models.py:172 AKModel/models.py:225 -#: AKModel/models.py:267 AKModel/models.py:297 +#: AKModel/availability/models.py:39 AKModel/models.py:71 AKModel/models.py:123 +#: AKModel/models.py:142 AKModel/models.py:174 AKModel/models.py:227 +#: AKModel/models.py:269 AKModel/models.py:299 msgid "Associated event" msgstr "Zugehöriges Event" @@ -76,8 +76,8 @@ msgstr "Person" msgid "Person whose availability this is" msgstr "Person deren Verfügbarkeit hier abgebildet wird" -#: AKModel/availability/models.py:56 AKModel/models.py:270 -#: AKModel/models.py:289 +#: AKModel/availability/models.py:56 AKModel/models.py:272 +#: AKModel/models.py:291 msgid "Room" msgstr "Raum" @@ -85,8 +85,8 @@ msgstr "Raum" msgid "Room whose availability this is" msgstr "Raum dessen Verfügbarkeit hier abgebildet wird" -#: AKModel/availability/models.py:65 AKModel/models.py:230 -#: AKModel/models.py:288 +#: AKModel/availability/models.py:65 AKModel/models.py:232 +#: AKModel/models.py:290 msgid "AK" msgstr "AK" @@ -94,7 +94,7 @@ msgstr "AK" msgid "AK whose availability this is" msgstr "Verfügbarkeiten" -#: AKModel/availability/models.py:74 AKModel/models.py:124 +#: AKModel/availability/models.py:74 AKModel/models.py:126 msgid "AK Category" msgstr "AK Kategorie" @@ -106,9 +106,9 @@ msgstr "AK Kategorie dessen Verfügbarkeit hier abgebildet wird" msgid "Availabilities" msgstr "Verfügbarkeiten" -#: AKModel/models.py:16 AKModel/models.py:115 AKModel/models.py:136 -#: AKModel/models.py:155 AKModel/models.py:169 AKModel/models.py:187 -#: AKModel/models.py:259 +#: AKModel/models.py:16 AKModel/models.py:117 AKModel/models.py:138 +#: AKModel/models.py:157 AKModel/models.py:171 AKModel/models.py:189 +#: AKModel/models.py:261 msgid "Name" msgstr "Name" @@ -166,27 +166,35 @@ msgstr "Aktiver Status" msgid "Marks currently active events" msgstr "Markiert aktuell aktive Events" -#: AKModel/models.py:30 +#: AKModel/models.py:29 +msgid "Plan Hidden" +msgstr "Plan verborgen" + +#: AKModel/models.py:29 +msgid "Hides plan for non-staff users" +msgstr "Verbirgt den Plan für Nutzer*innen ohne erweiterte Rechte" + +#: AKModel/models.py:32 msgid "Base URL" msgstr "URL-Prefix" -#: AKModel/models.py:30 +#: AKModel/models.py:32 msgid "Prefix for wiki link construction" msgstr "Prefix für die automatische Generierung von Wiki-Links" -#: AKModel/models.py:31 +#: AKModel/models.py:33 msgid "Default Slot Length" msgstr "Standardslotlänge" -#: AKModel/models.py:32 +#: AKModel/models.py:34 msgid "Default length in hours that is assumed for AKs in this event." msgstr "Standardlänge von Slots (in Stunden) für dieses Event" -#: AKModel/models.py:34 +#: AKModel/models.py:36 msgid "Contact email address" msgstr "E-Mail Kontaktadresse" -#: AKModel/models.py:36 +#: AKModel/models.py:38 msgid "" "An email address that is displayed on every page and can be used for all " "kinds of questions" @@ -194,208 +202,208 @@ msgstr "" "Eine Mailadresse die auf jeder Seite angezeigt wird und für alle Arten von " "Fragen genutzt werden kann" -#: AKModel/models.py:40 +#: AKModel/models.py:42 msgid "Events" msgstr "Events" -#: AKModel/models.py:63 +#: AKModel/models.py:65 msgid "Nickname" msgstr "Spitzname" -#: AKModel/models.py:63 +#: AKModel/models.py:65 msgid "Name to identify an AK owner by" msgstr "Name durch den eine AK Leitung identifiziert wird" -#: AKModel/models.py:64 +#: AKModel/models.py:66 msgid "Slug" msgstr "Slug" -#: AKModel/models.py:64 +#: AKModel/models.py:66 msgid "Slug for URL generation" msgstr "Slug für URL-Generierung" -#: AKModel/models.py:65 +#: AKModel/models.py:67 msgid "Institution" msgstr "Instutution" -#: AKModel/models.py:65 +#: AKModel/models.py:67 msgid "Uni etc." msgstr "Universität o.ä." -#: AKModel/models.py:66 AKModel/models.py:196 +#: AKModel/models.py:68 AKModel/models.py:198 msgid "Web Link" msgstr "Internet Link" -#: AKModel/models.py:66 +#: AKModel/models.py:68 msgid "Link to Homepage" msgstr "Link zu Homepage oder Webseite" -#: AKModel/models.py:72 +#: AKModel/models.py:74 msgid "AK Owner" msgstr "AK Leitung" -#: AKModel/models.py:73 +#: AKModel/models.py:75 msgid "AK Owners" msgstr "AK Leitungen" -#: AKModel/models.py:115 +#: AKModel/models.py:117 msgid "Name of the AK Category" msgstr "Name des AK Kategorie" -#: AKModel/models.py:116 AKModel/models.py:137 +#: AKModel/models.py:118 AKModel/models.py:139 msgid "Color" msgstr "Farbe" -#: AKModel/models.py:116 AKModel/models.py:137 +#: AKModel/models.py:118 AKModel/models.py:139 msgid "Color for displaying" msgstr "Farbe für die Anzeige" -#: AKModel/models.py:117 AKModel/models.py:190 +#: AKModel/models.py:119 AKModel/models.py:192 msgid "Description" msgstr "Beschreibung" -#: AKModel/models.py:118 +#: AKModel/models.py:120 msgid "Short description of this AK Category" msgstr "Beschreibung der AK-Kategorie" -#: AKModel/models.py:125 +#: AKModel/models.py:127 msgid "AK Categories" msgstr "AK Kategorien" -#: AKModel/models.py:136 +#: AKModel/models.py:138 msgid "Name of the AK Track" msgstr "Name des AK Tracks" -#: AKModel/models.py:143 +#: AKModel/models.py:145 msgid "AK Track" msgstr "AK Track" -#: AKModel/models.py:144 +#: AKModel/models.py:146 msgid "AK Tracks" msgstr "AK Tracks" -#: AKModel/models.py:155 +#: AKModel/models.py:157 msgid "Name of the AK Tag" msgstr "Name das AK Tags" -#: AKModel/models.py:158 +#: AKModel/models.py:160 msgid "AK Tag" msgstr "AK Tag" -#: AKModel/models.py:159 +#: AKModel/models.py:161 msgid "AK Tags" msgstr "AK Tags" -#: AKModel/models.py:169 +#: AKModel/models.py:171 msgid "Name of the Requirement" msgstr "Name der Anforderung" -#: AKModel/models.py:175 +#: AKModel/models.py:177 msgid "AK Requirement" msgstr "AK Anforderung" -#: AKModel/models.py:176 +#: AKModel/models.py:178 msgid "AK Requirements" msgstr "AK Anforderungen" -#: AKModel/models.py:187 +#: AKModel/models.py:189 msgid "Name of the AK" msgstr "Name des AKs" -#: AKModel/models.py:188 +#: AKModel/models.py:190 msgid "Short Name" msgstr "Kurzer Name" -#: AKModel/models.py:189 +#: AKModel/models.py:191 msgid "Name displayed in the schedule" msgstr "Name zur Anzeige im AK Plan" -#: AKModel/models.py:190 +#: AKModel/models.py:192 msgid "Description of the AK" msgstr "Beschreibung des AKs" -#: AKModel/models.py:192 +#: AKModel/models.py:194 msgid "Owners" msgstr "Leitungen" -#: AKModel/models.py:193 +#: AKModel/models.py:195 msgid "Those organizing the AK" msgstr "Menschen, die den AK organisieren und halten" -#: AKModel/models.py:196 +#: AKModel/models.py:198 msgid "Link to wiki page" msgstr "Link zur Wiki Seite" -#: AKModel/models.py:198 +#: AKModel/models.py:200 msgid "Category" msgstr "Kategorie" -#: AKModel/models.py:199 +#: AKModel/models.py:201 msgid "Category of the AK" msgstr "Kategorie des AKs" -#: AKModel/models.py:200 +#: AKModel/models.py:202 msgid "Tags" msgstr "Tags" -#: AKModel/models.py:200 +#: AKModel/models.py:202 msgid "Tags provided by owners" msgstr "Tags, die durch die AK Leitung vergeben wurden" -#: AKModel/models.py:201 +#: AKModel/models.py:203 msgid "Track" msgstr "Track" -#: AKModel/models.py:202 +#: AKModel/models.py:204 msgid "Track the AK belongs to" msgstr "Track zu dem der AK gehört" -#: AKModel/models.py:204 +#: AKModel/models.py:206 msgid "Resolution Intention" msgstr "Resolutionsabsicht" -#: AKModel/models.py:205 +#: AKModel/models.py:207 msgid "Intends to submit a resolution" msgstr "Beabsichtigt eine Resolution einzureichen" -#: AKModel/models.py:206 +#: AKModel/models.py:208 msgid "Present this AK" msgstr "AK Präsentieren" -#: AKModel/models.py:207 +#: AKModel/models.py:209 msgid "Present results of this AK" msgstr "Die Ergebnisse dieses AKs vorstellen" -#: AKModel/models.py:209 +#: AKModel/models.py:211 msgid "Requirements" msgstr "Anforderungen" -#: AKModel/models.py:210 +#: AKModel/models.py:212 msgid "AK's Requirements" msgstr "Anforderungen des AKs" -#: AKModel/models.py:212 +#: AKModel/models.py:214 msgid "Conflicting AKs" msgstr "AK Konflikte" -#: AKModel/models.py:213 +#: AKModel/models.py:215 msgid "AKs that conflict and thus must not take place at the same time" msgstr "" "AKs, die Konflikte haben und deshalb nicht gleichzeitig stattfinden dürfen" -#: AKModel/models.py:214 +#: AKModel/models.py:216 msgid "Prerequisite AKs" msgstr "Vorausgesetzte AKs" -#: AKModel/models.py:215 +#: AKModel/models.py:217 msgid "AKs that should precede this AK in the schedule" msgstr "AKS die im AK Plan vor diesem AK stattfinden müssen" -#: AKModel/models.py:217 +#: AKModel/models.py:219 msgid "Organizational Notes" msgstr "Notizen zur Organisation" -#: AKModel/models.py:218 +#: AKModel/models.py:220 msgid "" "Notes to organizers. These are public. For private notes, please send an e-" "mail." @@ -403,96 +411,96 @@ msgstr "" "Notizen an die Organisator*innen. Diese sind öffentlich, für private " "Anmerkungen bitte eine E-Mail schicken." -#: AKModel/models.py:220 +#: AKModel/models.py:222 msgid "Interest" msgstr "Interesse" -#: AKModel/models.py:220 +#: AKModel/models.py:222 msgid "Expected number of people" msgstr "Erwartete Personenzahl" -#: AKModel/models.py:221 +#: AKModel/models.py:223 msgid "Interest Counter" msgstr "Interessenszähler" -#: AKModel/models.py:222 +#: AKModel/models.py:224 msgid "People who have indicated interest online" msgstr "Anzahl Personen, die online Interesse bekundet haben" -#: AKModel/models.py:231 AKModel/templates/admin/AKModel/status.html:47 +#: AKModel/models.py:233 AKModel/templates/admin/AKModel/status.html:47 #: AKModel/templates/admin/AKModel/status.html:54 msgid "AKs" msgstr "AKs" -#: AKModel/models.py:259 +#: AKModel/models.py:261 msgid "Name or number of the room" msgstr "Name oder Nummer des Raums" -#: AKModel/models.py:260 +#: AKModel/models.py:262 msgid "Location" msgstr "Ort" -#: AKModel/models.py:261 +#: AKModel/models.py:263 msgid "Name or number of the location" msgstr "Name oder Nummer des Ortes" -#: AKModel/models.py:262 +#: AKModel/models.py:264 msgid "Capacity" msgstr "Kapazität" -#: AKModel/models.py:262 +#: AKModel/models.py:264 msgid "Maximum number of people" msgstr "Maximale Personenzahl" -#: AKModel/models.py:263 +#: AKModel/models.py:265 msgid "Properties" msgstr "Eigenschaften" -#: AKModel/models.py:264 +#: AKModel/models.py:266 msgid "AK requirements fulfilled by the room" msgstr "AK Anforderungen, die dieser Raum erfüllt" -#: AKModel/models.py:271 AKModel/templates/admin/AKModel/status.html:31 +#: AKModel/models.py:273 AKModel/templates/admin/AKModel/status.html:31 msgid "Rooms" msgstr "Räume" -#: AKModel/models.py:288 +#: AKModel/models.py:290 msgid "AK being mapped" msgstr "AK, der zugeordnet wird" -#: AKModel/models.py:290 +#: AKModel/models.py:292 msgid "Room the AK will take place in" msgstr "Raum in dem der AK stattfindet" -#: AKModel/models.py:291 +#: AKModel/models.py:293 msgid "Slot Begin" msgstr "Beginn des Slots" -#: AKModel/models.py:291 +#: AKModel/models.py:293 msgid "Time and date the slot begins" msgstr "Zeit und Datum zu der der AK beginnt" -#: AKModel/models.py:293 +#: AKModel/models.py:295 msgid "Duration" msgstr "Dauer" -#: AKModel/models.py:294 +#: AKModel/models.py:296 msgid "Length in hours" msgstr "Länge in Stunden" -#: AKModel/models.py:299 +#: AKModel/models.py:301 msgid "Last update" msgstr "Letzte Aktualisierung" -#: AKModel/models.py:302 +#: AKModel/models.py:304 msgid "AK Slot" msgstr "AK Slot" -#: AKModel/models.py:303 +#: AKModel/models.py:305 msgid "AK Slots" msgstr "AK Slot" -#: AKModel/models.py:317 +#: AKModel/models.py:319 msgid "Not scheduled yet" msgstr "Noch nicht geplant" diff --git a/AKModel/migrations/0035_event_plan_hidden.py b/AKModel/migrations/0035_event_plan_hidden.py new file mode 100644 index 0000000000000000000000000000000000000000..1a5dbed7727646956bcd81284293ea7ad4b9dd6a --- /dev/null +++ b/AKModel/migrations/0035_event_plan_hidden.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.6 on 2020-05-19 20:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('AKModel', '0034_room_rename_field'), + ] + + operations = [ + migrations.AddField( + model_name='event', + name='plan_hidden', + field=models.BooleanField(default=True, help_text='Hides plan for non-staff users', verbose_name='Plan Hidden'), + ), + ] diff --git a/AKModel/models.py b/AKModel/models.py index 9d507ea3941474881e3cb1239b9b9a44131e8787..8e94050d3c13fe5a0d1f09ed3eac959a3dfc9f30 100644 --- a/AKModel/models.py +++ b/AKModel/models.py @@ -26,6 +26,8 @@ class Event(models.Model): end = models.DateTimeField(verbose_name=_('End'), help_text=_('Time the event ends')) active = models.BooleanField(verbose_name=_('Active State'), help_text=_('Marks currently active events')) + plan_hidden = models.BooleanField(verbose_name=_('Plan Hidden'), help_text=_('Hides plan for non-staff users'), + default=True) base_url = models.URLField(verbose_name=_("Base URL"), help_text=_("Prefix for wiki link construction"), blank=True) default_slot = models.DecimalField(max_digits=4, decimal_places=2, default=2, verbose_name=_('Default Slot Length'), diff --git a/AKPlan/locale/de_DE/LC_MESSAGES/django.po b/AKPlan/locale/de_DE/LC_MESSAGES/django.po index 253f11c8fb8a7850c9295b7cb6ee81acd256c905..2b2dada6026a80fa01a158c9cabde62f8f483492 100644 --- a/AKPlan/locale/de_DE/LC_MESSAGES/django.po +++ b/AKPlan/locale/de_DE/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 07:23+0000\n" +"POT-Creation-Date: 2020-05-19 20:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -21,64 +21,70 @@ msgstr "" msgid "Write to organizers of this event for questions and comments" msgstr "Fragen oder Kommentare? Schreib den Orgas dieses Events eine Mail" -#: AKPlan/templates/AKPlan/plan_index.html:40 +#: AKPlan/templates/AKPlan/plan_index.html:41 msgid "Day" msgstr "Tag" -#: AKPlan/templates/AKPlan/plan_index.html:50 +#: AKPlan/templates/AKPlan/plan_index.html:51 msgid "Event" msgstr "Veranstaltung" -#: AKPlan/templates/AKPlan/plan_index.html:59 +#: AKPlan/templates/AKPlan/plan_index.html:60 #: AKPlan/templates/AKPlan/plan_room.html:13 #: AKPlan/templates/AKPlan/plan_room.html:48 #: AKPlan/templates/AKPlan/plan_wall.html:64 msgid "Room" msgstr "Raum" -#: AKPlan/templates/AKPlan/plan_index.html:74 +#: AKPlan/templates/AKPlan/plan_index.html:76 #: AKPlan/templates/AKPlan/plan_room.html:11 #: AKPlan/templates/AKPlan/plan_track.html:9 msgid "AK Plan" msgstr "AK-Plan" -#: AKPlan/templates/AKPlan/plan_index.html:86 +#: AKPlan/templates/AKPlan/plan_index.html:88 #: AKPlan/templates/AKPlan/plan_room.html:38 msgid "Rooms" msgstr "Räume" -#: AKPlan/templates/AKPlan/plan_index.html:99 +#: AKPlan/templates/AKPlan/plan_index.html:101 #: AKPlan/templates/AKPlan/plan_track.html:36 msgid "Tracks" msgstr "Tracks" -#: AKPlan/templates/AKPlan/plan_index.html:111 +#: AKPlan/templates/AKPlan/plan_index.html:113 msgid "AK Wall" msgstr "AK-Wall" -#: AKPlan/templates/AKPlan/plan_index.html:123 +#: AKPlan/templates/AKPlan/plan_index.html:126 #: AKPlan/templates/AKPlan/plan_wall.html:88 msgid "Current AKs" msgstr "Aktuelle AKs" -#: AKPlan/templates/AKPlan/plan_index.html:130 +#: AKPlan/templates/AKPlan/plan_index.html:133 #: AKPlan/templates/AKPlan/plan_wall.html:93 msgid "Next AKs" msgstr "Nächste AKs" -#: AKPlan/templates/AKPlan/plan_index.html:138 +#: AKPlan/templates/AKPlan/plan_index.html:141 msgid "This event is not active." msgstr "Dieses Event ist nicht aktiv." +#: AKPlan/templates/AKPlan/plan_index.html:152 +#: AKPlan/templates/AKPlan/plan_room.html:66 +#: AKPlan/templates/AKPlan/plan_track.html:58 +msgid "Plan is not visible (yet)." +msgstr "Plan ist (noch) nicht sichtbar" + #: AKPlan/templates/AKPlan/plan_room.html:52 msgid "Go to virtual room" msgstr "Zum virtuellen Raum" -#: AKPlan/templates/AKPlan/plan_room.html:67 +#: AKPlan/templates/AKPlan/plan_room.html:73 msgid "Capacity" msgstr "Kapazität" -#: AKPlan/templates/AKPlan/plan_room.html:71 +#: AKPlan/templates/AKPlan/plan_room.html:77 msgid "Properties" msgstr "Eigenschaften" diff --git a/AKPlan/templates/AKPlan/plan_akslot.html b/AKPlan/templates/AKPlan/plan_akslot.html index 24007ed650919b7177b42c2cbe9b5bf6b68c5fbe..03769846d6cdde55fbfac4cf2e0952eeb8f34ab4 100644 --- a/AKPlan/templates/AKPlan/plan_akslot.html +++ b/AKPlan/templates/AKPlan/plan_akslot.html @@ -46,16 +46,18 @@ eventColor: '#127ba3', // Create entries for all scheduled slots events: [ - {% for slot in ak.akslot_set.all %} - {% if slot.start %} - { - 'title': '{{ slot.room }}', - 'start': '{{ slot.start | timezone:ak.event.timezone | date:"Y-m-d H:i:s" }}', - 'end': '{{ slot.end | timezone:ak.event.timezone | date:"Y-m-d H:i:s" }}', - 'url' : '{% url "plan:plan_room" event_slug=ak.event.slug pk=slot.room.pk %}' - }, - {% endif %} - {% endfor %} + {% if not ak.event.plan_hidden or user.is_staff %} + {% for slot in ak.akslot_set.all %} + {% if slot.start %} + { + 'title': '{{ slot.room }}', + 'start': '{{ slot.start | timezone:ak.event.timezone | date:"Y-m-d H:i:s" }}', + 'end': '{{ slot.end | timezone:ak.event.timezone | date:"Y-m-d H:i:s" }}', + 'url' : '{% url "plan:plan_room" event_slug=ak.event.slug pk=slot.room.pk %}' + }, + {% endif %} + {% endfor %} + {% endif %} {% for a in availabilities %} { title: '{{ Verfuegbarkeit }}', diff --git a/AKPlan/templates/AKPlan/plan_detail.html b/AKPlan/templates/AKPlan/plan_detail.html index 4bf4c9546ace03190557f7f0030b64e40fdd30e5..b539afd8f7384a822c482dcd1590358eb3c12dff 100644 --- a/AKPlan/templates/AKPlan/plan_detail.html +++ b/AKPlan/templates/AKPlan/plan_detail.html @@ -7,47 +7,49 @@ {% block fullcalendar %} - {% get_current_language as LANGUAGE_CODE %} - - <link href='{% static 'AKPlan/vendor/fullcalendar/daygrid/main.min.css' %}' rel='stylesheet'/> - <link href='{% static 'AKPlan/vendor/fullcalendar/timegrid/main.min.css' %}' rel='stylesheet'/> - - <script src='{% static 'AKPlan/vendor/fullcalendar/daygrid/main.min.js' %}'></script> - <script src='{% static 'AKPlan/vendor/fullcalendar/timegrid/main.min.js' %}'></script> - - <script> - document.addEventListener('DOMContentLoaded', function () { - var calendarEl = document.getElementById('planCalendar'); - - var calendar = new FullCalendar.Calendar(calendarEl, { - plugins: ['timeGrid', 'bootstrap'], - // Adapt to timezone of the connected event - timeZone: '{{ event.timezone }}', - defaultView: 'timeGrid', - // Adapt to user selected locale - locale: '{{ LANGUAGE_CODE }}', - // No header, not buttons - header: { - left: '', - center: '', - right: '' - }, - aspectRatio: 2, - themeSystem: 'bootstrap', - // Only show calendar view for the dates of the connected event - visibleRange: { - start: '{{ event.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}', - end: '{{ event.end | timezone:event.timezone | date:"Y-m-d H:i:s"}}', - }, - allDaySlot: false, - nowIndicator: true, - eventTextColor: '#fff', - eventColor: '#127ba3', - // Create entries for all scheduled slots - events: {% block encode %}{% endblock %} + {% if not event.plan_hidden or user.is_staff %} + {% get_current_language as LANGUAGE_CODE %} + + <link href='{% static 'AKPlan/vendor/fullcalendar/daygrid/main.min.css' %}' rel='stylesheet'/> + <link href='{% static 'AKPlan/vendor/fullcalendar/timegrid/main.min.css' %}' rel='stylesheet'/> + + <script src='{% static 'AKPlan/vendor/fullcalendar/daygrid/main.min.js' %}'></script> + <script src='{% static 'AKPlan/vendor/fullcalendar/timegrid/main.min.js' %}'></script> + + <script> + document.addEventListener('DOMContentLoaded', function () { + var calendarEl = document.getElementById('planCalendar'); + + var calendar = new FullCalendar.Calendar(calendarEl, { + plugins: ['timeGrid', 'bootstrap'], + // Adapt to timezone of the connected event + timeZone: '{{ event.timezone }}', + defaultView: 'timeGrid', + // Adapt to user selected locale + locale: '{{ LANGUAGE_CODE }}', + // No header, not buttons + header: { + left: '', + center: '', + right: '' + }, + aspectRatio: 2, + themeSystem: 'bootstrap', + // Only show calendar view for the dates of the connected event + visibleRange: { + start: '{{ event.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}', + end: '{{ event.end | timezone:event.timezone | date:"Y-m-d H:i:s"}}', + }, + allDaySlot: false, + nowIndicator: true, + eventTextColor: '#fff', + eventColor: '#127ba3', + // Create entries for all scheduled slots + events: {% block encode %}{% endblock %} + }); + + calendar.render(); }); - - calendar.render(); - }); - </script> + </script> + {% endif %} {% endblock %} diff --git a/AKPlan/templates/AKPlan/plan_index.html b/AKPlan/templates/AKPlan/plan_index.html index f7880c2b9a841991d76dcbcf79145abab85e901e..f4fc250ad3e170a34602ceb560d6cac8ef4769db 100644 --- a/AKPlan/templates/AKPlan/plan_index.html +++ b/AKPlan/templates/AKPlan/plan_index.html @@ -7,64 +7,66 @@ {% block fullcalendar %} - {% get_current_language as LANGUAGE_CODE %} - - <link href='{% static 'AKPlan/vendor/fullcalendar/timeline/main.css' %}' rel='stylesheet'/> - <link href='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.css' %}' rel='stylesheet'/> - <link href='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.min.css' %}' rel='stylesheet'/> - - <script src='{% static 'AKPlan/vendor/fullcalendar/timeline/main.js' %}'></script> - <script src='{% static 'AKPlan/vendor/fullcalendar/resource-common/main.js' %}'></script> - <script src='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.js' %}'></script> - - <script> - document.addEventListener('DOMContentLoaded', function () { - var planEl = document.getElementById('planCalendar'); - - var plan = new FullCalendar.Calendar(planEl, { - plugins: ['resourceTimeline', 'bootstrap'], - timeZone: '{{ event.timezone }}', - header: { - left: 'today prev,next', - center: 'title', - right: 'resourceTimelineDay,resourceTimelineEvent' - }, - aspectRatio: 2, - themeSystem: 'bootstrap', - // Adapt to user selected locale - locale: '{{ LANGUAGE_CODE }}', - defaultView: 'resourceTimelineEvent', - views: { - resourceTimelineDay: { - type: 'resourceTimeline', - buttonText: '{% trans "Day" %}', - slotDuration: '01:00', - scrollTime: '08:00', + {% if not event.plan_hidden or user.is_staff %} + {% get_current_language as LANGUAGE_CODE %} + + <link href='{% static 'AKPlan/vendor/fullcalendar/timeline/main.css' %}' rel='stylesheet'/> + <link href='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.css' %}' rel='stylesheet'/> + <link href='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.min.css' %}' rel='stylesheet'/> + + <script src='{% static 'AKPlan/vendor/fullcalendar/timeline/main.js' %}'></script> + <script src='{% static 'AKPlan/vendor/fullcalendar/resource-common/main.js' %}'></script> + <script src='{% static 'AKPlan/vendor/fullcalendar/resource-timeline/main.js' %}'></script> + + <script> + document.addEventListener('DOMContentLoaded', function () { + var planEl = document.getElementById('planCalendar'); + + var plan = new FullCalendar.Calendar(planEl, { + plugins: ['resourceTimeline', 'bootstrap'], + timeZone: '{{ event.timezone }}', + header: { + left: 'today prev,next', + center: 'title', + right: 'resourceTimelineDay,resourceTimelineEvent' }, - resourceTimelineEvent: { - type: 'resourceTimeline', - visibleRange: { - start: '{{ event.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}', - end: '{{ event.end | timezone:event.timezone | date:"Y-m-d H:i:s"}}', + aspectRatio: 2, + themeSystem: 'bootstrap', + // Adapt to user selected locale + locale: '{{ LANGUAGE_CODE }}', + defaultView: 'resourceTimelineEvent', + views: { + resourceTimelineDay: { + type: 'resourceTimeline', + buttonText: '{% trans "Day" %}', + slotDuration: '01:00', + scrollTime: '08:00', }, - buttonText: '{% trans "Event" %}', - } - }, - editable: false, - allDaySlot: false, - nowIndicator: true, - eventTextColor: '#fff', - eventColor: '#127ba3', - resourceAreaWidth: '15%', - resourceLabelText: '{% trans "Room" %}', - resources: {% include "AKPlan/encode_rooms.html" %}, - events: {% with akslots as slots %}{% include "AKPlan/encode_events.html" %}{% endwith %}, - schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source', + resourceTimelineEvent: { + type: 'resourceTimeline', + visibleRange: { + start: '{{ event.start | timezone:event.timezone | date:"Y-m-d H:i:s" }}', + end: '{{ event.end | timezone:event.timezone | date:"Y-m-d H:i:s"}}', + }, + buttonText: '{% trans "Event" %}', + } + }, + editable: false, + allDaySlot: false, + nowIndicator: true, + eventTextColor: '#fff', + eventColor: '#127ba3', + resourceAreaWidth: '15%', + resourceLabelText: '{% trans "Room" %}', + resources: {% include "AKPlan/encode_rooms.html" %}, + events: {% with akslots as slots %}{% include "AKPlan/encode_events.html" %}{% endwith %}, + schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source', + }); + + plan.render(); }); - - plan.render(); - }); - </script> + </script> + {% endif %} {% endblock %} @@ -118,31 +120,39 @@ {% timezone event.timezone %} <div class="row" style="margin-top:30px;"> - {% if event.active %} - <div class="col-md-6"> - <h2><a name="currentAKs">{% trans "Current AKs" %}:</a></h2> - {% with akslots_now as slots %} - {% include "AKPlan/slots_table.html" %} - {% endwith %} - </div> + {% if not event.plan_hidden or user.is_staff %} + {% if event.active %} + <div class="col-md-6"> + <h2><a name="currentAKs">{% trans "Current AKs" %}:</a></h2> + {% with akslots_now as slots %} + {% include "AKPlan/slots_table.html" %} + {% endwith %} + </div> - <div class="col-md-6"> - <h2><a name="currentAKs">{% trans "Next AKs" %}:</a></h2> - {% with akslots_next as slots %} - {% include "AKPlan/slots_table.html" %} - {% endwith %} + <div class="col-md-6"> + <h2><a name="currentAKs">{% trans "Next AKs" %}:</a></h2> + {% with akslots_next as slots %} + {% include "AKPlan/slots_table.html" %} + {% endwith %} + </div> + {% else %} + <div class="col-md-12"> + <div class="alert alert-warning"> + <p class="mb-0">{% trans "This event is not active." %}</p> + </div> + </div> + {% endif %} + + <div class="col-md-12"> + <div id="planCalendar" style="margin-top:30px;"></div> </div> {% else %} <div class="col-md-12"> <div class="alert alert-warning"> - <p class="mb-0">{% trans "This event is not active." %}</p> + <p class="mb-0">{% trans "Plan is not visible (yet)." %}</p> </div> </div> {% endif %} - - <div class="col-md-12"> - <div id="planCalendar" style="margin-top:30px;"></div> - </div> </div> {% endtimezone %} {% endblock %} diff --git a/AKPlan/templates/AKPlan/plan_room.html b/AKPlan/templates/AKPlan/plan_room.html index 75966d9642f4ccb756db87e7aecc536b1a264299..ab56ba1e672f735f03a93629b5f4b1fa6074b8bc 100644 --- a/AKPlan/templates/AKPlan/plan_room.html +++ b/AKPlan/templates/AKPlan/plan_room.html @@ -53,13 +53,19 @@ </a> {% endif %} - {% timezone event.timezone %} - <div class="row" style="margin-top:30px;clear:both;"> - <div class="col-md-12"> - <div id="planCalendar"></div> + {% if not event.plan_hidden or user.is_staff %} + {% timezone event.timezone %} + <div class="row" style="margin-top:30px;clear:both;"> + <div class="col-md-12"> + <div id="planCalendar"></div> + </div> </div> + {% endtimezone %} + {% else %} + <div class="alert alert-warning mt-3"> + <p class="mb-0">{% trans "Plan is not visible (yet)." %}</p> </div> - {% endtimezone %} + {% endif %} <table class="table table-borderless" style="margin-top: 30px;"> <tbody> diff --git a/AKPlan/templates/AKPlan/plan_track.html b/AKPlan/templates/AKPlan/plan_track.html index da292778bc12f8a09890508094f7c28161cedbf6..74c5a722cbc13e563cb03ce7c6f3fe2337cbd59e 100644 --- a/AKPlan/templates/AKPlan/plan_track.html +++ b/AKPlan/templates/AKPlan/plan_track.html @@ -45,11 +45,17 @@ <h1>Plan: {{ event }} ({% trans "Track" %}: {{ track }})</h1> - {% timezone event.timezone %} - <div class="row" style="margin-top:30px;clear: both;"> - <div class="col-md-12"> - <div id="planCalendar"></div> + {% if not event.plan_hidden or user.is_staff %} + {% timezone event.timezone %} + <div class="row" style="margin-top:30px;clear:both;"> + <div class="col-md-12"> + <div id="planCalendar"></div> + </div> </div> + {% endtimezone %} + {% else %} + <div class="alert alert-warning mt-3"> + <p class="mb-0">{% trans "Plan is not visible (yet)." %}</p> </div> - {% endtimezone %} + {% endif %} {% endblock %} diff --git a/AKPlan/views.py b/AKPlan/views.py index cf8589128a38eac4b240661110e1598a13424d89..1e9a5621fc7b1c107c744ae15dd4f4b44b549f38 100644 --- a/AKPlan/views.py +++ b/AKPlan/views.py @@ -63,7 +63,7 @@ class PlanScreenView(PlanIndexView): def get(self, request, *args, **kwargs): s = super().get(request, *args, **kwargs) # Don't show wall when event is not active -> redirect to normal schedule - if not self.event.active: + if not self.event.active or (self.event.plan_hidden and not request.user.is_staff): return redirect(reverse_lazy("plan:plan_overview", kwargs={"event_slug": self.event.slug})) return s diff --git a/AKSubmission/locale/de_DE/LC_MESSAGES/django.po b/AKSubmission/locale/de_DE/LC_MESSAGES/django.po index 29a17adde3ad122385994159f32a55def858a23e..ae0d39713bbc12010a247073f4add073df9c69e0 100644 --- a/AKSubmission/locale/de_DE/LC_MESSAGES/django.po +++ b/AKSubmission/locale/de_DE/LC_MESSAGES/django.po @@ -2,13 +2,13 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 18:41+0000\n" +"POT-Creation-Date: 2020-05-19 20:46+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -96,7 +96,7 @@ msgid "History" msgstr "Versionsgeschichte" #: AKSubmission/templates/AKSubmission/ak_detail.html:48 -#: AKSubmission/templates/AKSubmission/ak_detail.html:153 +#: AKSubmission/templates/AKSubmission/ak_detail.html:157 #: AKSubmission/templates/AKSubmission/ak_edit.html:16 #: AKSubmission/templates/AKSubmission/ak_table.html:53 msgid "Edit" @@ -149,35 +149,35 @@ msgid "Notes" msgstr "Notizen" #: AKSubmission/templates/AKSubmission/ak_detail.html:132 -msgid "When?" -msgstr "Wann?" - -#: AKSubmission/templates/AKSubmission/ak_detail.html:133 #: AKSubmission/templates/AKSubmission/akslot_delete.html:35 msgid "Duration" msgstr "Dauer" #: AKSubmission/templates/AKSubmission/ak_detail.html:134 +msgid "When?" +msgstr "Wann?" + +#: AKSubmission/templates/AKSubmission/ak_detail.html:135 msgid "Room" msgstr "Raum" -#: AKSubmission/templates/AKSubmission/ak_detail.html:156 +#: AKSubmission/templates/AKSubmission/ak_detail.html:160 msgid "Delete" msgstr "Löschen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:168 +#: AKSubmission/templates/AKSubmission/ak_detail.html:172 msgid "Add another slot" msgstr "Einen neuen AK-Slot hinzufügen" -#: AKSubmission/templates/AKSubmission/ak_detail.html:172 +#: AKSubmission/templates/AKSubmission/ak_detail.html:176 msgid "Possible Times" msgstr "Mögliche Zeiten" -#: AKSubmission/templates/AKSubmission/ak_detail.html:176 +#: AKSubmission/templates/AKSubmission/ak_detail.html:180 msgid "Start" msgstr "Start" -#: AKSubmission/templates/AKSubmission/ak_detail.html:177 +#: AKSubmission/templates/AKSubmission/ak_detail.html:181 msgid "End" msgstr "Ende" diff --git a/AKSubmission/templates/AKSubmission/ak_detail.html b/AKSubmission/templates/AKSubmission/ak_detail.html index 4fe43b0b9dd5ab0230161300cfa03edb68ee5955..3f8506fb46f4506c7160a714ff5dc5bac3dda2c3 100644 --- a/AKSubmission/templates/AKSubmission/ak_detail.html +++ b/AKSubmission/templates/AKSubmission/ak_detail.html @@ -129,24 +129,28 @@ <table class="table"> <thead> <tr> - <th>{% trans "When?" %}</th> <th>{% trans "Duration" %}</th> - <th>{% trans "Room" %}</th> + {% if not ak.event.plan_hidden or user.is_staff %} + <th>{% trans "When?" %}</th> + <th>{% trans "Room" %}</th> + {% endif %} <th></th> </tr> </thead> <tbody> {% for slot in ak.akslot_set.all %} <tr> - <td>{{ slot.start_simplified }}</td> <td>{{ slot.duration }}</td> - <td> - {% if "AKPlan"|check_app_installed and slot.room %} - <a href="{% url 'plan:plan_room' event_slug=ak.event.slug pk=slot.room.pk %}">{{ slot.room }}</a> - {% else %} - {{ slot.room }} - {% endif %} - </td> + {% if not ak.event.plan_hidden or user.is_staff %} + <td>{{ slot.start_simplified }}</td> + <td> + {% if "AKPlan"|check_app_installed and slot.room %} + <a href="{% url 'plan:plan_room' event_slug=ak.event.slug pk=slot.room.pk %}">{{ slot.room }}</a> + {% else %} + {{ slot.room }} + {% endif %} + </td> + {% endif %} <td> {% if not slot.start %} <a href="{% url 'submit:akslot_edit' event_slug=ak.event.slug pk=slot.pk %}"