Add links to user page in events

This commit is contained in:
Tom Price
2015-05-29 01:32:07 +01:00
parent 346ee19862
commit e0f80c38fc
2 changed files with 16 additions and 2 deletions

View File

@@ -109,7 +109,15 @@
{% if event.is_rig %}
<dt>Event MIC</dt>
<dd>{{ event.mic.name }}</dd>
<dd>
{% if perms.RIGS.view_profile %}
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
{{ event.mic.name }}
</a>
{% else %}
{{ event.mic.name }}
{% endif %}
</dd>
{% endif %}
<dt>Status</dt>

View File

@@ -83,7 +83,13 @@
{% if event.mic %}
{{ event.mic.initials }}
<div>
<img src="{{ event.mic.profile_picture }}" class="event-mic-photo"/>
{% if perms.RIGS.view_profile %}
<a href="{% url 'profile_detail' event.mic.pk %}" class="modal-href">
<img src="{{ event.mic.profile_picture }}" class="event-mic-photo"/>
</a>
{% else %}
<img src="{{ event.mic.profile_picture }}" class="event-mic-photo"/>
{% endif %}
</div>
{% elif event.is_rig %}
<span class="glyphicon glyphicon-exclamation-sign"></span>