Changed the organisation navigation menu slightly to better handle single organisation mode
This commit is contained in:
@@ -54,7 +54,10 @@ return [
|
||||
'MEMBER_COUNT' => '# Members <sub>(excl admins)</sub>',
|
||||
'ADMIN_COUNT' => '# Admins',
|
||||
|
||||
'SELF' => 'My Organisations',
|
||||
'SELF' => [
|
||||
1 => 'My Organisation',
|
||||
2 => 'My Organisations',
|
||||
],
|
||||
'MANAGE' => 'Manage Organisations',
|
||||
'ASSIGN_NEW' => 'Assign to organisation',
|
||||
|
||||
|
||||
@@ -1,25 +1,37 @@
|
||||
{% extends "@admin/navigation/sidebar-menu.html.twig" %}
|
||||
|
||||
{% block navigation %}
|
||||
{{ parent() }}
|
||||
|
||||
{% block organisations_nav %}
|
||||
{% if checkAccess('uri_organisations') %}
|
||||
<li>
|
||||
<a href="{{site.uri.public}}/organisations"><i class="fas fa-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION", 2) }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if current_user.organisations.count() > 0 %}
|
||||
<li>
|
||||
<a href="#" data-toggle="collapse" data-target="#submenu-organisations" aria-expanded="false"><i class="fa fa-fw fa-sitemap"></i> <span>{{ translate("ORGANISATION.SELF") }}</span> <i class="fa fa-fw pull-right fa-angle-down"></i></a>
|
||||
<ul id="submenu-organisations" class="collapsable collapse" aria-expanded="false" style="height: 1px;">
|
||||
{% for organisation in current_user.organisations %}
|
||||
{% if organisationConfig.membership.single_membership == false %}
|
||||
<li>
|
||||
<a href="#" data-toggle="collapse" data-target="#submenu-organisations" aria-expanded="false"><i class="fa fa-fw fa-sitemap"></i> <span>{{ translate("ORGANISATION.SELF") }}</span> <i class="fa fa-fw pull-right fa-angle-down"></i></a>
|
||||
<ul id="submenu-organisations" class="collapsable collapse" aria-expanded="false" style="height: 1px;">
|
||||
{% for organisation in current_user.organisations %}
|
||||
{% if organisation.flag_approved or isOrganisationRegistrant(organisation) %}
|
||||
<li>
|
||||
<a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}"><i class="fas fa-angle-double-right"></i> <span>{{organisation.name}}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
{% set organisation = current_user.organisations.0 %}
|
||||
{% if organisation.flag_approved or isOrganisationRegistrant(organisation) %}
|
||||
<li>
|
||||
<a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}"><i class="fas fa-angle-double-right"></i> <span>{{organisation.name}}</span></a>
|
||||
<a href="{{site.uri.public}}/organisations/o/{{organisation.slug}}"><i class="fas fa-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION.SELF") }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block navigation %}
|
||||
{{ parent() }}
|
||||
{{ block('organisations_nav') }}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user