Change actions button depending on site/orgs admin vs organisation administrator
This commit is contained in:
@@ -18,9 +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 %}
|
||||
{% if hasRole('site-admin') or hasRole('organisations-admin') %}
|
||||
<th data-column-template="#organisation-table-column-actions" data-sorter="false" data-filter="false" data-priority="1">{{translate("ACTIONS")}}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -90,6 +88,7 @@
|
||||
</td>
|
||||
</script>
|
||||
|
||||
{% endverbatim %}{% if hasRole('site-admin') or hasRole('organisations-admin') %}{% verbatim %}
|
||||
<script id="organisation-table-column-actions" type="text/x-handlebars-template">
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
@@ -139,5 +138,35 @@
|
||||
</div>
|
||||
</td>
|
||||
</script>
|
||||
{% endverbatim %}{% else %}{% verbatim %}
|
||||
<script id="organisation-table-column-actions" type="text/x-handlebars-template">
|
||||
<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>
|
||||
</script>
|
||||
{% endverbatim %}{% endif %}{% verbatim %}
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user