Fixed permissions for action columns.

This commit is contained in:
Emanuel Schuetze 2012-04-20 22:58:57 +02:00
parent f711f96265
commit f1908bca89
2 changed files with 19 additions and 11 deletions

View File

@ -19,16 +19,22 @@
{% endif %}
<a href="{{ item.get_absolute_url }}">{{ item }}</a>
</td>
{% if perms.agenda.can_manage_agenda %}
{% if perms.agenda.can_manage_agenda or perms.projector.can_manage_projector %}
<td>
<span style="width: 1px; white-space: nowrap;">
{% if perms.projector.can_manage_projector %}
<a class="activate_link {% if item.active %}active{% endif %}" href="{% url projector_activate_slide item.sid %}" title="{% trans 'Activate item' %}">
<span></span>
</a>
{% endif %}
{% if perms.agenda.can_manage_agenda %}
<a href="{% url item_edit item.id %}"><img src="{% static 'images/icons/document-edit.png' %}" title="{% trans 'Edit item' %}"></a>
<a href="{% url item_delete item.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete item' %}"></a>
{% endif %}
</span>
</td>
{% endif %}
{% if perms.agenda.can_manage_agenda %}
<td class="tabledrag-hide">
{% with form=item.weight_form %}
{{ form.weight }}

View File

@ -62,10 +62,12 @@
<td>{{ application.creation_time }}</td>
<td>
<span style="width: 1px; white-space: nowrap;">
{% if perms.application.can_manage_application %}
{% if perms.projector.can_manage_projector %}
<a class="activate_link {% if application.active %}active{% endif %}" href="{% url projector_activate_slide application.sid %}" title="{% trans 'Activate application' %}">
<span></span>
</a>
{% endif %}
{% if perms.application.can_manage_application %}
<a href="{% url application_edit application.id %}"><img src="{% static 'images/icons/document-edit.png' %}" title="{% trans 'Edit application' %}"></a>
<a href="#"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete application' %}"></a>
{% endif %}