Blockier templates table structure
This commit is contained in:
@@ -21,82 +21,8 @@
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block table_cell_template_actions %}
|
||||
<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.flag_verified '==' 0 }}
|
||||
<li>
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-activate">
|
||||
<i class="fas fa-bolt"></i> {% endverbatim %}{{translate("USER.ACTIVATE")}}{% verbatim %}
|
||||
</a>
|
||||
</li>
|
||||
{{/ifx }}
|
||||
<li>
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-edit">
|
||||
<i class="fas fa-edit"></i> {% endverbatim %}{{translate("USER.EDIT")}}{% verbatim %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-roles">
|
||||
<i class="fas fa-id-card"></i> {% endverbatim %}{{translate("ROLE.MANAGE")}}{% verbatim %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-organisations">
|
||||
<i class="fas fa-sitemap"></i> {% endverbatim %}{{translate("ORGANISATION.MANAGE")}}{% verbatim %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-password">
|
||||
<i class="fas fa-key"></i> {% endverbatim %}{{translate("USER.ADMIN.CHANGE_PASSWORD")}}{% verbatim %}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{#ifx row.flag_enabled '==' 1 }}
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-disable">
|
||||
<i class="fas fa-minus-circle"></i> {% endverbatim %}{{translate("USER.DISABLE")}}{% verbatim %}
|
||||
</a>
|
||||
{{ else }}
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-enable">
|
||||
<i class="fas fa-plus-circle"></i> {% endverbatim %}{{translate("USER.ENABLE")}}{% verbatim %}
|
||||
</a>
|
||||
{{/ifx }}
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" data-user_name="{{row.user_name}}" class="js-user-delete">
|
||||
<i class="fas fa-trash-alt"></i> {% endverbatim %}{{translate("USER.DELETE")}}{% verbatim %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block table_cell_template_extra %}
|
||||
{% block table_cell_template_organisations %}
|
||||
<script id="{{table.id}}-column-organisations" type="text/x-handlebars-template">
|
||||
{%- verbatim %}
|
||||
<td style="line-height: 2em;">
|
||||
{{#if row.organisations.length }}
|
||||
{{#each row.organisations }}
|
||||
<a href="{% endverbatim %}{{site.uri.public}}{% verbatim %}/organisations/o/{{this.slug}}" class="label bg-primary {{#ifx this.flag_approved '!=' 1 }}organisation-pending{{/ifx}} {{#if this.pivot.flag_admin }}organisation-admin{{/if}}" title="{{this.description}}" data-text="{{this.name}}" style="font-size: 100%;">{{this.name}}</a><br>
|
||||
{{/each}}
|
||||
{{/if }}
|
||||
{{#if row.pending_organisations.length }}
|
||||
{{#each row.pending_organisations }}
|
||||
<a href="{% endverbatim %}{{site.uri.public}}{% verbatim %}/organisations/o/{{this.slug}}" class="label bg-primary {{#ifx this.flag_approved '!=' 1 }}organisation-pending{{/ifx}} {{#if this.pivot.flag_admin }}organisation-admin{{/if}} membership-pending" title="{{this.description}}" data-text="{{this.name}}" style="font-size: 100%;">{{this.name}}</a><br>
|
||||
{{/each}}
|
||||
{{/if }}
|
||||
</td>
|
||||
{% endverbatim -%}
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block table_cell_templates %}
|
||||
{{ parent() }}
|
||||
{{ block('table_cell_template_organisations', 'tables/partials/users/column-organisations.html.twig') }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user