diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 4deaac4cbe..e65738e27b 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -86,7 +86,7 @@ {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{if .Issue.IsPull}} {{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr}} {{else}} @@ -101,7 +101,7 @@ {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{if .Issue.IsPull}} {{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr}} {{else}} @@ -116,7 +116,7 @@ {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}} {{if eq $.Issue.PullRequest.Status 3}} {{ctx.Locale.Tr "repo.issues.comment_manually_pull_merged_at" (HTMLFormat `%[2]s` $link (ShortSha $.Issue.PullRequest.MergedCommitID)) (HTMLFormat "%[1]s" $.BaseTarget) $createdStr}} @@ -144,7 +144,7 @@ {{template "shared/user/avatarlink" dict "user" .Poster}} {{if eq .RefAction 3}}{{end}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}} {{if eq .RefAction 3}}{{end}} @@ -158,7 +158,7 @@ {{svg "octicon-bookmark"}} {{template "shared/user/avatarlink" dict "user" .Poster}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr}}
@@ -173,7 +173,7 @@ {{svg "octicon-tag"}} {{template "shared/user/avatarlink" dict "user" .Poster}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{if and .AddedLabels (not .RemovedLabels)}} {{ctx.Locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (ctx.RenderUtils.RenderLabels .AddedLabels $.RepoLink .Issue) $createdStr}} {{else if and (not .AddedLabels) .RemovedLabels}} @@ -376,7 +376,7 @@ {{if .Review}}{{svg (printf "octicon-%s" .Review.Type.Icon)}}{{end}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{if eq $reviewType 1}} {{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}} {{else if eq $reviewType 2}} @@ -488,7 +488,7 @@ {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{ctx.Locale.Tr "repo.pulls.change_target_branch_at" .OldRef .NewRef $createdStr}}
@@ -588,7 +588,7 @@ {{svg "octicon-project"}} {{template "shared/user/avatarlink" dict "user" .Poster}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{$newProjectDisplay := .CommentMetaData.ProjectTitle}} {{if .Project}} {{$trKey := printf "projects.type-%d.display_name" .Project.Type}} @@ -663,7 +663,7 @@
{{svg "octicon-git-merge" 16}} - {{template "repo/issue/view_content/comments_authorlink" dict "comment" .}} + {{template "repo/issue/view_content/comments_authorlink" dict "Repository" $.Repository "comment" .}} {{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr}} {{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr}}{{end}} diff --git a/templates/repo/issue/view_content/comments_authorlink.tmpl b/templates/repo/issue/view_content/comments_authorlink.tmpl index 0098f1e99c..adddc21be4 100644 --- a/templates/repo/issue/view_content/comments_authorlink.tmpl +++ b/templates/repo/issue/view_content/comments_authorlink.tmpl @@ -1,10 +1,10 @@ {{if .comment.OriginalAuthor}} - {{svg (MigrationIcon ctx.Repository.GetOriginalURLHostname)}} + {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} {{.comment.OriginalAuthor}} - {{if ctx.Repository.OriginalURL}} - ({{ctx.Locale.Tr "repo.migrated_from" ctx.Repository.OriginalURL ctx.Repository.GetOriginalURLHostname}}) + {{if .Repository.OriginalURL}} + ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}) {{end}} {{else}} {{$specialDoerHtml := .comment.MetaSpecialDoerTr ctx.Locale}}