29 lines
1.7 KiB
Twig
29 lines
1.7 KiB
Twig
<script id="{{table.id}}-column-join" type="text/x-handlebars-template">
|
|
{% if not organisationConfig.combine_action_buttons %}
|
|
{% 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 %}
|
|
{% endif %}
|
|
</script> |