12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- {% extends "misago/admin/generic/list.html" %}
- {% load i18n %}
- {% block page-actions %}
- <div class="page-actions">
- <a href="{% url 'misago:admin:forums:labels:new' %}" class="btn btn-success">
- <span class="fa fa-plus-circle"></span>
- {% trans "New label" %}
- </a>
- </div>
- {% endblock %}
- {% block table-header %}
- <th>{% trans "Label" %}</th>
- <th style="width: 40%;">{% trans "CSS class" %}</th>
- {% for action in extra_actions %}
- <th style="width: 1%;"> </th>
- {% endfor %}
- <th style="width: 1%;"> </th>
- <th style="width: 1%;"> </th>
- {% endblock table-header %}
- {% block table-row %}
- <td class="item-name">
- {{ item }}
- </td>
- <td>{% if item.css_class %}{{ item.css_class }}{% else %} {% endif %}</td>
- {% for action in extra_actions %}
- <td class="row-action">
- <a href="{% url action.link label_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:forums:labels:edit' label_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:forums:labels:delete' label_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 thread labels 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 label?" %}");
- return decision;
- });
- });
- </script>
- {% endblock %}
|