1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- {% extends "misago/admin/generic/list.html" %}
- {% load i18n %}
- {% block page-actions %}
- <div class="page-actions">
- <a href="{% url 'misago:admin:permissions:users:new' %}" class="btn btn-success">
- <span class="fa fa-plus-circle"></span>
- {% trans "New role" %}
- </a>
- </div>
- {% endblock %}
- {% block table-header %}
- <th>{% trans "Role" %}</th>
- {% for action in extra_actions %}
- <th style="width: 1%;"> </th>
- {% endfor %}
- <th style="width: 1%;"> </th>
- <th style="width: 1%;"> </th>
- <th style="width: 1%;"> </th>
- {% endblock table-header %}
- {% block table-row %}
- <td class="item-name">
- {{ item }}
- </td>
- {% for action in extra_actions %}
- <td class="row-action">
- <a href="{% url action.link role_id=item.id %}" class="btn btn-{% if action.style %}{{ action.style }}{% else %}default{% endif %} tooltip-top" title="{{ action.name }}">
- <span class="{{ action.icon }}"></span>
- </a>
- </td>
- {% endfor %}
- <td class="row-action">
- <a href="{% url 'misago:admin:permissions:users:users' role_id=item.id %}" class="btn btn-primary tooltip-top" title="{% trans "Users with role" %}">
- <span class="fa fa-users"></span>
- </a>
- </td>
- <td class="row-action">
- <a href="{% url 'misago:admin:permissions:users:edit' role_id=item.id %}" class="btn btn-primary tooltip-top" title="{% trans "Edit" %}">
- <span class="fa fa-pencil"></span>
- </a>
- </td>
- <td class="row-action">
- <form action="{% url 'misago:admin:permissions:users:delete' role_id=item.id %}" method="post" class="delete-prompt">
- <button class="btn btn-danger tooltip-top" title="{% trans "Delete" %}">
- {% csrf_token %}
- <span class="fa fa-times"></span>
- </button>
- </form>
- </td>
- {% endblock %}
- {% block emptylist %}
- <td colspan="{{ 4|add:extra_actions_len }}">
- <p>{% trans "No user roles are currently defined." %}</p>
- </td>
- {% endblock emptylist %}
- {% block javascripts %}
- <script type="text/javascript">
- $(function() {
- $('.delete-prompt').submit(function() {
- var decision = confirm("{% trans "Are you sure you want to delete this role?" %}");
- return decision;
- });
- });
- </script>
- {% endblock %}
|