Create datatable based on dataTable class instead of table class

master
DjVinnii 4 years ago
parent 0984173504
commit e963e7495d

@ -11,7 +11,7 @@ jQuery("document").ready(function() {
tags: true, tags: true,
tokenSeparators: [',', ' '] tokenSeparators: [',', ' ']
}); });
jQuery(".table").DataTable({ jQuery(".dataTable").DataTable({
"responsive": true, "responsive": true,
}); });
}); });

@ -9,8 +9,7 @@ configure your email client
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% call macros.card(title="Incoming mail") %} {% call macros.table(title="Incoming mail", datatable=False) %}
<table class="table table-bordered">
<tbody> <tbody>
<tr> <tr>
<th>{% trans %}Mail protocol{% endtrans %}</th> <th>{% trans %}Mail protocol{% endtrans %}</th>
@ -33,11 +32,9 @@ configure your email client
<td><pre>*******</pre></td> <td><pre>*******</pre></td>
</tr> </tr>
</tbody> </tbody>
</table>
{% endcall %} {% endcall %}
{% call macros.card(title="Outgoing mail") %} {% call macros.table(title="Outgoing mail", datatable=False) %}
<table class="table table-bordered">
<tbody> <tbody>
<tr> <tr>
<th>{% trans %}Mail protocol{% endtrans %}</th> <th>{% trans %}Mail protocol{% endtrans %}</th>
@ -60,6 +57,5 @@ configure your email client
<td><pre>*******</pre></td> <td><pre>*******</pre></td>
</tr> </tr>
</tbody> </tbody>
</table>
{% endcall %} {% endcall %}
{% endblock %} {% endblock %}

@ -21,7 +21,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% call macros.table() %} {% call macros.table(datatable=False) %}
{% set hostname = config["HOSTNAMES"].split(",")[0] %} {% set hostname = config["HOSTNAMES"].split(",")[0] %}
<tr> <tr>
<th>{% trans %}Domain name{% endtrans %}</th> <th>{% trans %}Domain name{% endtrans %}</th>

@ -83,14 +83,17 @@
</div> </div>
{% endmacro %} {% endmacro %}
{% macro table(theme="primary") %} {% macro table(title=None, theme="primary", datatable=True) %}
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card card-outline card-{{ theme }}"> <div class="card card-outline card-{{ theme }}">
<div class="card-header border-0"> <div class="card-header border-0">
{% if title %}
<h3 class="card-title">{{ title }}</h3>
{% endif %}
</div> </div>
<div class="card-body"> <div class="card-body">
<table class="table table-bordered"> <table class="table table-bordered {% if datatable %} dataTable {% endif %}">
{{ caller() }} {{ caller() }}
</table> </table>
</div> </div>

Loading…
Cancel
Save