aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/issue/view_content')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl68
-rw-r--r--templates/repo/issue/view_content/sidebar.tmpl12
2 files changed, 40 insertions, 40 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 5dbd530fa5..57756e36b9 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -20,7 +20,7 @@
</span>
{{else}}
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
- {{avatar $.Context .Poster 40}}
+ {{ctx.AvatarUtils.Avatar .Poster 40}}
</a>
{{end}}
<div class="content comment-container">
@@ -40,7 +40,7 @@
{{else}}
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
- {{avatar $.Context .Poster 24}}
+ {{ctx.AvatarUtils.Avatar .Poster 24}}
</a>
{{end}}
<span class="text grey muted-links">
@@ -94,7 +94,7 @@
{{else if eq .Type 1}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge gt-bg-green gt-text-white">{{svg "octicon-dot-fill"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}}
@@ -107,7 +107,7 @@
{{else if eq .Type 2}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge gt-bg-red gt-text-white">{{svg "octicon-circle-slash"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}}
@@ -120,7 +120,7 @@
{{else if eq .Type 28}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge gt-bg-purple gt-text-white">{{svg "octicon-git-merge"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
@@ -147,7 +147,7 @@
{{$createdStr:= TimeSinceUnix .CreatedUnix $.locale}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-bookmark"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
{{if eq .RefAction 3}}<del>{{end}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
@@ -162,7 +162,7 @@
{{else if eq .Type 4}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-bookmark"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
@@ -176,7 +176,7 @@
{{if or .AddedLabels .RemovedLabels}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-tag"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if and .AddedLabels (not .RemovedLabels)}}
@@ -192,7 +192,7 @@
{{else if eq .Type 8}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-milestone"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
@@ -203,7 +203,7 @@
<span class="badge">{{svg "octicon-person"}}</span>
{{if gt .AssigneeID 0}}
{{if .RemovedAssignee}}
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Assignee}}
+ {{template "shared/user/avatarlink" dict "user" .Assignee}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .Assignee.ID}}
@@ -213,7 +213,7 @@
{{end}}
</span>
{{else}}
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Assignee}}
+ {{template "shared/user/avatarlink" dict "user" .Assignee}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .AssigneeID}}
@@ -228,7 +228,7 @@
{{else if eq .Type 10}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-pencil"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji $.Context) (.NewTitle|RenderEmoji $.Context) $createdStr | Safe}}
@@ -237,7 +237,7 @@
{{else if eq .Type 11}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-branch"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
@@ -246,7 +246,7 @@
{{else if eq .Type 12}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
@@ -255,7 +255,7 @@
{{else if eq .Type 13}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
@@ -274,7 +274,7 @@
{{else if eq .Type 14}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}}
@@ -293,7 +293,7 @@
{{else if eq .Type 15}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
@@ -302,7 +302,7 @@
{{else if eq .Type 16}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content) $createdStr | Safe}}
@@ -311,7 +311,7 @@
{{else if eq .Type 17}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$parsedDeadline := StringUtils.Split .Content "|"}}
@@ -325,7 +325,7 @@
{{else if eq .Type 18}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content) $createdStr | Safe}}
@@ -334,7 +334,7 @@
{{else if eq .Type 19}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-package-dependents"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}}
@@ -357,7 +357,7 @@
{{else if eq .Type 20}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-package-dependents"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}}
@@ -386,7 +386,7 @@
bubble. The condition depends on review type and for positive reviews whether
there is a comment element or not */}}
<a class="timeline-avatar{{if or (and (eq .Review.Type 1) (or .Content .Attachments)) (and (eq .Review.Type 2) (or .Content .Attachments)) (eq .Review.Type 3)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
- {{avatar $.Context .Poster 40}}
+ {{ctx.AvatarUtils.Avatar .Poster 40}}
</a>
{{end}}
<span class="badge{{if eq .Review.Type 1}} gt-bg-green gt-text-white{{else if eq .Review.Type 3}} gt-bg-red gt-text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
@@ -423,7 +423,7 @@
<div class="comment-header-left gt-df gt-ac">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
- {{avatar $.Context .Poster 24}}
+ {{ctx.AvatarUtils.Avatar .Poster 24}}
</a>
{{end}}
<span class="text grey muted-links">
@@ -549,7 +549,7 @@
<div class="comment-header-left gt-df gt-ac">
{{if not .OriginalAuthor}}
<a class="avatar">
- {{avatar $.Context .Poster 20}}
+ {{ctx.AvatarUtils.Avatar .Poster 20}}
</a>
{{end}}
<span class="text grey muted-links">
@@ -644,7 +644,7 @@
{{else if eq .Type 23}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-lock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
{{if .Content}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
@@ -660,7 +660,7 @@
{{else if eq .Type 24}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-key"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
@@ -669,7 +669,7 @@
{{else if eq .Type 25}}
<div class="timeline-item event">
<span class="badge">{{svg "octicon-git-branch"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
<a{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a>
{{$.locale.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
@@ -678,7 +678,7 @@
{{else if eq .Type 26}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
@@ -697,7 +697,7 @@
{{else if eq .Type 27}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-eye"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if (gt .AssigneeID 0)}}
@@ -752,7 +752,7 @@
{{if not $.UnitProjectsGlobalDisabled}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-project"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$oldProjectDisplayHtml := "Unknown Project"}}
@@ -799,7 +799,7 @@
<div class="ui top attached header comment-header-left gt-df gt-ac arrow-top">
{{if gt .Poster.ID 0}}
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
- {{avatar $.Context .Poster 24}}
+ {{ctx.AvatarUtils.Avatar .Poster 24}}
</a>
{{end}}
<span class="text grey muted-links">
@@ -822,7 +822,7 @@
{{else if eq .Type 33}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-branch"}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if and .OldRef .NewRef}}
@@ -846,7 +846,7 @@
{{else if or (eq .Type 36) (eq .Type 37)}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-pin" 16}}</span>
- {{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
+ {{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if eq .Type 36}}{{$.locale.Tr "repo.issues.pin_comment" $createdStr | Safe}}
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index 15845665bb..70aa8e53c0 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -22,7 +22,7 @@
<a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_{{.ItemID}}" {{if not .CanChange}} data-tooltip-content="{{$.locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
<span class="octicon-check {{if not .Checked}}invisible{{end}}">{{svg "octicon-check"}}</span>
<span class="text">
- {{avatar $.Context .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}}
+ {{ctx.AvatarUtils.Avatar .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}}
</span>
</a>
{{end}}
@@ -51,7 +51,7 @@
<div class="item gt-df gt-ac gt-py-3">
<div class="gt-df gt-ac gt-f1">
{{if .User}}
- <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{avatar $.Context .User 20 "gt-mr-3"}}{{.User.GetDisplayName}}</a>
+ <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20 "gt-mr-3"}}{{.User.GetDisplayName}}</a>
{{else if .Team}}
<span class="text">{{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
{{end}}
@@ -231,7 +231,7 @@
{{end}}
<span class="octicon-check {{if not $checked}}invisible{{end}}">{{svg "octicon-check"}}</span>
<span class="text">
- {{avatar $.Context . 20 "gt-mr-3"}}{{template "repo/search_name" .}}
+ {{ctx.AvatarUtils.Avatar . 20 "gt-mr-3"}}{{template "repo/search_name" .}}
</span>
</a>
{{end}}
@@ -243,7 +243,7 @@
{{range .Issue.Assignees}}
<div class="item">
<a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
- {{avatar $.Context . 28 "gt-mr-3"}}
+ {{ctx.AvatarUtils.Avatar . 28 "gt-mr-3"}}
{{.GetDisplayName}}
</a>
</div>
@@ -258,7 +258,7 @@
<div class="ui list gt-df gt-fw">
{{range .Participants}}
<a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}">
- {{avatar $.Context . 28 "gt-my-1 gt-mr-2"}}
+ {{ctx.AvatarUtils.Avatar . 28 "gt-my-1 gt-mr-2"}}
</a>
{{end}}
</div>
@@ -347,7 +347,7 @@
{{range $user, $trackedtime := .WorkingUsers}}
<div class="comment gt-mt-3">
<a class="avatar">
- {{avatar $.Context $user}}
+ {{ctx.AvatarUtils.Avatar $user}}
</a>
<div class="content">
{{template "shared/user/authorlink" $user}}