Skip to content

Commit

Permalink
use blur and hide popover
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrindt committed Jan 3, 2025
1 parent c5118b1 commit 7c75e74
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 77 deletions.
3 changes: 3 additions & 0 deletions ephios/core/models/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class ShowParticipantDataChoices(models.IntegerChoices):
color = CharField(_("color"), max_length=7, default="#343a40")
show_participant_data = models.SmallIntegerField(
verbose_name=_("show participant data"),
help_text=_(
"If you restrict who can see participant data, others will only be able to see that there is a participation, but not from whom."
),
choices=ShowParticipantDataChoices.choices,
default=ShowParticipantDataChoices.EVERYONE,
)
Expand Down
107 changes: 61 additions & 46 deletions ephios/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-22 12:25+0100\n"
"PO-Revision-Date: 2024-12-22 12:27+0100\n"
"POT-Creation-Date: 2025-01-03 20:07+0100\n"
"PO-Revision-Date: 2025-01-03 20:08+0100\n"
"Last-Translator: Felix Rindt <[email protected]>\n"
"Language-Team: German <https://hosted.weblate.org/projects/ephios/ephios/de/"
">\n"
Expand Down Expand Up @@ -50,11 +50,11 @@ msgstr "Token ist zu alt, um angezeigt werden zu können."
msgid "Token was revoked."
msgstr "Token wurde entfernt."

#: ephios/api/filters.py:44 ephios/core/models/events.py:289
#: ephios/api/filters.py:44 ephios/core/models/events.py:292
msgid "start time"
msgstr "Beginn"

#: ephios/api/filters.py:45 ephios/core/models/events.py:290
#: ephios/api/filters.py:45 ephios/core/models/events.py:293
msgid "end time"
msgstr "Ende"

Expand All @@ -69,8 +69,8 @@ msgid "start time less than equals (deprecated, use start_time_before instead)"
msgstr ""
"Startzeit kleiner-gleich (deprecated, stattdessen start_time_before nutzen)"

#: ephios/api/filters.py:61 ephios/core/models/events.py:64
#: ephios/core/models/events.py:76 ephios/core/views/event.py:60
#: ephios/api/filters.py:61 ephios/core/models/events.py:65
#: ephios/core/models/events.py:77 ephios/core/views/event.py:60
msgid "event type"
msgstr "Veranstaltungstyp"

Expand Down Expand Up @@ -866,17 +866,17 @@ msgstr "Ausbildung"

#: ephios/core/models/events.py:51
msgid "to everyone"
msgstr "jedem"
msgstr "alle Personen"

#: ephios/core/models/events.py:52
msgid "to confirmed participants"
msgstr "bestätigten Teilnehmenden"
msgstr "bestätigte Teilnehmende"

#: ephios/core/models/events.py:53
msgid "only to responsible users"
msgstr "nur verantwortlichen Personen"
msgstr "nur verantwortliche Personen"

#: ephios/core/models/events.py:55 ephios/core/models/events.py:73
#: ephios/core/models/events.py:55 ephios/core/models/events.py:74
#: ephios/core/models/users.py:247 ephios/core/models/users.py:274
msgid "title"
msgstr "Titel"
Expand All @@ -887,133 +887,141 @@ msgstr "Farbe"

#: ephios/core/models/events.py:58
msgid "show participant data"
msgstr "Zeige Teilnehmendeninformationen"
msgstr "Teilnehmendeninformationen sichtbar machen für"

#: ephios/core/models/events.py:65
#: ephios/core/models/events.py:59
msgid ""
"If you restrict who can see participant data, others will only be able to "
"see that there is a participation, but not from whom."
msgstr ""
"Wenn Sie dies einschränken, werden andere nur sehen, dass es eine Teilnahme "
"gibt, aber nicht von wem."

#: ephios/core/models/events.py:66
msgid "event types"
msgstr "Veranstaltungstypen"

#: ephios/core/models/events.py:74
#: ephios/core/models/events.py:75
msgid "description"
msgstr "Beschreibung"

#: ephios/core/models/events.py:75
#: ephios/core/models/events.py:76
msgid "location"
msgstr "Ort"

#: ephios/core/models/events.py:77
#: ephios/core/models/events.py:78
msgid "active"
msgstr "aktiv"

#: ephios/core/models/events.py:83 ephios/core/models/events.py:286
#: ephios/core/models/events.py:84 ephios/core/models/events.py:289
msgid "event"
msgstr "Veranstaltung"

#: ephios/core/models/events.py:84
#: ephios/core/models/events.py:85
msgid "events"
msgstr "Veranstaltungen"

#: ephios/core/models/events.py:205
#: ephios/core/models/events.py:208
msgid "requested"
msgstr "angefragt"

