74 lines
3.7 KiB
Twig
74 lines
3.7 KiB
Twig
<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> |