Skip to content

Commit

Permalink
Add labels for registered users in events
Browse files Browse the repository at this point in the history
Indicate if the user is attendee, installer, etc. when viewing an event.
Closes #288.
  • Loading branch information
HacKanCuBa committed Apr 6, 2018
1 parent ef4a53c commit 8129509
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eventol/manager/templates/event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
<div class="row" style="text-align: center">
<div class="col-sm-12">
<h1>{{ event.name }}</h1>
{# show informative tags regarding user inscription to the event #}
{% if user.is_authenticated and user|is_registered:event_uid %}
<p>
<span class="label label-default">{% trans 'I am' %}</span>
{% if user|is_organizer:event_uid %}<span class="label label-warning">{% trans 'Organizer' %}</span>{% endif %}
{% if user|is_attendee:event_uid %}<span class="label label-info">{% trans 'Attendee' %}</span>{% endif %}
{% if user|is_collaborator:event_uid %}<span class="label label-primary">{% trans 'Collaborator' %}</span>{% endif %}
{% if user|is_installer:event_uid %}<span class="label label-success">{% trans 'Installer' %}</span>{% endif %}
</p>
{% endif %}
</div>
</div>
<div class="row" style="text-align: center">
Expand Down

0 comments on commit 8129509

Please sign in to comment.