Skip to content

Commit

Permalink
Use filter add_room_links in templates
Browse files Browse the repository at this point in the history
Replace usage of the room_links tag with the new add_room_links filter.
  • Loading branch information
donald committed Aug 13, 2020
1 parent 93bccb1 commit 1a2d8fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mpicms/templates/base/blocks/contact_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% if value.contact.room %}
<tr>
<td><i class="fas fa-building"></i></td>
<td><a href="{% room_link value.contact.room %}">{{ value.contact.room }}</td>
<td>{{ value.contact.room | add_room_links }}</td>
</tr>
{% endif %}
</table>
Expand Down
8 changes: 4 additions & 4 deletions mpicms/templates/events/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ <h2 class="title is-2">{{ page.title }}</h2>


{% if page.room %}
<a href="{% room_link page.room %}" class="tag is-medium">
<div class="tag is-medium">
<i class="fa fa-building"></i>
{{ page.room }}
</a>
{{ page.room | add_room_links }}
</div>
{% endif %}

</div>
Expand All @@ -58,4 +58,4 @@ <h2 class="title is-2">{{ page.title }}</h2>
</p>
</div>
</div>
{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion mpicms/templates/personal/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h1 class="title has-text-centered">{% trans 'Contact List' %}</h1>
<td class="last_name">{{ contact.last_name }}</td>
<td class="email"><a href="mailto:{{ contact.email }}">{{ contact.email }}</a></td>
<td class="phone">{{ contact.phone }}</td>
<td class="room"><a href="{% room_link contact.room %}">{{ contact.room }}</a></td>
<td class="room">{{ contact.room | add_room_links }}</td>
<td class="positions">{% for contactposition in contact.positions.all %}{{ contactposition.position }}<br>{% endfor %}</td>
<td class="groups">{% for contactgroup in contact.groups.all %}{{ contactgroup.group }}<br>{% endfor %}</td>
</tr>
Expand Down

0 comments on commit 1a2d8fb

Please sign in to comment.