mirror of
https://github.com/go-gitea/gitea
synced 2025-03-10 20:54:30 +00:00
Currently, the issue/pr sidebar is hard to read visually. One of the reason is that the gear icons make reading difficult because they are "in the way" when reading, and not aligned together. This PR proposes to align them on the right. Actions are also better highlighted this way. ## Screenshots ### Issue | Before this PR | After this PR | | --- | --- | | <img width="322" alt="Capture d’écran 2025-02-25 à 19 59 39" src="https://github.com/user-attachments/assets/efdd13af-7b22-4f2b-8e65-dd17d6f3ffad" /> | <img width="322" alt="Capture d’écran 2025-02-25 à 19 58 56" src="https://github.com/user-attachments/assets/eeacc3f4-5e2c-4558-a4b3-0f1ab4742107" /> | ### Pull Request | Before this PR | After this PR | | --- | --- | | <img width="322" alt="Capture d’écran 2025-02-25 à 20 16 12" src="https://github.com/user-attachments/assets/c274b58b-ad50-4ad8-b3da-91dbabd1b120" /> | <img width="322" alt="Capture d’écran 2025-02-25 à 20 15 54" src="https://github.com/user-attachments/assets/ecfd6d60-a525-4767-872d-2ef84030d81e" /> | Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
39 lines
1.8 KiB
Handlebars
39 lines
1.8 KiB
Handlebars
{{$pageMeta := .}}
|
|
{{$data := .AssigneesData}}
|
|
{{$issueAssignees := NIL}}{{if $pageMeta.Issue}}{{$issueAssignees = $pageMeta.Issue.Assignees}}{{end}}
|
|
<div class="divider"></div>
|
|
<div class="issue-sidebar-combo" data-selection-mode="multiple" data-update-algo="diff"
|
|
{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/assignee?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
|
|
>
|
|
<input class="combo-value" name="assignee_ids" type="hidden" value="{{$data.SelectedAssigneeIDs}}">
|
|
<div class="ui dropdown text-flex-grow {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
|
|
<a class="text muted">
|
|
<strong>{{ctx.Locale.Tr "repo.issues.new.assignees"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
|
|
</a>
|
|
<div class="menu">
|
|
<div class="ui icon search input">
|
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
|
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}">
|
|
</div>
|
|
<div class="scrolling menu flex-items-block">
|
|
<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
|
|
<div class="divider"></div>
|
|
{{range $data.CandidateAssignees}}
|
|
<a class="item" href="#" data-value="{{.ID}}">
|
|
<span class="item-check-mark">{{svg "octicon-check"}}</span>
|
|
{{ctx.AvatarUtils.Avatar . 20}} {{template "repo/search_name" .}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui list muted-links flex-items-block tw-flex tw-flex-col tw-gap-2">
|
|
<span class="item empty-list {{if $issueAssignees}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
|
|
{{range $issueAssignees}}
|
|
<a class="item" href="{{$pageMeta.RepoLink}}/{{if $pageMeta.IsPullRequest}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
|
|
{{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|