Abstract the organisation form and sidebar menu
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{% 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 %}
|
||||
{% 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-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION.SELF") }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -1,37 +1,6 @@
|
||||
{% extends "@admin/navigation/sidebar-menu.html.twig" %}
|
||||
|
||||
{% 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 %}
|
||||
{% 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-sitemap fa-fw"></i> <span>{{ translate("ORGANISATION.SELF") }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block navigation %}
|
||||
{{ parent() }}
|
||||
{{ block('organisations_nav') }}
|
||||
{% include "navigation/partials/sidebar-organisations.html.twig" %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user