2019-12-15 08:20:08 -06:00
{{ template "base/head" . }}
2023-02-01 19:56:10 -03:00
<div role="main" aria-label=" {{ .Title }} " class="page-content dashboard issues repository milestones">
2019-12-15 08:20:08 -06:00
{{ template "user/dashboard/navbar" . }}
<div class="ui container">
2023-11-08 03:30:39 +01:00
<div class="flex-container">
<div class="flex-container-nav">
2023-05-18 09:27:29 +02:00
<div class="ui secondary vertical filter menu gt-bg-transparent">
2023-05-22 20:42:57 +09:00
<div class="item">
2023-09-25 10:56:50 +02:00
{{ ctx .Locale .Tr "home.issues.in_your_repos" }}
2023-08-31 10:29:59 +08:00
<strong> {{ .Total }} </strong>
2023-05-22 20:42:57 +09:00
</div>
2023-06-29 14:24:22 +02:00
<div class="divider"></div>
2019-12-15 08:20:08 -06:00
{{ range .Repos }}
{{ with $ Repo : = . }}
2023-05-31 18:44:28 +08:00
<a class=" {{ range $ .RepoIDs }} {{ if eq . $ Repo .ID }} active {{ end }} {{ end }} repo name item" href=" {{ $ .Link }} ?repos=[
2021-11-16 18:18:25 +00:00
{{ - with $ in clude : = true - }}
{{ - range $ .RepoIDs - }}
{{ - if eq . $ Repo .ID - }}
{{ $ in clude = false }}
{{ - else - }}
{{ . }} %2C
{{ - end - }}
{{ - end - }}
{{ - if eq $ in clude true - }}
{{ $ Repo .ID }} %2C
{{ - end - }}
{{ - end - }}
2021-04-08 19:53:59 +08:00
]&sort= {{ $ .SortType }} &state= {{ $ .State }} &q= {{ $ .Keyword }} " title=" {{ .FullName }} ">
2019-12-15 08:20:08 -06:00
<span class="text truncate"> {{ $ Repo .FullName }} </span>
2019-12-17 16:34:11 -05:00
<div class="ui {{ if $ .IsShowClosed }} red {{ else }} green {{ end }} label"> {{ in dex $ .Counts $ Repo .ID }} </div>
2019-12-15 08:20:08 -06:00
</a>
{{ end }}
{{ end }}
</div>
</div>
2023-11-08 03:30:39 +01:00
<div class="flex-container-main content">
2023-04-30 05:33:25 +02:00
<div class="list-header">
2023-06-18 12:31:42 +02:00
<div class="small-menu-items ui compact tiny menu list-header-toggle">
2023-04-30 05:33:25 +02:00
<a class="item {{ if not .IsShowClosed }} active {{ end }} " href=" {{ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort= {{ $ .SortType }} &state=open&q= {{ $ .Keyword }} ">
{{ svg "octicon-milestone" 1 6 "gt-mr-3" }}
2023-09-25 20:42:40 +08:00
{{ ctx .Locale .PrettyNumber .MilestoneStats .OpenCount }} {{ ctx .Locale .Tr "repo.issues.open_title" }}
2023-04-30 05:33:25 +02:00
</a>
<a class="item {{ if .IsShowClosed }} active {{ end }} " href=" {{ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort= {{ $ .SortType }} &state=closed&q= {{ $ .Keyword }} ">
{{ svg "octicon-check" 1 6 "gt-mr-3" }}
2023-09-25 20:42:40 +08:00
{{ ctx .Locale .PrettyNumber .MilestoneStats .ClosedCount }} {{ ctx .Locale .Tr "repo.issues.closed_title" }}
2023-04-30 05:33:25 +02:00
</a>
2019-12-15 08:20:08 -06:00
</div>
2023-04-30 05:33:25 +02:00
<form class="list-header-search ui form ignore-dirty">
<div class="ui small search fluid action input">
<input type="hidden" name="type" value=" {{ $ .ViewType }} ">
<input type="hidden" name="repos" value="[ {{ range $ .RepoIDs }} {{ . }} , {{ end }} ]">
<input type="hidden" name="sort" value=" {{ $ .SortType }} ">
<input type="hidden" name="state" value=" {{ $ .State }} ">
2023-09-24 22:31:58 +02:00
{{ template "shared/searchinput" dict "Value" $ .Keyword }}
2023-09-25 10:56:50 +02:00
<button class="ui small icon button" type="submit" aria-label=" {{ ctx .Locale .Tr "explore.search" }} "> {{ svg "octicon-search" }} </button>
2023-04-30 05:33:25 +02:00
</div>
</form>
<!-- Sort -->
<div class="list-header-sort ui dropdown type jump item">
<span class="text">
2023-09-25 10:56:50 +02:00
{{ ctx .Locale .Tr "repo.issues.filter_sort" }}
2023-04-30 05:33:25 +02:00
</span>
2023-09-21 23:54:26 +08:00
{{ svg "octicon-triangle-down" 1 4 "dropdown icon" }}
2023-04-30 05:33:25 +02:00
<div class="menu">
2023-09-25 10:56:50 +02:00
<a class=" {{ if or ( eq .SortType "closestduedate" ) ( not .SortType ) }} active {{ end }} item" href=" {{ $ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort=closestduedate&state= {{ $ .State }} &q= {{ $ .Keyword }} "> {{ ctx .Locale .Tr "repo.milestones.filter_sort.closest_due_date" }} </a>
<a class=" {{ if eq .SortType "furthestduedate" }} active {{ end }} item" href=" {{ $ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort=furthestduedate&state= {{ $ .State }} &q= {{ $ .Keyword }} "> {{ ctx .Locale .Tr "repo.milestones.filter_sort.furthest_due_date" }} </a>
<a class=" {{ if eq .SortType "leastcomplete" }} active {{ end }} item" href=" {{ $ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort=leastcomplete&state= {{ $ .State }} &q= {{ $ .Keyword }} "> {{ ctx .Locale .Tr "repo.milestones.filter_sort.least_complete" }} </a>
<a class=" {{ if eq .SortType "mostcomplete" }} active {{ end }} item" href=" {{ $ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort=mostcomplete&state= {{ $ .State }} &q= {{ $ .Keyword }} "> {{ ctx .Locale .Tr "repo.milestones.filter_sort.most_complete" }} </a>
<a class=" {{ if eq .SortType "mostissues" }} active {{ end }} item" href=" {{ $ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort=mostissues&state= {{ $ .State }} &q= {{ $ .Keyword }} "> {{ ctx .Locale .Tr "repo.milestones.filter_sort.most_issues" }} </a>
<a class=" {{ if eq .SortType "leastissues" }} active {{ end }} item" href=" {{ $ .Link }} ?repos=[ {{ range $ .RepoIDs }} {{ . }} %2C {{ end }} ]&sort=leastissues&state= {{ $ .State }} &q= {{ $ .Keyword }} "> {{ ctx .Locale .Tr "repo.milestones.filter_sort.least_issues" }} </a>
2021-04-08 19:53:59 +08:00
</div>
</div>
2021-04-11 05:46:37 +02:00
</div>
2023-06-18 12:31:42 +02:00
<div class="milestone-list">
2021-04-11 05:46:37 +02:00
{{ range .Milestones }}
2023-06-18 12:31:42 +02:00
<li class="milestone-card">
<div class="milestone-header">
<h3 class="flex-text-block gt-m-0">
<span class="ui large label">
{{ .Repo .FullName }}
</span>
{{ svg "octicon-milestone" 1 6 }}
<a class="muted" href=" {{ .Repo .Link }} /milestone/ {{ .ID }} "> {{ .Name }} </a>
2023-02-12 11:19:09 +08:00
</h3>
2023-02-13 17:59:59 +00:00
<div class="gt-df gt-ac">
<span class="gt-mr-3"> {{ .Completeness }} %</span>
2022-05-20 05:04:45 +02:00
<progress value=" {{ .Completeness }} " max="100"></progress>
2021-04-11 05:46:37 +02:00
</div>
</div>
2023-06-18 12:31:42 +02:00
<div class="milestone-toolbar">
<div class="group">
<div class="flex-text-block">
{{ svg "octicon-issue-opened" 1 4 }}
2023-09-25 20:42:40 +08:00
{{ ctx .Locale .PrettyNumber .NumOpenIssues }} {{ ctx .Locale .Tr "repo.issues.open_title" }}
2023-06-18 12:31:42 +02:00
</div>
<div class="flex-text-block">
{{ svg "octicon-check" 1 4 }}
2023-09-25 20:42:40 +08:00
{{ ctx .Locale .PrettyNumber .NumClosedIssues }} {{ ctx .Locale .Tr "repo.issues.closed_title" }}
2023-06-18 12:31:42 +02:00
</div>
2022-06-12 14:08:23 +02:00
{{ if .TotalTrackedTime }}
2023-06-18 12:31:42 +02:00
<div class="flex-text-block">
{{ svg "octicon-clock" }}
{{ .TotalTrackedTime | Sec2Time }}
</div>
2022-06-12 14:08:23 +02:00
{{ end }}
2023-06-18 12:31:42 +02:00
{{ if .UpdatedUnix }}
<div class="flex-text-block">
{{ svg "octicon-clock" }}
2024-02-23 01:02:33 +08:00
{{ ctx .Locale .Tr "repo.milestones.update_ago" ( TimeSinceUnix .UpdatedUnix ctx .Locale ) }}
2023-06-18 12:31:42 +02:00
</div>
2021-04-11 05:46:37 +02:00
{{ end }}
2023-06-18 12:31:42 +02:00
<div class="flex-text-block">
{{ if .IsClosed }}
2023-09-25 20:42:40 +08:00
{{ $ closedDate : = TimeSinceUnix .ClosedDateUnix ctx .Locale }}
2023-06-18 12:31:42 +02:00
{{ svg "octicon-clock" 1 4 }}
2024-02-23 01:02:33 +08:00
{{ ctx .Locale .Tr "repo.milestones.closed" $ closedDate }}
2023-06-18 12:31:42 +02:00
{{ else }}
{{ if .DeadlineString }}
2023-06-22 03:59:49 +02:00
<span {{ if .IsOverdue }} class="text red" {{ end }} >
{{ svg "octicon-calendar" 1 4 }}
2023-06-18 12:31:42 +02:00
{{ DateTime "short" .DeadlineString }}
</span>
{{ else }}
2023-06-22 03:59:49 +02:00
{{ svg "octicon-calendar" 1 4 }}
2023-09-25 10:56:50 +02:00
{{ ctx .Locale .Tr "repo.milestones.no_due_date" }}
2023-06-18 12:31:42 +02:00
{{ end }}
{{ end }}
</div>
2021-04-11 05:46:37 +02:00
</div>
2023-06-18 12:31:42 +02:00
{{ if and ( or $ .CanWriteIssues $ .CanWritePulls ) ( not $ .Repository .IsArchived ) }}
<div class="group">
2023-09-25 10:56:50 +02:00
<a class="flex-text-inline" href=" {{ $ .Link }} / {{ .ID }} /edit"> {{ svg "octicon-pencil" 1 4 }} {{ ctx .Locale .Tr "repo.issues.label_edit" }} </a>
2023-06-18 12:31:42 +02:00
{{ if .IsClosed }}
2023-09-25 10:56:50 +02:00
<a class="link-action flex-text-inline" href data-url=" {{ $ .Link }} / {{ .ID }} /open"> {{ svg "octicon-check" 1 4 }} {{ ctx .Locale .Tr "repo.milestones.open" }} </a>
2023-06-18 12:31:42 +02:00
{{ else }}
2023-09-25 10:56:50 +02:00
<a class="link-action flex-text-inline" href data-url=" {{ $ .Link }} / {{ .ID }} /close"> {{ svg "octicon-x" 1 4 }} {{ ctx .Locale .Tr "repo.milestones.close" }} </a>
2023-06-18 12:31:42 +02:00
{{ end }}
2023-09-25 10:56:50 +02:00
<a class="delete-button flex-text-inline" href="#" data-url=" {{ $ .RepoLink }} /milestones/delete" data-id=" {{ .ID }} "> {{ svg "octicon-trash" 1 4 }} {{ ctx .Locale .Tr "repo.issues.label_delete" }} </a>
2023-06-18 12:31:42 +02:00
</div>
{{ end }}
</div>
2021-04-11 05:46:37 +02:00
{{ if .Content }}
2022-01-06 19:49:27 -08:00
<div class="markup content">
2021-04-11 05:46:37 +02:00
{{ .RenderedContent | Str2html }}
</div>
{{ end }}
</li>
{{ end }}
2019-12-15 08:20:08 -06:00
2021-04-11 05:46:37 +02:00
{{ template "base/paginate" . }}
</div>
2019-12-15 08:20:08 -06:00
</div>
</div>
</div>
</div>
{{ template "base/footer" . }}