2024-11-10 20:07:54 +00:00
|
|
|
{{$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}}
|
2024-11-08 01:44:20 +00:00
|
|
|
</a>
|
2024-11-10 20:07:54 +00:00
|
|
|
<div class="menu">
|
|
|
|
{{if or $data.OpenProjects $data.ClosedProjects}}
|
2024-11-08 01:44:20 +00:00
|
|
|
<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}}
|
2024-11-10 20:07:54 +00:00
|
|
|
<div class="item clear-selection">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
|
|
|
|
{{if $data.OpenProjects}}
|
2024-11-08 01:44:20 +00:00
|
|
|
<div class="divider"></div>
|
2024-11-10 20:07:54 +00:00
|
|
|
<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}}
|
2024-11-08 01:44:20 +00:00
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2024-11-10 20:07:54 +00:00
|
|
|
{{if $data.ClosedProjects}}
|
2024-11-08 01:44:20 +00:00
|
|
|
<div class="divider"></div>
|
2024-11-10 20:07:54 +00:00
|
|
|
<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}}
|
2024-11-08 01:44:20 +00:00
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-11-10 20:07:54 +00:00
|
|
|
<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}}
|
2024-11-08 01:44:20 +00:00
|
|
|
</div>
|
2024-11-10 20:07:54 +00:00
|
|
|
</div>
|