Added buttons to join/leave organisations (no functionality yet)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<th class="sorter-metanum" data-column-name="member_count" data-column-template="#organisation-table-column-memberCount" data-priority="2">{{translate("ORGANISATION.MEMBER_COUNT")}} <i class="fas fa-sort"></i></th>
|
||||
<th class="sorter-metanum" data-column-name="admin_count" data-column-template="#organisation-table-column-adminCount" data-priority="2">{{translate("ORGANISATION.ADMIN_COUNT")}} <i class="fas fa-sort"></i></th>
|
||||
{% endif %}
|
||||
<th data-column-template="#organisation-table-column-join" data-column-name="join" data-sorter="false" data-filter="false" data-priority="3">{{translate("JOIN")}}/{{translate("LEAVE")}}</th>
|
||||
<th data-column-template="#organisation-table-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -88,6 +89,30 @@
|
||||
</td>
|
||||
</script>
|
||||
|
||||
<script id="organisation-table-column-join" type="text/x-handlebars-template">
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{{#ifx row.is_pending '==' 0 }}
|
||||
<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) %}{% 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>
|
||||
</script>
|
||||
|
||||
{% endverbatim %}{% if hasRole('site-admin') or hasRole('organisations-admin') %}{% verbatim %}
|
||||
<script id="organisation-table-column-actions" type="text/x-handlebars-template">
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user