Don't show organisations pending a join request in the navbar
This commit is contained in:
@@ -41,7 +41,7 @@ class User extends UFUser
|
||||
$classMapper->getClassMapping('organisation'), 'organisation_members', 'user_id', 'organisation_id'
|
||||
)
|
||||
->orderBy('organisations.name', 'asc')
|
||||
->withPivot('flag_admin');
|
||||
->withPivot(['flag_admin', 'flag_approved']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,9 +45,11 @@
|
||||
<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 %}
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user