123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- {% extends "misago/admin/generic/list.html" %}
- {% load i18n misago_forms %}
- {% block page-actions %}
- <div class="page-actions">
- <a href="{% url 'misago:admin:users:bans:new' %}" class="btn btn-success">
- <span class="fa fa-plus-circle"></span>
- {% trans "New ban" %}
- </a>
- </div>
- {% endblock %}
- {% block table-header %}
- <th style="width: 25%;">{% trans "Ban" %}</th>
- <th style="width: 160px;">{% trans "Type" %}</th>
- <th>{% trans "Expires on" %}</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.banned_value }}
- </td>
- <td>
- {{ item.test_name }}
- </td>
- <td>
- {% if item.expires_on %}
- {% if item.is_expired %}
- <span class="text-muted tooltip-top" title="{% trans "This ban has expired." %}">
- {{ item.expires_on|date }}
- <span class="fa fa-exclamation text-danger"></span>
- </span>
- {% else %}
- <span class="tooltip-top" title="{{ item.expires_on|date:"DATETIME_FORMAT" }}">
- {{ item.formatted_expiration_date }}
- </span>
- {% endif %}
- {% else %}
- <em>{% trans "Never" %}</em>
- {% endif %}
- </td>
- {% for action in extra_actions %}
- <td class="row-action">
- <a href="{% url action.link ban_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:users:bans:edit' ban_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:bans:delete' ban_id=item.id %}" method="post" class="delete-prompt">
- <button class="btn btn-danger tooltip-top" title="{% trans "Remove" %}">
- {% csrf_token %}
- <span class="fa fa-times"></span>
- </button>
- </form>
- </td>
- {% endblock %}
- {% block emptylist %}
- <td colspan="{{ 6|add:extra_actions_len }}">
- {% if active_filters %}
- <p>{% trans "No bans matching search criteria have been found" %}</p>
- {% else %}
- <p>{% trans "No bans are currently set." %}</p>
- {% endif %}
- </td>
- {% endblock emptylist %}
- {% block javascripts %}
- {{ block.super }}
- <script type="text/javascript">
- $(function() {
- $('.delete-prompt').submit(function() {
- var decision = confirm("{% trans "Are you sure you want to remove this ban?" %}");
- return decision;
- });
- });
- </script>
- {% endblock %}
- {% block modal-title %}
- {% trans "Search bans" %}
- {% endblock modal-title %}
- {% block modal-body %}
- <div class="row">
- <div class="col-md-6">
- {% form_row search_form.check_type %}
- </div>
- <div class="col-md-6">
- {% form_row search_form.value %}
- </div>
- </div>
- <div class="row">
- <div class="col-md-12">
- {% form_row search_form.state %}
- </div>
- </div>
- {% endblock modal-body %}
|