blob: 79b5ea161210920eb61287b9d25cd6a652e6e03b [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001{% extends 'base.twig' %}
2
3{% block content %}
4<div class="row">
5 <div class="col-md-12">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +01006 <div class="card card-xs-lg">
7 <div class="card-header d-flex">
8 {{ lang.quarantine.quarantine }} <span class="badge bg-info table-lines"></span>
9 <div class="btn-group ms-auto">
10 <button class="btn btn-xs btn-xs-lg btn-secondary refresh_table" data-draw="draw_quarantine_table" data-table="quarantinetable">{{ lang.quarantine.refresh }}</button>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010011 </div>
12 </div>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010013 <div class="card-body">
14 <div class="mass-actions-quarantine mb-4">
15 <div class="btn-group" data-acl="{{ acl.quarantine }}">
16 <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary" id="toggle_multi_select_all" data-id="qitems" href="#"><i class="bi bi-check-all"></i> {{ lang.quarantine.toggle_all }}</a>
17 <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary dropdown-toggle" data-bs-toggle="dropdown" href="#">{{ lang.quarantine.quick_actions }}</a>
18 <ul class="dropdown-menu">
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010019 <li class="table_collapse_option"><a class="dropdown-item" data-datatables-expand="quarantinetable" data-table="quarantinetable" href="#">{{ lang.datatables.expand_all }}</a></li>
20 <li class="table_collapse_option"><a class="dropdown-item" data-datatables-collapse="quarantinetable" data-table="quarantinetable" href="#">{{ lang.datatables.collapse_all }}</a></li>
21 <li class="table_collapse_option"><hr class="dropdown-divider"></li>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010022 <li><a class="dropdown-item" data-action="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"release"}' href="#">{{ lang.quarantine.deliver_inbox }}</a></li>
23 <li><hr class="dropdown-divider"></li>
24 <li><a class="dropdown-item" data-action="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"learnspam"}' href="#">{{ lang.quarantine.learn_spam_delete }}</a></li>
25 <li><hr class="dropdown-divider"></li>
26 <li><a class="dropdown-item" data-action="delete_selected" data-id="qitems" data-api-url='delete/qitem' href="#">{{ lang.quarantine.remove }}</a></li>
27 </ul>
28 </div>
29 </div>
30 <p class="text-muted">{{ lang.quarantine.qinfo|raw }}</p>
31 <p>
32 {% if not quarantine_settings.retention_size or not quarantine_settings.max_size %}
33 <div class="alert alert-info">{{ lang.quarantine.disabled_by_config }}</div>
34 {% else %}
35 <p style="margin:10px" class="text-muted">
36 {{ lang.quarantine.settings_info|format(quarantine_settings.retention_size, quarantine_settings.max_size)|raw }}
37 </p>
38 {% endif %}
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010039 </p>
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010040 <table id="quarantinetable" class="table table-striped w-100"></table>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010041 <div class="mass-actions-quarantine mt-4">
42 <div class="btn-group" data-acl="{{ acl.quarantine }}">
43 <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary" id="toggle_multi_select_all" data-id="qitems" href="#"><i class="bi bi-check-all"></i> {{ lang.quarantine.toggle_all }}</a>
44 <a class="btn btn-sm btn-xs-half d-block d-sm-inline btn-secondary dropdown-toggle" data-bs-toggle="dropdown" href="#">{{ lang.quarantine.quick_actions }}</a>
45 <ul class="dropdown-menu">
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010046 <li class="table_collapse_option"><a class="dropdown-item" data-datatables-expand="quarantinetable" data-table="quarantinetable" href="#">{{ lang.datatables.expand_all }}</a></li>
47 <li class="table_collapse_option"><a class="dropdown-item" data-datatables-collapse="quarantinetable" data-table="quarantinetable" href="#">{{ lang.datatables.collapse_all }}</a></li>
48 <li class="table_collapse_option"><hr class="dropdown-divider"></li>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010049 <li><a class="dropdown-item" data-action="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"release"}' href="#">{{ lang.quarantine.deliver_inbox }}</a></li>
50 <li><hr class="dropdown-divider"></li>
51 <li><a class="dropdown-item" data-action="edit_selected" data-id="qitems" data-api-url='edit/qitem' data-api-attr='{"action":"learnspam"}' href="#">{{ lang.quarantine.learn_spam_delete }}</a></li>
52 <li><hr class="dropdown-divider"></li>
53 <li><a class="dropdown-item" data-action="delete_selected" data-id="qitems" data-api-url='delete/qitem' href="#">{{ lang.quarantine.remove }}</a></li>
54 </ul>
55 </div>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010056 </div>
57 </div>
58 </div>
59 </div> <!-- /col-md-12 -->
60</div> <!-- /row -->
61
62{% include 'modals/quarantine.twig' %}
63
64<script type='text/javascript'>
65var acl = '{{ acl_json|raw }}';
66var lang = {{ lang_quarantine|raw }};
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010067var lang_datatables = {{ lang_datatables|raw }};
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010068var csrf_token = '{{ csrf_token }}';
Matthias Andreas Benkardd1f5b682023-11-18 13:18:30 +010069var pagination_size = Math.trunc('{{ pagination_size }}');
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010070var role = '{{ role }}';
71</script>
72{% endblock %}