Change table template hierarchy structure
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
{% block table_cell_template_actions %}
|
|
||||||
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||||
{%- verbatim %}
|
{% verbatim %}
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||||
@@ -21,6 +20,5 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
{% endverbatim -%}
|
{% endverbatim %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
{% block table_cell_template_info %}
|
|
||||||
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
||||||
{%- verbatim %}
|
{% verbatim %}
|
||||||
<td data-text="{{row.name}}">
|
<td data-text="{{row.name}}">
|
||||||
<strong>
|
<strong>
|
||||||
<a href="{{site.uri.public}}/organisations/o/{{row.slug}}">{{row.name}}</a>
|
<a href="{{site.uri.public}}/organisations/o/{{row.slug}}">{{row.name}}</a>
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
{% endverbatim -%}
|
{% endverbatim %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||||
|
{% if checkAccess('update_organisation_field', { 'organisation': organisation, 'fields': [ 'members' ] }) or isOrganisationAdmin(organisation) %}
|
||||||
|
{% 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>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-right-responsive" role="menu">
|
||||||
|
{{#ifx row.membership_approved '!=' 1 }}
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-accept">
|
||||||
|
<i class="fas fa-thumbs-up"></i> {% endverbatim %}{{translate("ORGANISATION.JOIN_REQUEST.ACCEPT")}}{% verbatim %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-reject">
|
||||||
|
<i class="fas fa-thumbs-down"></i> {% endverbatim %}{{translate("ORGANISATION.JOIN_REQUEST.REJECT")}}{% verbatim %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
{{#ifx row.organisation_admin '==' 1 }}
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-demote">
|
||||||
|
<i class="fas fa-angle-double-down"></i> {% endverbatim %}{{translate("MEMBER.DEMOTE")}}{% verbatim %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-promote">
|
||||||
|
<i class="fas fa-angle-double-up"></i> {% endverbatim %}{{translate("MEMBER.PROMOTE")}}{% verbatim %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{/ifx}}
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-user-edit">
|
||||||
|
<i class="fas fa-edit"></i> {% endverbatim %}{{translate("MEMBER.EDIT")}}{% verbatim %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-user-password">
|
||||||
|
<i class="fas fa-key"></i> {% endverbatim %}{{translate("MEMBER.CHANGE_PASSWORD")}}{% verbatim %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-remove">
|
||||||
|
<i class="fas fa-door-open"></i> {% endverbatim %}{{translate("MEMBER.REMOVE")}}{% verbatim %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{/ifx}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
</script>
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
{% block table_cell_template_info %}
|
|
||||||
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
||||||
{%- verbatim %}
|
{% verbatim %}
|
||||||
<td data-text="{{row.last_name}}">
|
<td data-text="{{row.last_name}}">
|
||||||
<strong>
|
<strong>
|
||||||
{% endverbatim -%}{% if isOrganisationAdmin(organisation) %}{%- verbatim %}
|
{% endverbatim -%}{% if isOrganisationAdmin(organisation) %}{%- verbatim %}
|
||||||
<a href="{{site.uri.public}}/users/u/{{row.user_name}}">{{row.first_name}} {{row.last_name}} ({{row.user_name}})</a>
|
<a href="{{site.uri.public}}/users/u/{{row.user_name}}">{{row.first_name}} {{row.last_name}} ({{row.user_name}})</a>
|
||||||
|
{% endverbatim -%}{% elseif checkAccess('uri_user') %}{%- verbatim %}
|
||||||
|
<a href="{{site.uri.public}}/users/u/{{row.user_name}}">{{row.first_name}} {{row.last_name}} ({{row.user_name}})</a>
|
||||||
{% endverbatim -%}{% else %}{%- verbatim %}
|
{% endverbatim -%}{% else %}{%- verbatim %}
|
||||||
{{row.first_name}} {{row.last_name}} ({{row.user_name}})
|
{{row.first_name}} {{row.last_name}} ({{row.user_name}})
|
||||||
{% endverbatim -%}{% endif %}{%- verbatim %}
|
{% endverbatim -%}{% endif %}{%- verbatim %}
|
||||||
@@ -14,6 +15,5 @@
|
|||||||
<button class="btn btn-xs uf-copy-trigger js-copy-trigger"><i class="fas fa-copy"></i></button>
|
<button class="btn btn-xs uf-copy-trigger js-copy-trigger"><i class="fas fa-copy"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
{% endverbatim -%}
|
{% endverbatim %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{% block table_cell_template_status %}
|
|
||||||
<script id="{{table.id}}-column-status" type="text/x-handlebars-template">
|
<script id="{{table.id}}-column-status" type="text/x-handlebars-template">
|
||||||
{%- verbatim %}
|
{% verbatim %}
|
||||||
<td
|
<td
|
||||||
{{#ifx row.membership_approved '==' 0 }}
|
{{#ifx row.membership_approved '==' 0 }}
|
||||||
data-text="pending"
|
data-text="pending"
|
||||||
@@ -15,6 +14,5 @@
|
|||||||
{{#ifx row.organisation_admin '==' 1 }}<span class="text-secondary">({% endverbatim %}{{translate("ADMIN")}}{% verbatim %})</span>{{/ifx}}
|
{{#ifx row.organisation_admin '==' 1 }}<span class="text-secondary">({% endverbatim %}{{translate("ADMIN")}}{% verbatim %})</span>{{/ifx}}
|
||||||
{{/ifx }}
|
{{/ifx }}
|
||||||
</td>
|
</td>
|
||||||
{% endverbatim -%}
|
{% endverbatim %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
|
||||||
74
templates/tables/columns/organisations-actions.html.twig
Normal file
74
templates/tables/columns/organisations-actions.html.twig
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||||
|
{% if 'actions' in table.columns %}
|
||||||
|
<td>
|
||||||
|
{% if not hasRole('organisation-admin') %}
|
||||||
|
{% verbatim %}{{#ifx row.is_admin '==' 1 }}{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="btn-group">
|
||||||
|
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||||
|
{{translate("ACTIONS")}}
|
||||||
|
<span class="caret"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-edit">
|
||||||
|
<i class="fas fa-edit"></i>
|
||||||
|
{{translate("ORGANISATION.EDIT")}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{% if checkAccess('merge_organisations') %}
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-merge">
|
||||||
|
<i class="fas fa-object-group"></i>
|
||||||
|
{{translate("ORGANISATION.MERGE")}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if checkAccess('approve_organisation') %}
|
||||||
|
{% verbatim %}{{#ifx row.flag_approved '==' 0 }}{% endverbatim %}
|
||||||
|
|
||||||
|
{% verbatim %}{{#ifx row.registrant_id '==' {% endverbatim %}{{current_user.id}}{% verbatim %} }}{% endverbatim %}
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-cancelRegistration">
|
||||||
|
<i class="fas fa-trash-alt"></i>
|
||||||
|
{{translate("ORGANISATION.REGISTRATION.CANCEL")}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% verbatim %}{{/ifx}}{% endverbatim %}
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-approveRegistration">
|
||||||
|
<i class="fas fa-thumbs-up"></i> {{translate("ORGANISATION.REGISTRATION.APPROVE")}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-denyRegistration">
|
||||||
|
<i class="fas fa-thumbs-down"></i>
|
||||||
|
{{translate("ORGANISATION.REGISTRATION.DENY")}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% verbatim %}{{/ifx}}{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if checkAccess('delete_organisation') %}
|
||||||
|
{% verbatim %}{{#ifx row.flag_approved '==' 1 }}{% endverbatim %}
|
||||||
|
<li>
|
||||||
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-delete">
|
||||||
|
<i class="fas fa-trash-alt"></i>
|
||||||
|
{{translate("ORGANISATION.DELETE")}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% verbatim %}{{/ifx }}{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if not hasRole('organisation-admin') %}
|
||||||
|
{% verbatim %}{{/ifx}}{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script id="{{table.id}}-column-adminCount" type="text/x-handlebars-template">
|
||||||
|
{% if checkAccess('view_organisation_members') %}
|
||||||
|
{% verbatim %}
|
||||||
|
<td>
|
||||||
|
{{row.admin_count}}
|
||||||
|
</td>
|
||||||
|
{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{% include "@uf-tweaks/tables/columns/abstract/description.html.twig" %}
|
||||||
17
templates/tables/columns/organisations-info.html.twig
Normal file
17
templates/tables/columns/organisations-info.html.twig
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
||||||
|
{% verbatim %}
|
||||||
|
<td data-text="{{row.name}}">
|
||||||
|
<strong>
|
||||||
|
{{#ifx row.is_member '==' 1 }}
|
||||||
|
<a href="{{site.uri.public}}/organisations/o/{{row.slug}}">{{row.name}}</a>
|
||||||
|
{{ else }}
|
||||||
|
{% endverbatim %}{% if checkAccess('uri_organisation') %}{% verbatim %}
|
||||||
|
<a href="{{site.uri.public}}/organisations/o/{{row.slug}}">{{row.name}}</a>
|
||||||
|
{% endverbatim %}{% else %}{% verbatim %}
|
||||||
|
{{row.name}}
|
||||||
|
{% endverbatim %}{% endif %}{% verbatim %}
|
||||||
|
{{/ifx }}
|
||||||
|
</strong>
|
||||||
|
</td>
|
||||||
|
{% endverbatim %}
|
||||||
|
</script>
|
||||||
27
templates/tables/columns/organisations-join.html.twig
Normal file
27
templates/tables/columns/organisations-join.html.twig
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<script id="{{table.id}}-column-join" type="text/x-handlebars-template">
|
||||||
|
{% if 'join' in table.columns %}
|
||||||
|
{% verbatim %}
|
||||||
|
<td>
|
||||||
|
<div class="btn-group">
|
||||||
|
{{#ifx row.is_pending '==' 1 }}
|
||||||
|
<button type="button" data-slug="{{row.slug}}" class="btn btn-danger js-organisation-cancelJoin" style="min-width: 70px">
|
||||||
|
{% endverbatim %}{{translate("CANCEL")}}{% verbatim %}
|
||||||
|
</button>
|
||||||
|
{{ else }}
|
||||||
|
{{#ifx row.is_member '==' 1 }}
|
||||||
|
<button type="button" data-slug="{{row.slug}}" class="btn btn-danger js-organisation-leave" style="min-width: 70px">
|
||||||
|
{% endverbatim %}{{translate("LEAVE")}}{% verbatim %}
|
||||||
|
</button>
|
||||||
|
{{ else }}
|
||||||
|
{% endverbatim %}{% if (organisationConfig.membership.single_membership == 0) or ((current_user.organisations.count == 0) and (current_user.pendingOrganisations.count == 0)) %}{% verbatim %}
|
||||||
|
<button type="button" data-slug="{{row.slug}}" class="btn btn-success js-organisation-join" style="min-width: 70px">
|
||||||
|
{% endverbatim %}{{translate("JOIN")}}{% verbatim %}
|
||||||
|
</button>
|
||||||
|
{% endverbatim %}{% endif %}{% verbatim %}
|
||||||
|
{{/ifx}}
|
||||||
|
{{/ifx}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script id="{{table.id}}-column-memberCount" type="text/x-handlebars-template">
|
||||||
|
{% if checkAccess('view_organisation_members') %}
|
||||||
|
{% verbatim %}
|
||||||
|
<td>
|
||||||
|
{{row.member_count}}
|
||||||
|
</td>
|
||||||
|
{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
</script>
|
||||||
25
templates/tables/columns/organisations-status.html.twig
Normal file
25
templates/tables/columns/organisations-status.html.twig
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<script id="{{table.id}}-column-status" type="text/x-handlebars-template">
|
||||||
|
{% if 'status' in table.columns %}
|
||||||
|
{% verbatim %}
|
||||||
|
<td
|
||||||
|
{{#ifx row.flag_approved '==' 1 }}
|
||||||
|
data-text="approved"
|
||||||
|
{{ else }}
|
||||||
|
data-text="pending"
|
||||||
|
{{/ifx }}
|
||||||
|
>
|
||||||
|
{% endverbatim %}{# {{# ifx row.flag_admin '==' 1 }} #}{% verbatim %}
|
||||||
|
{{#ifx row.flag_approved '==' 1 }}
|
||||||
|
<span>
|
||||||
|
{% endverbatim %}{{translate("APPROVED")}}{% verbatim %}
|
||||||
|
</span>
|
||||||
|
{{ else }}
|
||||||
|
<span class="text-yellow">
|
||||||
|
{% endverbatim %}{{translate("PENDING")}}{% verbatim %}
|
||||||
|
</span>
|
||||||
|
{{/ifx }}
|
||||||
|
{% endverbatim %}{# {{/ifx }} #}{% verbatim %}
|
||||||
|
</td>
|
||||||
|
{% endverbatim %}
|
||||||
|
{% endif %}
|
||||||
|
</script>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{% block table_cell_template_actions %}
|
|
||||||
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
||||||
{%- verbatim %}
|
{% verbatim %}
|
||||||
<td class="uf-table-fit-width">
|
<td class="uf-table-fit-width">
|
||||||
<div class="btn-group">
|
<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>
|
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">{% endverbatim %}{{translate("ACTIONS")}}{% verbatim %}<span class="caret"></span></button>
|
||||||
@@ -51,6 +50,5 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
{% endverbatim -%}
|
{% endverbatim %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{% block table_cell_template_organisations %}
|
|
||||||
<script id="{{table.id}}-column-organisations" type="text/x-handlebars-template">
|
<script id="{{table.id}}-column-organisations" type="text/x-handlebars-template">
|
||||||
{%- verbatim %}
|
{% verbatim %}
|
||||||
<td style="line-height: 2em;">
|
<td style="line-height: 2em;">
|
||||||
{{#if row.organisations.length }}
|
{{#if row.organisations.length }}
|
||||||
{{#each row.organisations }}
|
{{#each row.organisations }}
|
||||||
@@ -13,6 +12,5 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
{{/if }}
|
{{/if }}
|
||||||
</td>
|
</td>
|
||||||
{% endverbatim -%}
|
{% endverbatim %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
{% extends "tables/organisations.html.twig" %}
|
{% extends "tables/organisations.html.twig" %}
|
||||||
|
|
||||||
{% use 'tables/partials/deleted-organisations/column-info.html.twig' %}
|
|
||||||
{% use 'tables/partials/deleted-organisations/column-actions.html.twig' %}
|
|
||||||
|
|
||||||
{% block table %}
|
{% block table %}
|
||||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -20,4 +17,12 @@
|
|||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block table_cell_template_join %}{% endblock %}
|
{% block table_organisations_column_info %}
|
||||||
|
{% include 'tables/columns/deleted_organisations-info.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block table_organisations_column_actions %}
|
||||||
|
{% include 'tables/columns/deleted_organisations-actions.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block table_organisations_column_join %}{% endblock %}
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
{% extends "tables/users.html.twig" %}
|
{% extends "tables/users.html.twig" %}
|
||||||
|
|
||||||
{% use 'tables/partials/organisation-members/column-info.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisation-members/column-status.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisation-members/column-actions.html.twig' %}
|
|
||||||
|
|
||||||
{% block table %}
|
{% block table %}
|
||||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -11,7 +7,7 @@
|
|||||||
<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="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-sorter="false" data-column-template="#{{table.id}}-column-organisations" data-priority="2">{{translate("ORGANISATION", 2)}}</th>
|
<th class="filter-metatext" data-column-name="organisations" data-sorter="false" data-column-template="#{{table.id}}-column-organisations" data-priority="2">{{translate("ORGANISATION", 2)}}</th>
|
||||||
{% if 'last_activity' in table.columns %}
|
{% if 'last_activity' in table.columns %}
|
||||||
<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>
|
<th class="sorter-metanum" data-column-name="last_activity" data-column-template="#{{table.id}}-column-lastActivity" data-priority="3">{{translate("ACTIVITY.LAST")}} <i class="fas fa-sort"></i></th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<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 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>
|
||||||
{% if checkAccess('update_organisation_field', { 'organisation': organisation, 'fields': [ 'members' ] }) or isOrganisationAdmin(organisation) %}
|
{% if checkAccess('update_organisation_field', { 'organisation': organisation, 'fields': [ 'members' ] }) or isOrganisationAdmin(organisation) %}
|
||||||
@@ -23,3 +19,15 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block table_users_column_info %}
|
||||||
|
{% include 'tables/columns/organisation_members-info.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block table_users_column_status %}
|
||||||
|
{% include 'tables/columns/organisation_members-status.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block table_users_column_actions %}
|
||||||
|
{% include 'tables/columns/organisation_members-actions.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
@@ -7,36 +7,26 @@
|
|||||||
|
|
||||||
{% extends "tables/table-paginated.html.twig" %}
|
{% extends "tables/table-paginated.html.twig" %}
|
||||||
|
|
||||||
{% use 'tables/partials/organisations/column-info.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisations/column-description.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisations/column-status.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisations/column-member_count.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisations/column-admin_count.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisations/column-join.html.twig' %}
|
|
||||||
{% use 'tables/partials/organisations/column-actions.html.twig' %}
|
|
||||||
|
|
||||||
{% block table %}
|
{% block table %}
|
||||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<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>
|
<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' not in table.hidden_columns %}
|
{% 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>
|
<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 %}
|
{% endif %}
|
||||||
{% if hasRole('site-admin') or hasRole('organisations-admin') or (current_user.adminForOrganisations.count > 0) -%}
|
{% 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>
|
<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 -%}
|
{% endif %}
|
||||||
{% if checkAccess('view_organisation_members') -%}
|
{% if checkAccess('view_organisation_members') %}
|
||||||
<th class="sorter-metanum" data-column-name="member_count" data-column-template="#{{table.id}}-column-member_count" 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="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-admin_count" data-priority="2">{{translate("ORGANISATION.ADMIN_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 -%}
|
{% endif %}
|
||||||
{% if 'join' in table.columns %}
|
{% 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>
|
<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 %}
|
{% endif %}
|
||||||
{% if 'actions' in table.columns %}
|
{% if 'actions' in table.columns %}
|
||||||
{% 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>
|
<th data-column-template="#{{table.id}}-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||||
{% endif -%}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -46,13 +36,27 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block table_cell_templates %}
|
{% block table_cell_templates %}
|
||||||
{{ block('table_cell_template_info') }}
|
{% block table_organisations_column_info %}
|
||||||
{{ block('table_cell_template_description') }}
|
{% include "tables/columns/organisations-info.html.twig" %}
|
||||||
{{ block('table_cell_template_status') }}
|
{% endblock %}
|
||||||
{{ block('table_cell_template_member_count') }}
|
{% block table_organisations_column_description %}
|
||||||
{{ block('table_cell_template_admin_count') }}
|
{% include "tables/columns/organisations-description.html.twig" %}
|
||||||
{{ block('table_cell_template_join') }}
|
{% endblock %}
|
||||||
{{ block('table_cell_template_actions') }}
|
{% 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 %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
{% block table_cell_template_actions %}
|
|
||||||
{% if checkAccess('update_organisation_field', { 'organisation': organisation, 'fields': [ 'members' ] }) or isOrganisationAdmin(organisation) %}
|
|
||||||
<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>
|
|
||||||
<ul class="dropdown-menu dropdown-menu-right-responsive" role="menu">
|
|
||||||
{{#ifx row.membership_approved '!=' 1 }}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-accept">
|
|
||||||
<i class="fas fa-thumbs-up"></i> {% endverbatim %}{{translate("ORGANISATION.JOIN_REQUEST.ACCEPT")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-reject">
|
|
||||||
<i class="fas fa-thumbs-down"></i> {% endverbatim %}{{translate("ORGANISATION.JOIN_REQUEST.REJECT")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ else }}
|
|
||||||
{{#ifx row.organisation_admin '==' 1 }}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-demote">
|
|
||||||
<i class="fas fa-angle-double-down"></i> {% endverbatim %}{{translate("MEMBER.DEMOTE")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{ else }}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-promote">
|
|
||||||
<i class="fas fa-angle-double-up"></i> {% endverbatim %}{{translate("MEMBER.PROMOTE")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{/ifx}}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-user-edit">
|
|
||||||
<i class="fas fa-edit"></i> {% endverbatim %}{{translate("MEMBER.EDIT")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-user-password">
|
|
||||||
<i class="fas fa-key"></i> {% endverbatim %}{{translate("MEMBER.CHANGE_PASSWORD")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{% endverbatim %}{{organisation.slug}}{% verbatim %}" data-user_name="{{row.user_name}}" class="js-member-remove">
|
|
||||||
<i class="fas fa-door-open"></i> {% endverbatim %}{{translate("MEMBER.REMOVE")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{/ifx}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
{% block table_cell_template_actions %}
|
|
||||||
{%- 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">
|
|
||||||
{% endverbatim %}{{translate("ACTIONS")}}{% verbatim %}
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
|
||||||
{% endverbatim %}{% if checkAccess('update_organisation_field') %}{% verbatim %}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{{row.slug}}" class="js-organisation-edit">
|
|
||||||
<i class="fas fa-edit"></i> {% endverbatim %}{{translate("ORGANISATION.EDIT")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endverbatim %}{% endif %}{% verbatim %}
|
|
||||||
{% endverbatim %}{% if checkAccess('merge_organisations') %}{% verbatim %}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{{row.slug}}" class="js-organisation-merge">
|
|
||||||
<i class="fas fa-object-group"></i> {% endverbatim %}{{translate("ORGANISATION.MERGE")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endverbatim %}{% endif %}{% verbatim %}
|
|
||||||
{% endverbatim %}{% if checkAccess('approve_organisation') %}{% verbatim %}
|
|
||||||
{{#ifx row.flag_approved '==' 0 }}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{{row.slug}}" class="js-organisation-approveRegistration">
|
|
||||||
<i class="fas fa-thumbs-up"></i> {% endverbatim %}{{translate("ORGANISATION.REGISTRATION.APPROVE")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{{row.slug}}" class="js-organisation-denyRegistration">
|
|
||||||
<i class="fas fa-thumbs-down"></i> {% endverbatim %}{{translate("ORGANISATION.REGISTRATION.DENY")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{/ifx }}
|
|
||||||
{% endverbatim %}{% endif %}{% verbatim %}
|
|
||||||
{% endverbatim %}{% if checkAccess('delete_organisation') %}{% verbatim %}
|
|
||||||
{{#ifx row.flag_approved '==' 1 }}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{{row.slug}}" class="js-organisation-delete">
|
|
||||||
<i class="fas fa-trash-alt"></i> {% endverbatim %}{{translate("ORGANISATION.DELETE")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{/ifx }}
|
|
||||||
{% endverbatim %}{% endif %}{% verbatim %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{%- 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">
|
|
||||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
|
||||||
{% endverbatim %}{{translate("ACTIONS")}}{% verbatim %}
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{{row.slug}}" class="js-organisation-edit">
|
|
||||||
<i class="fas fa-edit"></i> {% endverbatim %}{{translate("ORGANISATION.EDIT")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{#ifx row.flag_approved '==' 0 }}
|
|
||||||
{{#ifx row.registrant_id '==' {% endverbatim %}{{current_user.id}}{% verbatim %} }}
|
|
||||||
<li>
|
|
||||||
<a href="#" data-slug="{{row.slug}}" class="js-organisation-cancelRegistration">
|
|
||||||
<i class="fas fa-trash-alt"></i> {% endverbatim %}{{translate("ORGANISATION.REGISTRATION.CANCEL")}}{% verbatim %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{/ifx}}
|
|
||||||
{{/ifx}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{/ifx }}
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endif -%}
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{% block table_cell_template_admin_count %}
|
|
||||||
{%- if checkAccess('view_organisation_members') -%}
|
|
||||||
<script id="{{table.id}}-column-adminCount" type="text/x-handlebars-template">
|
|
||||||
{%- verbatim %}
|
|
||||||
<td>
|
|
||||||
{{row.admin_count}}
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endif -%}
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{% block table_cell_template_description %}
|
|
||||||
<script id="{{table.id}}-column-description" type="text/x-handlebars-template">
|
|
||||||
{%- verbatim %}
|
|
||||||
<td>
|
|
||||||
{{row.description}}
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
{% block table_cell_template_info %}
|
|
||||||
<script id="{{table.id}}-column-info" type="text/x-handlebars-template">
|
|
||||||
{%- verbatim %}
|
|
||||||
<td data-text="{{row.name}}">
|
|
||||||
<strong>
|
|
||||||
{{#ifx row.is_member '==' 1 }}
|
|
||||||
<a href="{{site.uri.public}}/organisations/o/{{row.slug}}">{{row.name}}</a>
|
|
||||||
{{ else }}
|
|
||||||
{% endverbatim %}{% if hasRole('organisations-admin') or hasRole('site-admin') %}{% verbatim %}
|
|
||||||
<a href="{{site.uri.public}}/organisations/o/{{row.slug}}">{{row.name}}</a>
|
|
||||||
{% endverbatim %}{% else %}{% verbatim %}
|
|
||||||
{{row.name}}
|
|
||||||
{% endverbatim %}{% endif %}{% verbatim %}
|
|
||||||
{{/ifx }}
|
|
||||||
</strong>
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{% block table_cell_template_join %}
|
|
||||||
<script id="{{table.id}}-column-join" type="text/x-handlebars-template">
|
|
||||||
{%- verbatim %}
|
|
||||||
<td>
|
|
||||||
<div class="btn-group">
|
|
||||||
{{#ifx row.is_pending '==' 1 }}
|
|
||||||
<button type="button" data-slug="{{row.slug}}" class="btn btn-danger js-organisation-cancelJoin" style="min-width: 70px">
|
|
||||||
{% endverbatim %}{{translate("CANCEL")}}{% verbatim %}
|
|
||||||
</button>
|
|
||||||
{{ else }}
|
|
||||||
{{#ifx row.is_member '==' 1 }}
|
|
||||||
<button type="button" data-slug="{{row.slug}}" class="btn btn-danger js-organisation-leave" style="min-width: 70px">
|
|
||||||
{% endverbatim %}{{translate("LEAVE")}}{% verbatim %}
|
|
||||||
</button>
|
|
||||||
{{ else }}
|
|
||||||
{% endverbatim %}{% if (organisationConfig.membership.single_membership == 0) or ((current_user.organisations.count == 0) and (current_user.pendingOrganisations.count == 0)) %}{% verbatim %}
|
|
||||||
<button type="button" data-slug="{{row.slug}}" class="btn btn-success js-organisation-join" style="min-width: 70px">
|
|
||||||
{% endverbatim %}{{translate("JOIN")}}{% verbatim %}
|
|
||||||
</button>
|
|
||||||
{% endverbatim %}{% endif %}{% verbatim %}
|
|
||||||
{{/ifx}}
|
|
||||||
{{/ifx}}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{% block table_cell_template_member_count %}
|
|
||||||
{%- if checkAccess('view_organisation_members') -%}
|
|
||||||
<script id="{{table.id}}-column-memberCount" type="text/x-handlebars-template">
|
|
||||||
{%- verbatim %}
|
|
||||||
<td>
|
|
||||||
{{row.member_count}}
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endif -%}
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{% block table_cell_template_status %}
|
|
||||||
{%- 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"
|
|
||||||
{{ else }}
|
|
||||||
data-text="pending"
|
|
||||||
{{/ifx }}
|
|
||||||
>
|
|
||||||
{{#ifx row.flag_approved '==' 1 }}
|
|
||||||
<span>
|
|
||||||
{% endverbatim %}{{translate("APPROVED")}}{% verbatim %}
|
|
||||||
</span>
|
|
||||||
{{ else }}
|
|
||||||
<span class="text-yellow">
|
|
||||||
{% endverbatim %}{{translate("PENDING")}}{% verbatim %}
|
|
||||||
</span>
|
|
||||||
{{/ifx }}
|
|
||||||
</td>
|
|
||||||
{% endverbatim -%}
|
|
||||||
</script>
|
|
||||||
{% endif -%}
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{% extends "@blockier-templates/tables/users.html.twig" %}
|
{% extends "@uf-tweaks/tables/users.html.twig" %}
|
||||||
|
|
||||||
{% block table %}
|
{% block table %}
|
||||||
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
<table id="{{table.id}}" class="tablesorter table table-bordered table-hover table-striped" data-sortlist="{{table.sortlist}}">
|
||||||
@@ -7,10 +7,10 @@
|
|||||||
<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="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-sorter="false" data-column-template="#{{table.id}}-column-organisations" data-priority="2">{{translate("ORGANISATION", 2)}}</th>
|
<th class="filter-metatext" data-column-name="organisations" data-sorter="false" data-column-template="#{{table.id}}-column-organisations" data-priority="2">{{translate("ORGANISATION", 2)}}</th>
|
||||||
{% if 'last_activity' in table.columns %}
|
{% if 'last_activity' in table.columns %}
|
||||||
<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>
|
<th class="sorter-metanum" data-column-name="last_activity" data-column-template="#{{table.id}}-column-lastActivity" data-priority="3">{{translate("ACTIVITY.LAST")}} <i class="fas fa-sort"></i></th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if 'via_roles' in table.columns %}
|
{% if 'via_roles' in table.columns %}
|
||||||
<th data-column-template="#{{table.id}}-column-via-roles" data-sorter="false" data-filter="false" data-priority="1">{{translate('PERMISSION.VIA_ROLES')}}</th>
|
<th data-column-template="#{{table.id}}-column-viaRoles" data-sorter="false" data-filter="false" data-priority="1">{{translate('PERMISSION.VIA_ROLES')}}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<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 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>
|
<th data-column-name="actions" data-column-template="#{{table.id}}-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||||
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
{% block table_cell_templates %}
|
{% block table_cell_templates %}
|
||||||
{{ parent() }}
|
{{ parent() }}
|
||||||
{{ block('table_cell_template_organisations', 'tables/partials/users/column-organisations.html.twig') }}
|
{% block table_users_column_organisations %}
|
||||||
|
{% include 'tables/columns/users-organisations.html.twig' %}
|
||||||
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user