diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-12-09 15:54:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-09 07:54:59 +0000 |
commit | 5675efb3e015fb8d87d86d1b79de2200f7dfb9af (patch) | |
tree | 5c5ad18d8a7fd31632f9d2f1dd4e6a65011c5271 /templates/projects/view.tmpl | |
parent | 2d13eafd69b368bc75faa25d7ecfbda98a0792f8 (diff) | |
download | gitea-5675efb3e015fb8d87d86d1b79de2200f7dfb9af.tar.gz gitea-5675efb3e015fb8d87d86d1b79de2200f7dfb9af.zip |
Fix duplicate dropdown dividers (#32760)
Fix #27466
The problem is that any item in the menu could be hidden, pure CSS won't
work, and dropdown's builtin "hideDividers" doesn't work with our "scope
dividers". The newly introduced "archived" label makes the dividers
regression more.
Diffstat (limited to 'templates/projects/view.tmpl')
-rw-r--r-- | templates/projects/view.tmpl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl index 71f9d059ad..acaf45e8d2 100644 --- a/templates/projects/view.tmpl +++ b/templates/projects/view.tmpl @@ -36,10 +36,11 @@ {{range .Labels}} {{$exclusiveScope := .ExclusiveScope}} {{if and (ne $previousExclusiveScope $exclusiveScope)}} - <div class="divider"></div> + <div class="divider" data-scope="{{.ExclusiveScope}}"></div> {{end}} {{$previousExclusiveScope = $exclusiveScope}} - <a class="item label-filter-item tw-flex tw-items-center" {{if .IsArchived}}data-is-archived{{end}} href="?labels={{.QueryString}}&assignee={{$.AssigneeID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}" data-label-id="{{.ID}}"> + <a class="item label-filter-item tw-flex tw-items-center" data-label-id="{{.ID}}" data-scope="{{.ExclusiveScope}}" {{if .IsArchived}}data-is-archived{{end}} + href="?labels={{.QueryString}}&assignee={{$.AssigneeID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}"> {{if .IsExcluded}} {{svg "octicon-circle-slash"}} {{else if .IsSelected}} |