diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 4c14e0801..b6fe04be6 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 000000000..36f21822a --- /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 000000000..bbbc09955 --- /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}} + +
+