Removed table specific id string part and replaced it with the provided {{table.id}}
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sorter-metatext" data-column-name="name" data-column-template="#organisation-table-column-info" data-priority="1">{{translate('ORGANISATION')}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metatext" data-column-name="description" data-column-template="#organisation-table-column-description" data-priority="2">{{translate("DESCRIPTION")}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metatext" data-column-name="name" data-column-template="#{{table.id}}-column-info" data-priority="1">{{translate('ORGANISATION')}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metatext" data-column-name="description" data-column-template="#{{table.id}}-column-description" data-priority="2">{{translate("DESCRIPTION")}} <i class="fas fa-sort"></i></th>
|
||||
<th class="filter-select filter-metatext" data-column-name="status" data-column-template="#user-table-column-status" data-priority="2">{{translate("STATUS")}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metanum" data-column-name="member_count" data-column-template="#organisation-table-column-memberCount" data-priority="2">{{translate("ORGANISATION.MEMBER_COUNT")}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metanum" data-column-name="admin_count" data-column-template="#organisation-table-column-adminCount" data-priority="2">{{translate("ORGANISATION.ADMIN_COUNT")}} <i class="fas fa-sort"></i></th>
|
||||
<th data-column-template="#organisation-table-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
<th class="sorter-metanum" data-column-name="member_count" data-column-template="#{{table.id}}-column-memberCount" data-priority="2">{{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>
|
||||
<th data-column-template="#{{table.id}}-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -18,20 +18,20 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_info %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-info" type="text/x-handlebars-template">
|
||||
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td data-text="{{row.name}}">
|
||||
<strong>
|
||||
<a href="{{site.uri.public}}/organisations/o/{{row.slug}}">{{row.name}}</a>
|
||||
</strong>
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_actions %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-actions" type="text/x-handlebars-template">
|
||||
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
@@ -52,8 +52,8 @@
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_join %}{% endblock %}
|
||||
@@ -11,19 +11,19 @@
|
||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sorter-metatext" data-column-name="name" data-column-template="#organisation-table-column-info" data-priority="1">{{translate('ORGANISATION')}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metatext" data-column-name="description" data-column-template="#organisation-table-column-description" data-priority="2">{{translate("DESCRIPTION")}} <i class="fas fa-sort"></i></th>
|
||||
{% if hasRole('site-admin') or hasRole('organisations-admin') or (current_user.adminForOrganisations.count > 0) %}
|
||||
<th class="filter-select filter-metatext" data-column-name="status" data-column-template="#user-table-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="#organisation-table-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="#organisation-table-column-adminCount" data-priority="2">{{translate("ORGANISATION.ADMIN_COUNT")}} <i class="fas fa-sort"></i></th>
|
||||
{% endif %}
|
||||
<th data-column-template="#organisation-table-column-join" data-column-name="join" data-sorter="false" data-filter="false" data-priority="3">{{translate("JOIN")}}/{{translate("LEAVE")}}</th>
|
||||
{% if hasRole('site-admin') or hasRole('organisations-admin') or (current_user.adminForOrganisations.count > 0) %}
|
||||
<th data-column-template="#organisation-table-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
{% endif %}
|
||||
<th class="sorter-metatext" data-column-name="name" data-column-template="#{{table.id}}-column-info" data-priority="1">{{translate('ORGANISATION')}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metatext" data-column-name="description" data-column-template="#{{table.id}}-column-description" data-priority="2">{{translate("DESCRIPTION")}} <i class="fas fa-sort"></i></th>
|
||||
{% if hasRole('site-admin') or hasRole('organisations-admin') or (current_user.adminForOrganisations.count > 0) -%}
|
||||
<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 -%}
|
||||
<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>
|
||||
{% if hasRole('site-admin') or hasRole('organisations-admin') or (current_user.adminForOrganisations.count > 0) -%}
|
||||
<th data-column-template="#{{table.id}}-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
{% endif -%}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -32,9 +32,10 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_templates %}
|
||||
|
||||
{% block table_cell_template_info %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-info" type="text/x-handlebars-template">
|
||||
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td data-text="{{row.name}}">
|
||||
<strong>
|
||||
{{#ifx row.is_member '==' 1 }}
|
||||
@@ -48,24 +49,24 @@
|
||||
{{/ifx }}
|
||||
</strong>
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_description %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-description" type="text/x-handlebars-template">
|
||||
<script id="{{table.id}}-column-description" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td>
|
||||
{{row.description}}
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_status %}
|
||||
{% if hasRole('site-admin') or hasRole('organisations-admin') or (current_user.adminForOrganisations.count > 0) %}
|
||||
{% verbatim %}
|
||||
<script id="user-table-column-status" type="text/x-handlebars-template">
|
||||
{%- if hasRole('site-admin') or hasRole('organisations-admin') or (current_user.adminForOrganisations.count > 0) %}
|
||||
<script id="{{table.id}}-column-status" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td
|
||||
{{#ifx row.flag_approved '==' 1 }}
|
||||
data-text="approved"
|
||||
@@ -83,34 +84,38 @@
|
||||
</span>
|
||||
{{/ifx }}
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endif %}
|
||||
{% endif -%}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_memberCount %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-memberCount" type="text/x-handlebars-template">
|
||||
{%- if checkAccess('view_organisation_members') -%}
|
||||
<script id="{{table.id}}-column-memberCount" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td>
|
||||
{{row.member_count}}
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endif -%}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_adminCount %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-adminCount" type="text/x-handlebars-template">
|
||||
{%- if checkAccess('view_organisation_members') -%}
|
||||
<script id="{{table.id}}-column-adminCount" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td>
|
||||
{{row.admin_count}}
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endif -%}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_join %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-join" type="text/x-handlebars-template">
|
||||
<script id="{{table.id}}-column-join" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{{#ifx row.is_pending '==' 1 }}
|
||||
@@ -132,14 +137,14 @@
|
||||
{{/ifx}}
|
||||
</div>
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_actions %}
|
||||
{% if hasRole('site-admin') or hasRole('organisations-admin') %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-actions" type="text/x-handlebars-template">
|
||||
{%- if hasRole('site-admin') or hasRole('organisations-admin') %}
|
||||
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
@@ -187,11 +192,11 @@
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% elseif (current_user.adminForOrganisations.count > 0) %}
|
||||
{% verbatim %}
|
||||
<script id="organisation-table-column-actions" type="text/x-handlebars-template">
|
||||
{%- elseif (current_user.adminForOrganisations.count > 0) -%}
|
||||
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td>
|
||||
{{#ifx row.is_admin '==' 1 }}
|
||||
<div class="btn-group">
|
||||
@@ -218,9 +223,9 @@
|
||||
</div>
|
||||
{{/ifx }}
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endif %}
|
||||
{% endif -%}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_extra %}{% endblock %}
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sorter-metatext" data-column-name="name" data-column-template="#user-table-column-info" data-priority="1">{{translate('USER')}} <i class="fas fa-sort"></i></th>
|
||||
<th class="filter-metatext" data-column-name="organisations" data-column-template="#user-table-column-organisations" data-priority="2">{{translate("ORGANISATION", 2)}}</th>
|
||||
<th class="sorter-metatext" data-column-name="name" data-column-template="#{{table.id}}-column-info" data-priority="1">{{translate('USER')}} <i class="fas fa-sort"></i></th>
|
||||
<th class="filter-metatext" data-column-name="organisations" data-column-template="#{{table.id}}-column-organisations" data-priority="2">{{translate("ORGANISATION", 2)}}</th>
|
||||
{% if 'last_activity' in table.columns %}
|
||||
<th class="sorter-metanum" data-column-name="last_activity" data-column-template="#user-table-column-last-activity" data-priority="3">{{translate("ACTIVITY.LAST")}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metanum" data-column-name="last_activity" data-column-template="#{{table.id}}-column-last-activity" data-priority="3">{{translate("ACTIVITY.LAST")}} <i class="fas fa-sort"></i></th>
|
||||
{% endif %}
|
||||
{% if 'via_roles' in table.columns %}
|
||||
<th data-column-template="#user-table-column-via-roles" data-sorter="false" data-filter="false" data-priority="1">{{translate('PERMISSION.VIA_ROLES')}}</th>
|
||||
<th data-column-template="#{{table.id}}-column-via-roles" data-sorter="false" data-filter="false" data-priority="1">{{translate('PERMISSION.VIA_ROLES')}}</th>
|
||||
{% endif %}
|
||||
<th class="filter-select filter-metatext" data-column-name="status" data-column-template="#user-table-column-status" data-priority="2">{{translate("STATUS")}} <i class="fas fa-sort"></i></th>
|
||||
<th data-column-name="actions" data-column-template="#user-table-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
<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>
|
||||
<th data-column-name="actions" data-column-template="#{{table.id}}-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
|
||||
{% block table_cell_template_actions %}
|
||||
{% verbatim %}
|
||||
<script id="user-table-column-actions" type="text/x-handlebars-template">
|
||||
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td class="uf-table-fit-width">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">{% endverbatim %}{{translate("ACTIONS")}}{% verbatim %}<span class="caret"></span></button>
|
||||
@@ -75,14 +75,14 @@
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_extra %}
|
||||
{% block table_cell_template_organisations %}
|
||||
{% verbatim %}
|
||||
<script id="user-table-column-organisations" type="text/x-handlebars-template">
|
||||
<script id="{{table.id}}-column-organisations" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td style="line-height: 2em;">
|
||||
{{#if row.organisations.length }}
|
||||
{{#each row.organisations }}
|
||||
@@ -95,8 +95,8 @@
|
||||
{{/each}}
|
||||
{{/if }}
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user