mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-23 00:04:19 +01:00
07373f1d5d
1. remove duplicate dividers 2. align reviewer items 3. merge & remove unused CSS styles Before: <details> ![image](https://github.com/user-attachments/assets/1b3121ee-b5fa-4fe9-b0f2-344d96dc5fbc) ![image](https://github.com/user-attachments/assets/ba8b97e6-114d-488c-adee-48f6c7a3b580) </details> After: <details> ![image](https://github.com/user-attachments/assets/978eab3e-a5d7-4b68-90ce-079b61994d25) ![image](https://github.com/user-attachments/assets/a8b58a27-dd05-4c8d-be60-816439ce77c6) ![image](https://github.com/user-attachments/assets/b7e6a16c-bf98-4465-a805-9f4a642d366e) </details>
51 lines
2.1 KiB
Go HTML Template
51 lines
2.1 KiB
Go HTML Template
{{$pageMeta := .}}
|
|
{{$data := .ProjectsData}}
|
|
{{$issueProject := NIL}}{{if and $pageMeta.Issue $pageMeta.Issue.Project}}{{$issueProject = $pageMeta.Issue.Project}}{{end}}
|
|
<div class="divider"></div>
|
|
<div class="issue-sidebar-combo" data-selection-mode="single" data-update-algo="all"
|
|
{{if $pageMeta.Issue}}data-update-url="{{$pageMeta.RepoLink}}/issues/projects?issue_ids={{$pageMeta.Issue.ID}}"{{end}}
|
|
>
|
|
<input class="combo-value" name="project_id" type="hidden" value="{{$data.SelectedProjectID}}">
|
|
<div class="ui dropdown {{if not $pageMeta.CanModifyIssueOrPull}}disabled{{end}}">
|
|
<a class="text muted">
|
|
<strong>{{ctx.Locale.Tr "repo.issues.new.projects"}}</strong> {{if $pageMeta.CanModifyIssueOrPull}}{{svg "octicon-gear"}}{{end}}
|
|
</a>
|
|
<div class="menu">
|
|
{{if or $data.OpenProjects $data.ClosedProjects}}
|
|
<div class="ui icon search input">
|
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
|
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_projects"}}">
|
|
</div>
|
|
{{end}}
|
|
<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
|
|
<div class="scrolling menu">
|
|
{{if $data.OpenProjects}}
|
|
<div class="header">{{ctx.Locale.Tr "repo.issues.new.open_projects"}}</div>
|
|
{{range $data.OpenProjects}}
|
|
<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
|
|
{{svg .IconName 18}} {{.Title}}
|
|
</a>
|
|
{{end}}
|
|
{{end}}
|
|
{{if and $data.OpenProjects $data.ClosedProjects}}<div class="divider"></div>{{end}}
|
|
{{if $data.ClosedProjects}}
|
|
<div class="header">{{ctx.Locale.Tr "repo.issues.new.closed_projects"}}</div>
|
|
{{range $data.ClosedProjects}}
|
|
<a class="item muted" data-value="{{.ID}}" href="{{.Link ctx}}">
|
|
{{svg .IconName 18}} {{.Title}}
|
|
</a>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui list">
|
|
<span class="item empty-list {{if $issueProject}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
|
|
{{if $issueProject}}
|
|
<a class="item muted" href="{{$issueProject.Link ctx}}">
|
|
{{svg $issueProject.IconName 18}} {{$issueProject.Title}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|