123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- {% extends "misago/admin/generic/list.html" %}
- {% load i18n %}
- {% block page-actions %}
- <div class="page-actions">
- <a href="{% url 'misago:admin:users:warnings:new' %}" class="btn btn-success">
- <span class="fa fa-plus-circle"></span>
- {% trans "New level" %}
- </a>
- </div>
- {% endblock %}
- {% block table-header %}
- <th>{% trans "Warning level" %}</th>
- <th style="width: 20%">{% trans "Length" %}</th>
- <th style="width: 20%;">{% trans "Replying" %}</th>
- <th style="width: 20%;">{% trans "Starting threads" %}</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>
- <th style="width: 1%;"> </th>
- {% endblock table-header %}
- {% block table-row %}
- <td class="item-name">
- #{{ forloop.counter }} {{ item }}
- </td>
- <td>{{ item.length }}</td>
- <td>
- {% if item.restricts_posting_replies == 0 %}
- <div class="text-success">
- <span class="fa fa-check-circle"></span>
- {% trans "Not restricted" %}
- </div>
- {% elif item.restricts_posting_replies == 1 %}
- <div class="text-warning">
- <span class="fa fa-exclamation-circle"></span>
- {% trans "Moderated" %}
- </div>
- {% else %}
- <div class="text-danger">
- <span class="fa fa-times-circle"></span>
- {% trans "Forbidden" %}
- </div>
- {% endif %}
- </td>
- <td>
- {% if item.restricts_posting_threads == 0 %}
- <div class="text-success">
- <span class="fa fa-check-circle"></span>
- {% trans "Not restricted" %}
- </div>
- {% elif item.restricts_posting_threads == 1 %}
- <div class="text-warning">
- <span class="fa fa-exclamation-circle"></span>
- {% trans "Moderated" %}
- </div>
- {% else %}
- <div class="text-danger">
- <span class="fa fa-times-circle"></span>
- {% trans "Forbidden" %}
- </div>
- {% endif %}
- </td>
- {% for action in extra_actions %}
- <td class="row-action">
- <a href="{% url action.link rank_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">
- {% if not forloop.last %}
- <form action="{% url 'misago:admin:users:warnings:down' warning_id=item.id %}" method="post">
- <button class="btn btn-default tooltip-top" title="{% trans "Move down" %}">
- {% csrf_token %}
- <span class="fa fa-chevron-down"></span>
- </button>
- </form>
- {% else %}
-
- {% endif %}
- </td>
- <td class="row-action">
- {% if not forloop.first %}
- <form action="{% url 'misago:admin:users:warnings:up' warning_id=item.id %}" method="post">
- <button class="btn btn-default tooltip-top" title="{% trans "Move up" %}">
- {% csrf_token %}
- <span class="fa fa-chevron-up"></span>
- </button>
- </form>
- {% else %}
-
- {% endif %}
- </td>
- <td class="row-action">
- <a href="{% url 'misago:admin:users:warnings:edit' warning_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:users:warnings:delete' warning_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="{{ 8|add:extra_actions_len }}">
- <p>{% trans "No warning levels 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 warning level?" %}");
- return decision;
- });
- });
- </script>
- {% endblock %}
|