#: ephios/core/models/events.py:206 ephios/core/views/event.py:87
#: ephios/core/models/events.py:209 ephios/core/views/event.py:87
msgid "confirmed"
msgstr "bestätigt"

#: ephios/core/models/events.py:207
#: ephios/core/models/events.py:210
msgid "declined by user"
msgstr "abgesagt durch helfende Person"

#: ephios/core/models/events.py:208
#: ephios/core/models/events.py:211
msgid "rejected by responsible"
msgstr "abgelehnt durch verantwortliche Person"

#: ephios/core/models/events.py:209
#: ephios/core/models/events.py:212
msgid "getting dispatched"
msgstr "in Zuteilung"

#: ephios/core/models/events.py:222 ephios/core/models/events.py:310
#: ephios/core/models/events.py:225 ephios/core/models/events.py:313
msgid "shift"
msgstr "Schicht"

#: ephios/core/models/events.py:225
#: ephios/core/models/events.py:228
msgid "state"
msgstr "Status"

#: ephios/core/models/events.py:228
#: ephios/core/models/events.py:231
msgid "Data on where this participation lives in the shift structure"
msgstr "Daten zur Positionierung der Teilnahme in der Schicht-Struktur"

#: ephios/core/models/events.py:234
#: ephios/core/models/events.py:237
msgid "individual start time"
msgstr "Individueller Beginn"

#: ephios/core/models/events.py:235
#: ephios/core/models/events.py:238
msgid "individual end time"
msgstr "Individuelles Ende"

#: ephios/core/models/events.py:238
#: ephios/core/models/events.py:241
msgid "Comment"
msgstr "Kommentar"

#: ephios/core/models/events.py:244
#: ephios/core/models/events.py:247
msgid "finished"
msgstr "abgeschlossen"

#: ephios/core/models/events.py:288
#: ephios/core/models/events.py:291
msgid "meeting time"
msgstr "Treffpunkt"

#: ephios/core/models/events.py:292
#: ephios/core/models/events.py:295
msgctxt "shift label"
msgid "label"
msgstr "Label"

#: ephios/core/models/events.py:295
#: ephios/core/models/events.py:298
msgid "Optional label to help differentiate multiple shifts in an event."
msgstr ""
"Optionales Label zur Unterscheidung mehrerer Schichten einer Veranstaltung."

#: ephios/core/models/events.py:297
#: ephios/core/models/events.py:300
msgid "signup flow"
msgstr "Anmeldeverfahren"

#: ephios/core/models/events.py:302
#: ephios/core/models/events.py:305
msgid "structure"
msgstr "Struktur"

#: ephios/core/models/events.py:311
#: ephios/core/models/events.py:314
msgid "shifts"
msgstr "Schichten"

#: ephios/core/models/events.py:428
#: ephios/core/models/events.py:431
#: ephios/core/templates/core/fragments/shift_box_small.html:26
msgid "Signup flow"
msgstr "Anmeldeverfahren"

#: ephios/core/models/events.py:429
#: ephios/core/models/events.py:432
#: ephios/core/templates/core/shift_form.html:46
msgid "Structure"
msgstr "Struktur"

#: ephios/core/models/events.py:442
#: ephios/core/models/events.py:445
msgid "Participant"
msgstr "Teilnehmende Person"

#: ephios/core/models/events.py:463
#: ephios/core/models/events.py:466
msgid "participation"
msgstr "Teilnahme"

#: ephios/core/models/events.py:464
#: ephios/core/models/events.py:467
msgid "participations"
msgstr "Teilnahmen"

#: ephios/core/models/events.py:489
#: ephios/core/models/events.py:492
msgid "placeholder participation"
msgstr "Platzhalter-Teilnahme"

#: ephios/core/models/events.py:490
#: ephios/core/models/events.py:493
msgid "placeholder participations"
msgstr "Platzhalter-Teilnahmen"

Expand Down Expand Up @@ -1928,7 +1936,7 @@ msgid "%(participant)s already participates in %(conflicts)s at the same time."
msgstr "%(participant)s nimmt zur selben Zeit bereits an %(conflicts)s teil."

#: ephios/core/templates/core/disposition/fragment_participation.html:25
#: ephios/plugins/baseshiftstructures/templates/baseshiftstructures/participation_card_inline.html:33
#: ephios/plugins/baseshiftstructures/templates/baseshiftstructures/participation_card_inline.html:29
msgid "Minor"
msgstr "Minderjährig"

Expand Down Expand Up @@ -3342,9 +3350,10 @@ msgstr "Team hinzufügen"
msgid "prefers"
msgstr "bevorzugt"

