63 lines
3.6 KiB
Twig
63 lines
3.6 KiB
Twig
{# This partial template renders a table of organisations, to be populated with rows via an AJAX request.
|
|
# This extends a generic template for paginated tables.
|
|
#
|
|
# Note that this template contains a "skeleton" table with an empty table body, and then a block of Handlebars templates which are used
|
|
# to render the table cells with the data from the AJAX request.
|
|
#}
|
|
|
|
{% extends "tables/table-paginated.html.twig" %}
|
|
|
|
{% block table %}
|
|
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
|
<thead>
|
|
<tr>
|
|
<th class="sorter-metatext filter-metatext" data-column-name="name" data-column-template="#{{table.id}}-column-info" data-priority="1">{{translate('ORGANISATION')}} <i class="fas fa-sort"></i></th>
|
|
{% if 'description' in table.columns %}
|
|
<th class="sorter-metatext filter-metatext" data-column-name="description" data-column-template="#{{table.id}}-column-description" data-priority="2">{{translate("DESCRIPTION")}} <i class="fas fa-sort"></i></th>
|
|
{% endif %}
|
|
{% if 'status' in table.columns %}
|
|
<th class="filter-select filter-metatext" data-column-name="status" data-column-template="#{{table.id}}-column-status" data-priority="2">{{translate("STATUS")}} <i class="fas fa-sort"></i></th>
|
|
{% endif %}
|
|
{% if checkAccess('view_organisation_members') %}
|
|
<th class="sorter-metanum" data-column-name="member_count" data-column-template="#{{table.id}}-column-memberCount" data-priority="2" style="min-width: 180px">{{translate("ORGANISATION.MEMBER_COUNT")}} <i class="fas fa-sort"></i></th>
|
|
<th class="sorter-metanum" data-column-name="admin_count" data-column-template="#{{table.id}}-column-adminCount" data-priority="2">{{translate("ORGANISATION.ADMIN_COUNT")}} <i class="fas fa-sort"></i></th>
|
|
{% endif %}
|
|
{% if 'join' in table.columns %}
|
|
<th data-column-template="#{{table.id}}-column-join" data-column-name="join" data-sorter="false" data-filter="false" data-priority="3">{{translate("JOIN")}}/{{translate("LEAVE")}}</th>
|
|
{% endif %}
|
|
{% if 'actions' in table.columns %}
|
|
<th data-column-template="#{{table.id}}-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|
|
|
|
{% block table_cell_templates %}
|
|
{% block table_organisations_column_info %}
|
|
{% include "tables/columns/organisations-info.html.twig" %}
|
|
{% endblock %}
|
|
{% block table_organisations_column_description %}
|
|
{% include "tables/columns/organisations-description.html.twig" %}
|
|
{% endblock %}
|
|
{% block table_organisations_column_status %}
|
|
{% include "tables/columns/organisations-status.html.twig" %}
|
|
{% endblock %}
|
|
{% block table_organisations_column_member_count %}
|
|
{% include "tables/columns/organisations-member_count.html.twig" %}
|
|
{% endblock %}
|
|
{% block table_organisations_column_admin_count %}
|
|
{% include "tables/columns/organisations-admin_count.html.twig" %}
|
|
{% endblock %}
|
|
{% block table_organisations_column_join %}
|
|
{% include "tables/columns/organisations-join.html.twig" %}
|
|
{% endblock %}
|
|
{% block table_organisations_column_actions %}
|
|
{% include "tables/columns/organisations-actions.html.twig" %}
|
|
{% endblock %}
|
|
{% endblock %}
|
|
|
|
|