diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 4c14e08013..b6fe04be63 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -44,131 +44,12 @@ {{end}}
-
- {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} -
- {{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}} - -
-
+ {{template "repo/issue/view_content/sidebar/reference" .}} {{if and .IsRepoAdmin (not .Repository.IsArchived)}}
- {{if or .PinEnabled .Issue.IsPinned}} -
- {{$.CsrfTokenHtml}} - -
- {{end}} - - - - - + {{template "repo/issue/view_content/sidebar/actions" .}} {{end}} {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}} diff --git a/templates/repo/issue/view_content/sidebar/actions.tmpl b/templates/repo/issue/view_content/sidebar/actions.tmpl new file mode 100644 index 0000000000..36f21822aa --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/actions.tmpl @@ -0,0 +1,114 @@ +{{if or .PinEnabled .Issue.IsPinned}} +
+ {{$.CsrfTokenHtml}} + +
+{{end}} + + + + + diff --git a/templates/repo/issue/view_content/sidebar/reference.tmpl b/templates/repo/issue/view_content/sidebar/reference.tmpl new file mode 100644 index 0000000000..bbbc099558 --- /dev/null +++ b/templates/repo/issue/view_content/sidebar/reference.tmpl @@ -0,0 +1,7 @@ +
+ {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} +
+ {{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}} + +
+