86 lines
4.2 KiB
Twig
86 lines
4.2 KiB
Twig
{% 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 %} |