mirror of
https://github.com/go-gitea/gitea
synced 2024-11-14 06:04:25 +00:00
8abc1aae4a
The ui of list header in milestone page is not same as issue and pr list page. And they are using different template codes which can be merged into one. Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/29eb426c-2dd6-4cf2-96e0-82339fb631bb) ![image](https://github.com/go-gitea/gitea/assets/18380374/b36c4dff-469a-4395-8a02-a8c54e17ab21) ![image](https://github.com/go-gitea/gitea/assets/18380374/d882c74a-451b-431d-b58e-3635a15d9718) ![image](https://github.com/go-gitea/gitea/assets/18380374/292cd38d-1b50-47f1-b32c-9b5de90ce5fb) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/4529234e-67dc-4e17-9440-e638be4fbc41) ![image](https://github.com/go-gitea/gitea/assets/18380374/c15b4d86-0762-497b-b28d-72d09443d629) --------- Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
109 lines
3.9 KiB
Handlebars
109 lines
3.9 KiB
Handlebars
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository milestones">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
{{template "base/alert" .}}
|
|
|
|
<div class="list-header">
|
|
{{template "repo/issue/navbar" .}}
|
|
{{template "repo/issue/search" .}}
|
|
{{if and (or .CanWriteIssues .CanWritePulls) (not .Repository.IsArchived)}}
|
|
<a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.milestones.new"}}</a>
|
|
{{end}}
|
|
</div>
|
|
|
|
{{template "repo/issue/filters" .}}
|
|
|
|
<!-- milestone list -->
|
|
<div class="milestone-list">
|
|
{{range .Milestones}}
|
|
<li class="milestone-card">
|
|
<div class="milestone-header">
|
|
<h3 class="flex-text-block gt-m-0">
|
|
{{svg "octicon-milestone" 16}}
|
|
<a class="muted" href="{{$.RepoLink}}/milestone/{{.ID}}">{{.Name}}</a>
|
|
</h3>
|
|
<div class="gt-df gt-ac">
|
|
<span class="gt-mr-3">{{.Completeness}}%</span>
|
|
<progress value="{{.Completeness}}" max="100"></progress>
|
|
</div>
|
|
</div>
|
|
<div class="milestone-toolbar">
|
|
<div class="group">
|
|
<div class="flex-text-block">
|
|
{{svg "octicon-issue-opened" 14}}
|
|
{{ctx.Locale.PrettyNumber .NumOpenIssues}} {{ctx.Locale.Tr "repo.issues.open_title"}}
|
|
</div>
|
|
<div class="flex-text-block">
|
|
{{svg "octicon-check" 14}}
|
|
{{ctx.Locale.PrettyNumber .NumClosedIssues}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
|
|
</div>
|
|
{{if .TotalTrackedTime}}
|
|
<div class="flex-text-block">
|
|
{{svg "octicon-clock"}}
|
|
{{.TotalTrackedTime|Sec2Time}}
|
|
</div>
|
|
{{end}}
|
|
{{if .UpdatedUnix}}
|
|
<div class="flex-text-block">
|
|
{{svg "octicon-clock"}}
|
|
{{ctx.Locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix ctx.Locale) | Safe}}
|
|
</div>
|
|
{{end}}
|
|
<div class="flex-text-block">
|
|
{{if .IsClosed}}
|
|
{{$closedDate:= TimeSinceUnix .ClosedDateUnix ctx.Locale}}
|
|
{{svg "octicon-clock" 14}}
|
|
{{ctx.Locale.Tr "repo.milestones.closed" $closedDate | Safe}}
|
|
{{else}}
|
|
{{if .DeadlineString}}
|
|
<span class="flex-text-inline {{if .IsOverdue}}text red{{end}}">
|
|
{{svg "octicon-calendar" 14}}
|
|
{{DateTime "short" .DeadlineString}}
|
|
</span>
|
|
{{else}}
|
|
{{svg "octicon-calendar" 14}}
|
|
{{ctx.Locale.Tr "repo.milestones.no_due_date"}}
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
|
|
<div class="group">
|
|
<a class="flex-text-inline" href="{{$.Link}}/{{.ID}}/edit">{{svg "octicon-pencil" 14}}{{ctx.Locale.Tr "repo.issues.label_edit"}}</a>
|
|
{{if .IsClosed}}
|
|
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check" 14}}{{ctx.Locale.Tr "repo.milestones.open"}}</a>
|
|
{{else}}
|
|
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{ctx.Locale.Tr "repo.milestones.close"}}</a>
|
|
{{end}}
|
|
<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{if .Content}}
|
|
<div class="markup content">
|
|
{{.RenderedContent|Str2html}}
|
|
</div>
|
|
{{end}}
|
|
</li>
|
|
{{end}}
|
|
|
|
{{template "base/paginate" .}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{if or .CanWriteIssues .CanWritePulls}}
|
|
<div class="ui g-modal-confirm delete modal">
|
|
<div class="header">
|
|
{{svg "octicon-trash"}}
|
|
{{ctx.Locale.Tr "repo.milestones.deletion"}}
|
|
</div>
|
|
<div class="content">
|
|
<p>{{ctx.Locale.Tr "repo.milestones.deletion_desc"}}</p>
|
|
</div>
|
|
{{template "base/modal_actions_confirm" .}}
|
|
</div>
|
|
{{end}}
|
|
{{template "base/footer" .}}
|