mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-26 23:09:28 +00:00
eec45b43db
Issue filters are being used on repo list page and on milestone issues page, and the code is mostly duplicated. This PR does the following changes: - move issue filters into a shared template - allow filtering milestone issues by project, so no need to hide this filter on milestone issues page - remove some dead code (e. g. issue actions in milestone issues template) - fix label filter dropdown width --------- Co-authored-by: 6543 <6543@obermui.de>
59 lines
2.2 KiB
Handlebars
59 lines
2.2 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository milestone-issue-list">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
<div class="gt-df">
|
|
<h1 class="gt-mb-3">{{.Milestone.Name}}</h1>
|
|
{{if not .Repository.IsArchived}}
|
|
<div class="text right gt-f1">
|
|
{{if or .CanWriteIssues .CanWritePulls}}
|
|
{{if .Milestone.IsClosed}}
|
|
<a class="ui green basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{$.locale.Tr "repo.milestones.open"}}
|
|
</a>
|
|
{{else}}
|
|
<a class="ui red basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/close">{{$.locale.Tr "repo.milestones.close"}}
|
|
</a>
|
|
{{end}}
|
|
<a class="ui button" href="{{.RepoLink}}/milestones/{{.MilestoneID}}/edit">{{.locale.Tr "repo.milestones.edit"}}</a>
|
|
{{end}}
|
|
<a class="ui primary button" href="{{.RepoLink}}/issues/new{{if .NewIssueChooseTemplate}}/choose{{end}}?milestone={{.MilestoneID}}">{{.locale.Tr "repo.issues.new"}}</a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{if .Milestone.RenderedContent}}
|
|
<div class="markup content gt-mb-4">
|
|
{{.Milestone.RenderedContent|Str2html}}
|
|
</div>
|
|
{{end}}
|
|
<div class="gt-df gt-fc gt-gap-3">
|
|
<progress class="milestone-progress-big" value="{{.Milestone.Completeness}}" max="100"></progress>
|
|
<div class="gt-df gt-gap-4">
|
|
<div classs="gt-df gt-ac">
|
|
{{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix $.locale}}
|
|
{{if .IsClosed}}
|
|
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}}
|
|
{{else}}
|
|
|
|
{{if .Milestone.DeadlineString}}
|
|
<span{{if .IsOverdue}} class="text red"{{end}}>
|
|
{{svg "octicon-calendar"}}
|
|
{{DateTime "short" .Milestone.DeadlineString}}
|
|
</span>
|
|
{{else}}
|
|
{{svg "octicon-calendar"}}
|
|
{{$.locale.Tr "repo.milestones.no_due_date"}}
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
<div class="gt-mr-3">{{.locale.Tr "repo.milestones.completeness" .Milestone.Completeness | Safe}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="divider"></div>
|
|
|
|
{{template "repo/issue/filters" .}}
|
|
|
|
{{template "shared/issuelist" dict "." . "listType" "milestone"}}
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|