#: ephios/plugins/baseshiftstructures/templates/baseshiftstructures/participation_card_inline.html:11
msgid "Anonymous"
msgstr "Anonym"
#: ephios/plugins/baseshiftstructures/templates/baseshiftstructures/participation_card_inline.html:65
msgctxt "blurred participant name"
msgid "Redacted Name"
msgstr "Zensierter Name"

#: ephios/plugins/basesignupflows/apps.py:10
msgid "Base Signup Flows"
Expand Down Expand Up @@ -4781,6 +4790,12 @@ msgstr "Passwort erfolgreich zurückgesetzt"
msgid "Please check your mailbox for further instructions."
msgstr "Bitte prüfen Sie Ihren E-Mail-Posteingang für weitere Anweisungen."

#~ msgid "Everyone else will only be able to see anonymized data."
#~ msgstr "Jeder andere wird nur anonymisierte Daten sehen."

#~ msgid "Anonymous"
#~ msgstr "Anonym"

#~ msgid "Show"
#~ msgstr "Anzeigen"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,53 @@
{% load user_extras %}
{% load i18n %}

{% if participation.show_participant_data %}

<div id="participant-popover-title-{{ participation.id }}" class="d-none">
<span class="text-dark pe-1">{{ participation.participant.icon }}</span>
{% if participation.show_participant_data %}
<div id="participant-popover-title-{{ participation.id }}" class="d-none">
<span class="text-dark pe-1">{{ participation.participant.icon }}</span>
{{ participation.participant }}
{% else %}
{% translate "Anonymous" %}
{% endif %}
</div>
</div>

<div id="participant-popover-content-{{ participation.id }}" class="d-none">
{% if participation.individual_start_time or participation.individual_end_time %}
<div class="mb-3">
<i class="fas fa-user-clock"></i>
<strong>{{ participation.get_time_display }}</strong>
</div>
{% endif %}
{% if participation.comment %}
{% if show_comments or participation == own_participation %}
<div id="participant-popover-content-{{ participation.id }}" class="d-none">
{% if participation.individual_start_time or participation.individual_end_time %}
<div class="mb-3">
<i class="fas fa-comment"></i>
<span>{{ participation.comment }}</span>
<i class="fas fa-user-clock"></i>
<strong>{{ participation.get_time_display }}</strong>
</div>
{% endif %}
{% endif %}
<div>
{% if participation.show_participant_data %}
{% if participation.comment %}
{% if show_comments or participation == own_participation %}
<div class="mb-3">
<i class="fas fa-comment"></i>
<span>{{ participation.comment }}</span>
</div>
{% endif %}
{% endif %}
<div>
{% if participation.participant.is_minor %}
<span class="badge bg-warning">{% translate "Minor" %}</span>
{% endif %}
{% for abbreviation in participation.participant.qualifications|qualifications_to_essential_abbreviations %}
<span class='badge bg-secondary text-dark'>{{ abbreviation }}</span>
{% endfor %}
{% endif %}
</div>
</div>
</div>
{% endif %}


<a class="badge badge-participant
{% if participation.state == participation.States.CONFIRMED %}bg-secondary text-dark{% else %}bg-light text-body-secondary{% endif %}
{% if participation.participant.is_minor %}participation-card-minor{% endif %}
"
tabindex="0"
data-bs-toggle="popover"
data-bs-trigger="hover"
data-bs-placement="bottom"
data-html="true"
data-bs-title-ref="#participant-popover-title-{{ participation.id }}"
data-bs-content-ref="#participant-popover-content-{{ participation.id }}"
{% if participation.show_participant_data %}
data-bs-toggle="popover"
data-bs-trigger="hover"
data-bs-placement="bottom"
data-html="true"
data-bs-title-ref="#participant-popover-title-{{ participation.id }}"
data-bs-content-ref="#participant-popover-content-{{ participation.id }}"
{% endif %}
>
{% if participation.state == participation.States.CONFIRMED %}
{% if participation.has_customized_signup %}
Expand All @@ -63,6 +62,6 @@
{% if participation.show_participant_data %}
{{ participation.participant }}
{% else %}
<i class="fas fa-user-secret px-1"></i>
<span class="participant-anon">{% translate "Redacted Name" context "blurred participant name" %}</span>
{% endif %}
</a>
7 changes: 6 additions & 1 deletion ephios/static/ephios/scss/ephios_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ footer {
}


/* mannequins */
/* event detail and mannequin */

.participant-anon {
filter: blur(3px);
padding-left: 0.1rem;
}

.mannequin {
border-radius: $card-border-radius;
Expand Down

0 comments on commit 7c75e74

Please sign in to comment.