diff options
Diffstat (limited to 'templates/repo/issue/list.tmpl')
-rw-r--r-- | templates/repo/issue/list.tmpl | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 7c2f73ca59..dab6652d21 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -2,6 +2,70 @@ <div role="main" aria-label="{{.Title}}" class="page-content repository issue-list"> {{template "repo/header" .}} <div class="ui container"> + + {{if .PinnedIssues}} + <div id="issue-pins" {{if .IsRepoAdmin}}data-is-repo-admin{{end}}> + {{range .PinnedIssues}} + <div class="pinned-issue-card gt-word-break" data-move-url="{{$.Link}}/pin_move" data-issue-id="{{.ID}}"> + {{if eq $.Project.CardType 1}} + <div class="card-attachment-images"> + {{range (index $.issuesAttachmentMap .ID)}} + <img src="{{.DownloadURL}}" alt="{{.Name}}"> + {{end}} + </div> + {{end}} + <div class="content gt-p-0"> + <div class="header gt-df gt-items-start"> + <div class="pinned-issue-icon"> + {{template "shared/issueicon" .}} + </div> + <a class="pinned-issue-title muted issue-title" href="{{.Link}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> + {{if $.IsRepoAdmin}} + <a role="button" class="pinned-issue-unpin muted gt-df gt-ac" data-tooltip-content={{$.locale.Tr "repo.issues.unpin_issue"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Link}}/unpin/{{.ID}}"> + {{svg "octicon-x" 16}} + </a> + {{end}} + </div> + <div class="meta gt-my-2"> + <span class="text light grey"> + #{{.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}} + </span> + </div> + {{- if .MilestoneID}} + <div class="meta gt-my-2"> + <a class="milestone" href="{{$.RepoLink}}/milestone/{{.MilestoneID}}"> + {{svg "octicon-milestone" 16 "gt-mr-2 gt-vm"}} + <span class="gt-vm">{{.Milestone.Name}}</span> + </a> + </div> + {{- end}} + </div> + + {{if or .Labels .Assignees}} + <div class="extra content labels-list gt-p-0 gt-pt-2"> + {{range .Labels}} + <a href="{{$.RepoLink}}/issues?labels={{.ID}}">{{RenderLabel $.Context .}}</a> + {{end}} + <div class="right floated"> + {{range .Assignees}} + <a href="{{.HomeLink}}" data-tooltip-content="{{$.locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{avatar $.Context . 28 "mini gt-mr-3"}}</a> + {{end}} + </div> + </div> + {{end}} + </div> + {{end}} + </div> + {{end}} + <div class="list-header"> {{template "repo/issue/navbar" .}} {{template "repo/issue/search" .}} |