-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show team information instead of toggle for users with only one team
- Loading branch information
1 parent
f383876
commit 00a82bb
Showing
1 changed file
with
22 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
{% set teams = adminArea is defined and adminArea ? app.user.adminRoles : app.user.teams %} | ||
|
||
{% if teams|length > 1 and currentTeam is defined and currentTeam %} | ||
{% if currentTeam is defined and currentTeam %} | ||
<div class="flex flex-row justify-end items-center relative"> | ||
<button data-type="dropdown" data-target="#teamtoggle-menu" class="relative !inline-flex !items-center justify-center h-10 gap-x-2 p-3 rounded-[6.25rem] text-sm tracking-[.00714em] text-center font-medium hover:bg-surface-300 focus:bg-surface-400"> | ||
<span class="material-symbols-outlined">group</span> | ||
{{ currentTeam.name }} | ||
</button> | ||
<ul id="teamtoggle-menu" role="dropdownmenu" class="dropdown hidden top-10"> | ||
{% for team in teams %} | ||
{% if team != currentTeam %} | ||
<li class="relative"> | ||
<a href="{{ path('team_switch',{'team':team.id}) }}">{{ team.name }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% if teams|length > 1 %} | ||
<button data-type="dropdown" data-target="#teamtoggle-menu" class="relative !inline-flex !items-center justify-center h-10 gap-x-2 p-3 rounded-[6.25rem] text-sm tracking-[.00714em] text-center font-medium hover:bg-surface-300 focus:bg-surface-400"> | ||
<span class="material-symbols-outlined">group</span> | ||
{{ currentTeam.name }} | ||
</button> | ||
<ul id="teamtoggle-menu" role="dropdownmenu" class="dropdown hidden top-10"> | ||
{% for team in teams %} | ||
{% if team != currentTeam %} | ||
<li class="relative"> | ||
<a href="{{ path('team_switch',{'team':team.id}) }}">{{ team.name }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<div class="!inline-flex !items-center justify-center gap-x-2 p-3 text-sm font-medium"> | ||
<span class="material-symbols-outlined">group</span> | ||
{{ currentTeam.name }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% endif %} |