Don't show organisations pending a join request in the navbar

This commit is contained in:
2022-02-15 17:01:41 +00:00
parent 77da13e0a0
commit e63b03fb2b
2 changed files with 3 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ class User extends UFUser
$classMapper->getClassMapping('organisation'), 'organisation_members', 'user_id', 'organisation_id' $classMapper->getClassMapping('organisation'), 'organisation_members', 'user_id', 'organisation_id'
) )
->orderBy('organisations.name', 'asc') ->orderBy('organisations.name', 'asc')
->withPivot('flag_admin'); ->withPivot(['flag_admin', 'flag_approved']);
} }
/** /**

View File

@@ -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> <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;"> <ul id="submenu-organisations" class="collapsable collapse" aria-expanded="false" style="height: 1px;">
{% for organisation in current_user.organisations %} {% for organisation in current_user.organisations %}
{% if organisation.flag_approved %}
<li> <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-angle-double-right"></i> <span>{{organisation.name}}</span></a>
</li> </li>
{% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</li> </li>