From ad9add55008bb9f61c2ffa33c951e65352eb8041 Mon Sep 17 00:00:00 2001 From: JFronny Date: Tue, 18 Jul 2023 13:49:54 +0200 Subject: [PATCH] Update templates --- templates/repo/issue/list.tmpl | 187 ++++++++++++++++++------- templates/repo/issue/view.tmpl | 36 ----- templates/repo/issue/view_content.tmpl | 69 ++++----- templates/repo/issue/view_title.tmpl | 122 ++++++++++++++++ 4 files changed, 292 insertions(+), 122 deletions(-) delete mode 100644 templates/repo/issue/view.tmpl create mode 100644 templates/repo/issue/view_title.tmpl diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 4425994..f23095d 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -2,44 +2,97 @@
{{template "repo/header" .}}
-
-
- {{template "repo/issue/navbar" .}} -
-
- {{template "repo/issue/search" .}} -
- {{if not .Repository.IsArchived}} -
- {{if .PageIsIssueList}} - {{if .IsSigned}} - {{.locale.Tr "repo.issues.new"}} + + {{if .PinnedIssues}} +
+ {{range .PinnedIssues}} +
+ {{if eq $.Project.CardType 1}} +
+ {{range (index $.issuesAttachmentMap .ID)}} + {{.Name}} + {{end}} +
+ {{end}} +
+
+
+ {{template "shared/issueicon" .}} +
+ {{.Title | RenderEmoji $.Context | RenderCodeBlock}} + {{if $.IsRepoAdmin}} + + {{svg "octicon-x" 16}} + + {{end}} +
+
+ + #{{.Index}} + {{$timeStr := TimeSinceUnix .GetLastEventTimestamp $.locale}} + {{if .OriginalAuthor}} + {{$.locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape) | Safe}} + {{else if gt .Poster.ID 0}} + {{$.locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape) | Safe}} + {{else}} + {{$.locale.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}} + {{end}} + +
+ {{- if .MilestoneID}} + + {{- end}} +
+ + {{if or .Labels .Assignees}} +
+ {{range .Labels}} + {{RenderLabel $.Context .}} {{end}} - Helpdesk - {{else}} - {{.locale.Tr "repo.pulls.new"}} +
+ {{range .Assignees}} + {{avatar $.Context . 28 "mini gt-mr-3"}} + {{end}} +
+
{{end}}
+ {{end}} +
+ {{end}} + +
+ {{template "repo/issue/navbar" .}} + {{template "repo/issue/search" .}} + {{if not .Repository.IsArchived}} + {{if .PageIsIssueList}} + {{.locale.Tr "repo.issues.new"}} + Helpdesk + {{else}} + {{.locale.Tr "repo.pulls.new"}} + {{end}} {{else}} {{if not .PageIsIssueList}} - + {{$.locale.Tr "action.compare_commits_general"}} {{end}} {{end}}
-
-
-
- {{if $.CanWriteIssuesOrPulls}} - +
+
+ {{if and ($.CanWriteIssuesOrPulls) (gt (len .Issues) 0)}} + {{end}} {{template "repo/issue/openclose" .}}
-
- -
-
+ +
+
{{template "repo/issue/openclose" .}}
- {{/* Ten wide does not cope well and makes the columns stack. - This seems to be related to jQuery's hide/show: in fact, switching - issue-actions and issue-filters and having this ten wide will show - this one correctly, but not the other one. */}} -
-