mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-12-01 06:16:09 +01:00
b673edbeaf
Backport #25315 by @denyskon Various fixes to pages or elements which were looking ugly on mobile. <details> <summary>Screenshots</summary> ![Bildschirmfoto vom 2023-06-17 20-38-41](https://github.com/go-gitea/gitea/assets/47871822/30b5d3ce-df3b-43eb-a4c2-c3790667fb9d) ![Bildschirmfoto vom 2023-06-17 20-39-27](https://github.com/go-gitea/gitea/assets/47871822/27c07b25-3602-4fb2-b34d-d5e875e054e9) ![Bildschirmfoto vom 2023-06-17 20-41-27](https://github.com/go-gitea/gitea/assets/47871822/dacdbb4e-e3dd-4b94-abf0-c68e3d64bd3b) ![Bildschirmfoto vom 2023-06-17 20-41-48](https://github.com/go-gitea/gitea/assets/47871822/72432c35-7c4a-4c7f-a767-3562f26a5c14) ![Bildschirmfoto vom 2023-06-17 20-42-37](https://github.com/go-gitea/gitea/assets/47871822/737c26ed-1910-4467-98ef-e8769bbbe6f0) ![Bildschirmfoto vom 2023-06-17 20-42-52](https://github.com/go-gitea/gitea/assets/47871822/1813b4bc-43c0-4912-8acb-5d799c090bf3) ![Bildschirmfoto vom 2023-06-17 20-43-06](https://github.com/go-gitea/gitea/assets/47871822/136466e8-34e5-419d-97ec-5202ff819fd2) ![Bildschirmfoto vom 2023-06-17 20-43-42](https://github.com/go-gitea/gitea/assets/47871822/59270bb2-d661-4a84-8504-3e50f771f767) ![Bildschirmfoto vom 2023-06-17 20-44-44](https://github.com/go-gitea/gitea/assets/47871822/494e274d-3771-4141-9419-0a4bbd8b7f64) </details> Co-authored by: @silverwind Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: silverwind <me@silverwind.io>
157 lines
7.6 KiB
Handlebars
157 lines
7.6 KiB
Handlebars
{{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="ui stackable grid">
|
|
<div class="four wide column">
|
|
<div class="ui secondary vertical filter menu gt-bg-transparent">
|
|
<div class="item">
|
|
{{.locale.Tr "home.issues.in_your_repos"}}
|
|
<strong class="ui right">{{.Total}}</strong>
|
|
</div>
|
|
<div class="ui divider"></div>
|
|
{{range .Repos}}
|
|
{{with $Repo := .}}
|
|
<a class="{{range $.RepoIDs}}{{if eq . $Repo.ID}}active{{end}}{{end}} repo name item" href="{{$.Link}}?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="twelve wide column 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="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
|
|
{{svg "octicon-milestone" 16 "gt-mr-3"}}
|
|
{{.locale.PrettyNumber .MilestoneStats.OpenCount}} {{.locale.Tr "repo.issues.open_title"}}
|
|
</a>
|
|
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
|
|
{{svg "octicon-check" 16 "gt-mr-3"}}
|
|
{{.locale.PrettyNumber .MilestoneStats.ClosedCount}} {{.locale.Tr "repo.issues.closed_title"}}
|
|
</a>
|
|
</div>
|
|
<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}}">
|
|
<input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
|
|
<button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}">{{svg "octicon-search"}}</button>
|
|
</div>
|
|
</form>
|
|
<!-- Sort -->
|
|
<div class="list-header-sort ui dropdown type jump item">
|
|
<span class="text">
|
|
{{.locale.Tr "repo.issues.filter_sort"}}
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
</span>
|
|
<div class="menu">
|
|
<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}}">{{.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}}">{{.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}}">{{.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}}">{{.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}}">{{.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}}">{{.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="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}}
|
|
{{$.locale.PrettyNumber .NumOpenIssues}} {{$.locale.Tr "repo.issues.open_title"}}
|
|
</div>
|
|
<div class="flex-text-block">
|
|
{{svg "octicon-check" 14}}
|
|
{{$.locale.PrettyNumber .NumClosedIssues}} {{$.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"}}
|
|
{{$.locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix $.locale) | Safe}}
|
|
</div>
|
|
{{end}}
|
|
<div class="flex-text-block">
|
|
{{if .IsClosed}}
|
|
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
|
|
{{svg "octicon-clock" 14}}
|
|
{{$.locale.Tr "repo.milestones.closed" $closedDate | Safe}}
|
|
{{else}}
|
|
{{svg "octicon-calendar" 14}}
|
|
{{if .DeadlineString}}
|
|
<span {{if .IsOverdue}}class="overdue"{{end}}>
|
|
{{DateTime "short" .DeadlineString}}
|
|
</span>
|
|
{{else}}
|
|
{{$.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}}{{$.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}}{{$.locale.Tr "repo.milestones.open"}}</a>
|
|
{{else}}
|
|
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{$.locale.Tr "repo.milestones.close"}}</a>
|
|
{{end}}
|
|
<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete">{{svg "octicon-trash" 14}}{{$.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>
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|