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

View File

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