mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-10 20:31:25 +02:00
fix: update group sidebar item template
use `SignedUser` instead of `Doer` because `Doer` is nil on org homepages
This commit is contained in:
parent
10ac130ec7
commit
5df1eafe98
@ -3,7 +3,7 @@
|
|||||||
<li class="expandable-menu-item item tw-px-0" {{if $item.IsGroup}} data-is-group="true"{{end}}
|
<li class="expandable-menu-item item tw-px-0" {{if $item.IsGroup}} data-is-group="true"{{end}}
|
||||||
data-sort-id="{{if $item.IsGroup}}group{{else}}repo{{end}}-{{$item.ID}}-{{$item.Sort}}"
|
data-sort-id="{{if $item.IsGroup}}group{{else}}repo{{end}}-{{$item.ID}}-{{$item.Sort}}"
|
||||||
data-id="{{$item.ID}}">
|
data-id="{{$item.ID}}">
|
||||||
<label class="tw-gap-2{{if $item.HasChildren $.root.Doer}} has-children{{end}}">
|
<label class="tw-gap-2{{if $item.HasChildren $.root.SignedUser}} has-children{{end}}">
|
||||||
{{$active := (and $item.IsGroup (call $.root.GroupIsCurrent $item.ID))}}
|
{{$active := (and $item.IsGroup (call $.root.GroupIsCurrent $item.ID))}}
|
||||||
{{$childContains := (call $.root.GroupHasChild $item)}}
|
{{$childContains := (call $.root.GroupHasChild $item)}}
|
||||||
<input type="checkbox" class="toggle tw-h-0 tw-w-0 tw-overflow-hidden tw-opacity-0 tw-absolute"{{if or $active $childContains}} checked{{end}}>
|
<input type="checkbox" class="toggle tw-h-0 tw-w-0 tw-overflow-hidden tw-opacity-0 tw-absolute"{{if or $active $childContains}} checked{{end}}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user