mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 14:06:15 +01:00
3ea7437fa6
Fixes https://github.com/go-gitea/gitea/issues/30005. Regression from https://github.com/go-gitea/gitea/pull/29945. There was only once instance of `tw-content-center` before that PR, so I just ran below command and reverted that one instance. ```sh perl -p -i -e 's#tw-content-center#tw-items-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/* ``` (cherry picked from commit 04f9ad056882fc3f21b247b16f84437adf0f36d8) Conflicts: templates/repo/diff/conversation.tmpl templates/repo/header.tmpl templates/repo/issue/filter_list.tmpl templates/repo/issue/view_content/conversation.tmpl templates/repo/wiki/view.tmpl web_src/js/components/DashboardRepoList.vue re-ran the command after discarding the Gitea changes to ensure all Forgejo files are also covered
154 lines
7.4 KiB
Go HTML Template
154 lines
7.4 KiB
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content dashboard issues repository milestones">
|
|
{{template "user/dashboard/navbar" .}}
|
|
<div class="ui container">
|
|
<div class="flex-container">
|
|
<div class="flex-container-nav">
|
|
<div class="ui secondary vertical filter menu tw-bg-transparent">
|
|
<div class="item">
|
|
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
|
|
<strong>{{.Total}}</strong>
|
|
</div>
|
|
<div class="divider"></div>
|
|
{{range .Repos}}
|
|
{{with $Repo := .}}
|
|
<a class="{{range $.RepoIDs}}{{if eq . $Repo.ID}}active{{end}}{{end}} repo name item" href="?repos=[
|
|
{{- with $include := true -}}
|
|
{{- range $.RepoIDs -}}
|
|
{{- if eq . $Repo.ID -}}
|
|
{{$include = false}}
|
|
{{- else -}}
|
|
{{.}}%2C
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if eq $include true -}}
|
|
{{$Repo.ID}}%2C
|
|
{{- end -}}
|
|
{{- end -}}
|
|
]&sort={{$.SortType}}&state={{$.State}}&q={{$.Keyword}}" title="{{.FullName}}">
|
|
<span class="text truncate">{{$Repo.FullName}}</span>
|
|
<div class="ui {{if $.IsShowClosed}}red{{else}}green{{end}} label">{{index $.Counts $Repo.ID}}</div>
|
|
</a>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="flex-container-main content">
|
|
<div class="list-header">
|
|
<div class="small-menu-items ui compact tiny menu list-header-toggle">
|
|
<a class="item{{if not .IsShowClosed}} active{{end}}" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
|
|
{{svg "octicon-milestone" 16 "gt-mr-3"}}
|
|
{{ctx.Locale.PrettyNumber .MilestoneStats.OpenCount}} {{ctx.Locale.Tr "repo.issues.open_title"}}
|
|
</a>
|
|
<a class="item{{if .IsShowClosed}} active{{end}}" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
|
|
{{svg "octicon-check" 16 "gt-mr-3"}}
|
|
{{ctx.Locale.PrettyNumber .MilestoneStats.ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
|
|
</a>
|
|
</div>
|
|
<form class="list-header-search ui form ignore-dirty">
|
|
<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}}">
|
|
{{template "shared/search/combo" dict "Value" $.Keyword}}
|
|
</form>
|
|
<!-- Sort -->
|
|
<div class="list-header-sort ui dropdown type jump item">
|
|
<span class="text">
|
|
{{ctx.Locale.Tr "repo.issues.filter_sort"}}
|
|
</span>
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
<div class="menu">
|
|
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.earliest_due_data"}}</a>
|
|
<a class="{{if eq .SortType "furthestduedate"}}active {{end}}item" href="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.latest_due_date"}}</a>
|
|
<a class="{{if eq .SortType "leastcomplete"}}active {{end}}item" href="?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="?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="?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="?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="milestone-list">
|
|
{{range .Milestones}}
|
|
<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" 16}}
|
|
<a class="muted" href="{{.Repo.Link}}/milestone/{{.ID}}">{{.Name}}</a>
|
|
</h3>
|
|
<div class="tw-flex tw-items-center">
|
|
<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)}}
|
|
</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}}
|
|
{{else}}
|
|
{{if .DeadlineString}}
|
|
<span{{if .IsOverdue}} class="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}}
|
|
</div>
|
|
{{end}}
|
|
</li>
|
|
{{end}}
|
|
|
|
{{template "base/paginate" .}}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|