130 lines
7.5 KiB
Twig
130 lines
7.5 KiB
Twig
<script id="{{table.id}}-column-actions" type="text/x-handlebars-template">
|
|
{% if 'actions' in table.columns %}
|
|
<td>
|
|
{% if not organisationConfig.combine_action_buttons %}
|
|
{% if not (checkAccess('delete_organisation') or checkAccess('approve_organisation') or checkAccess('merge_organisations')) %}
|
|
{% verbatim %}{{#ifx row.is_admin '==' 1 }}{% endverbatim %}
|
|
{% endif %}
|
|
{% 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">
|
|
|
|
|
|
{% if organisationConfig.combine_action_buttons %}
|
|
{% verbatim %}{{#ifx row.is_pending '==' 1 }}{% endverbatim %}
|
|
<li>
|
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-cancelJoin">
|
|
<i class="fas fa-window-close"></i>
|
|
{{translate("JOIN.CANCEL")}}
|
|
</a>
|
|
</li>
|
|
{% verbatim %}{{ else }}{% endverbatim %}
|
|
{% verbatim %}{{#ifx row.is_member '==' 1 }}{% endverbatim %}
|
|
<li>
|
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-leave">
|
|
<i class="fas fa-sign-out-alt"></i>
|
|
{{translate("LEAVE")}}
|
|
</a>
|
|
</li>
|
|
{% verbatim %}{{ else }}{% endverbatim %}
|
|
{% if (organisationConfig.membership.single_membership == 0) or ((current_user.organisations.count == 0) and (current_user.pendingOrganisations.count == 0)) %}
|
|
<li>
|
|
<a href="#" data-slug="{% verbatim %}{{row.slug}}{% endverbatim %}" class="js-organisation-join">
|
|
<i class="fas fa-sign-in-alt"></i>
|
|
{{translate("JOIN")}}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% verbatim %}{{/ifx}}{% endverbatim %}
|
|
{% verbatim %}{{/ifx}}{% endverbatim %}
|
|
|
|
{% if checkAccess('merge_organisations') or checkAccess('approve_organisation') or checkAccess('delete_organisation') %}
|
|
<li class="divider"></li>
|
|
{% else %}
|
|
{% if organisationConfig.combine_action_buttons %}
|
|
{% if not (checkAccess('delete_organisation') or checkAccess('approve_organisation') or checkAccess('merge_organisations')) %}
|
|
{% verbatim %}{{#ifx row.is_admin '==' 1 }}<li class="divider"></li>{{/ifx}}{% endverbatim %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
{% if organisationConfig.combine_action_buttons %}
|
|
{% if not (checkAccess('delete_organisation') or checkAccess('approve_organisation') or checkAccess('merge_organisations')) %}
|
|
{% verbatim %}{{#ifx row.is_admin '==' 1 }}{% endverbatim %}
|
|
{% endif %}
|
|
{% endif %}
|
|
<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 organisationConfig.combine_action_buttons %}
|
|
{% if not (checkAccess('delete_organisation') or checkAccess('approve_organisation') or checkAccess('merge_organisations')) %}
|
|
{% verbatim %}{{/ifx }}{% endverbatim %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% 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 organisationConfig.combine_action_buttons %}
|
|
{% if not (checkAccess('delete_organisation') or checkAccess('approve_organisation') or checkAccess('merge_organisations')) %}
|
|
{% verbatim %}{{/ifx}}{% endverbatim %}
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
{% endif %}
|
|
</script> |