2023-08-12 18:30:28 +08:00
{{ with .Issue }}
{{ if eq $ .Page .Project .CardType 1 }} {{ / * Images and Text * / }}
<div class="card-attachment-images">
{{ range ( in dex $ .Page .issuesAttachmentMap .ID ) }}
<img src=" {{ .DownloadURL }} " alt=" {{ .Name }} " />
{{ end }}
</div>
{{ end }}
2024-02-27 22:31:41 +08:00
<div class="content gt-p-0 tw-w-full">
2024-03-22 21:45:10 +08:00
<div class="tw-flex tw-items-start">
2023-08-12 18:30:28 +08:00
<div class="issue-card-icon">
{{ template "shared/issueicon" . }}
</div>
<a class="issue-card-title muted issue-title" href=" {{ .Link }} "> {{ .Title | RenderEmoji ctx | RenderCodeBlock }} </a>
{{ if and $ .isPinnedIssueCard $ .Page .IsRepoAdmin }}
2024-03-23 03:51:29 +08:00
<a role="button" class="issue-card-unpin muted tw-flex tw-items-center" data-tooltip-content= {{ ctx .Locale .Tr "repo.issues.unpin_issue" }} data-issue-id=" {{ .ID }} " data-unpin-url=" {{ $ .Page .Link }} /unpin/ {{ .Index }} ">
2023-08-12 18:30:28 +08:00
{{ svg "octicon-x" 1 6 }}
</a>
{{ end }}
</div>
<div class="meta gt-my-2">
<span class="text light grey muted-links">
{{ if not $ .Page .Repository }} {{ .Repo .FullName }} {{ end }} # {{ .Index }}
{{ $ timeStr : = TimeSinceUnix .GetLastEventTimestamp ctx .Locale }}
{{ if .OriginalAuthor }}
2024-02-25 22:02:20 +08:00
{{ ctx .Locale .Tr .GetLastEventLabelFake $ timeStr .OriginalAuthor }}
2023-08-12 18:30:28 +08:00
{{ else if gt .Poster .ID 0 }}
2024-02-25 22:02:20 +08:00
{{ ctx .Locale .Tr .GetLastEventLabel $ timeStr .Poster .HomeLink .Poster .GetDisplayName }}
2023-08-12 18:30:28 +08:00
{{ else }}
2024-02-25 22:02:20 +08:00
{{ ctx .Locale .Tr .GetLastEventLabelFake $ timeStr .Poster .GetDisplayName }}
2023-08-12 18:30:28 +08:00
{{ end }}
</span>
</div>
{{ if .MilestoneID }}
<div class="meta gt-my-2">
2024-01-16 04:38:13 +08:00
<a class="milestone" href=" {{ .Repo .Link }} /milestone/ {{ .MilestoneID }} ">
2024-03-22 21:45:10 +08:00
{{ svg "octicon-milestone" 1 6 "gt-mr-2 tw-align-middle" }}
<span class="tw-align-middle"> {{ .Milestone .Name }} </span>
2023-08-12 18:30:28 +08:00
</a>
</div>
{{ end }}
{{ if $ .Page .LinkedPRs }}
{{ range in dex $ .Page .LinkedPRs .ID }}
<div class="meta gt-my-2">
2024-01-16 04:38:13 +08:00
<a href=" {{ $ .Issue .Repo .Link }} /pulls/ {{ .Index }} ">
2024-03-22 21:45:10 +08:00
<span class="gt-m-0 text {{ if .PullRequest .HasMerged }} purple {{ else if .IsClosed }} red {{ else }} green {{ end }} "> {{ svg "octicon-git-merge" 1 6 "gt-mr-2 tw-align-middle" }} </span>
<span class="tw-align-middle"> {{ .Title }} <span class="text light grey"># {{ .Index }} </span></span>
2023-08-12 18:30:28 +08:00
</a>
</div>
{{ end }}
{{ end }}
2023-11-02 18:42:02 +08:00
{{ $ tasks : = .GetTasks }}
{{ if gt $ tasks 0 }}
<div class="meta gt-my-2">
2024-03-22 21:45:10 +08:00
{{ svg "octicon-checklist" 1 6 "gt-mr-2 tw-align-middle" }}
<span class="tw-align-middle"> {{ .GetTasksDone }} / {{ $ tasks }} </span>
2023-11-02 18:42:02 +08:00
</div>
{{ end }}
2023-08-12 18:30:28 +08:00
</div>
{{ if or .Labels .Assignees }}
<div class="extra content labels-list gt-p-0 gt-pt-2">
{{ range .Labels }}
2024-03-14 02:00:38 +08:00
<a target="_blank" href=" {{ $ .Issue .Repo .Link }} /issues?labels= {{ .ID }} "> {{ RenderLabel ctx ctx .Locale . }} </a>
2023-08-12 18:30:28 +08:00
{{ end }}
<div class="right floated">
{{ range .Assignees }}
<a target="_blank" href=" {{ .HomeLink }} " data-tooltip-content=" {{ ctx .Locale .Tr "repo.projects.column.assigned_to" }} {{ .Name }} "> {{ ctx .AvatarUtils .Avatar . 2 8 "mini gt-mr-3" }} </a>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}