Split pending organisations into a separate list and default to only returning organisations a user is an accepted member of (Fixes #1)
This commit is contained in:
@@ -83,15 +83,18 @@
|
||||
{% block table_cell_template_organisations %}
|
||||
{% verbatim %}
|
||||
<script id="user-table-column-organisations" type="text/x-handlebars-template">
|
||||
{{#if row.organisations.length }}
|
||||
<td style="line-height: 2em;">
|
||||
{{#if row.organisations.length }}
|
||||
{{#each row.organisations }}
|
||||
<a href="{% endverbatim %}{{site.uri.public}}{% verbatim %}/organisations/o/{{this.slug}}" class="label bg-primary {{#ifx this.pivot.flag_approved '!=' 1 }}membership-pending{{/ifx}} {{#ifx this.flag_approved '!=' 1 }}organisation-pending{{/ifx}} {{#if this.pivot.flag_admin }}organisation-admin{{/if}}" title="{{this.description}}" data-text="{{this.name}}" style="font-size: 100%;">{{this.name}}</a><br>
|
||||
<a href="{% endverbatim %}{{site.uri.public}}{% verbatim %}/organisations/o/{{this.slug}}" class="label bg-primary {{#ifx this.flag_approved '!=' 1 }}organisation-pending{{/ifx}} {{#if this.pivot.flag_admin }}organisation-admin{{/if}}" title="{{this.description}}" data-text="{{this.name}}" style="font-size: 100%;">{{this.name}}</a><br>
|
||||
{{/each}}
|
||||
</td>
|
||||
{{ else }}
|
||||
<td></td>
|
||||
{{/if }}
|
||||
{{#if row.pending_organisations.length }}
|
||||
{{#each row.pending_organisations }}
|
||||
<a href="{% endverbatim %}{{site.uri.public}}{% verbatim %}/organisations/o/{{this.slug}}" class="label bg-primary {{#ifx this.flag_approved '!=' 1 }}organisation-pending{{/ifx}} {{#if this.pivot.flag_admin }}organisation-admin{{/if}} membership-pending" title="{{this.description}}" data-text="{{this.name}}" style="font-size: 100%;">{{this.name}}</a><br>
|
||||
{{/each}}
|
||||
{{/if }}
|
||||
</td>
|
||||
</script>
|
||||
{% endverbatim %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user