aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content/sidebar.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/issue/view_content/sidebar.tmpl')
-rw-r--r--templates/repo/issue/view_content/sidebar.tmpl38
1 files changed, 26 insertions, 12 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index c8e65d0900..60d2f4a561 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -530,17 +530,31 @@
{{if and .IsRepoAdmin (not .Repository.IsArchived)}}
<div class="ui divider"></div>
- <div class="ui watching">
- <button class="fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock">
- {{if .Issue.IsLocked}}
- {{svg "octicon-key"}}
- {{.locale.Tr "repo.issues.unlock"}}
- {{else}}
- {{svg "octicon-lock"}}
- {{.locale.Tr "repo.issues.lock"}}
- {{end}}
- </button>
- </div>
+
+ {{if or .PinEnabled .Issue.IsPinned}}
+ <form class="gt-mt-2" method="POST" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{.locale.Tr "repo.issues.max_pinned"}}"{{end}}>
+ {{$.CsrfTokenHtml}}
+ <button class="fluid ui button gt-df gt-jc {{if not $.NewPinAllowed}}disabled{{end}}">
+ {{if not .Issue.IsPinned}}
+ {{svg "octicon-pin" 16 "gt-mr-3"}}
+ {{.locale.Tr "pin"}}
+ {{else}}
+ {{svg "octicon-pin-slash" 16 "gt-mr-3"}}
+ {{.locale.Tr "unpin"}}
+ {{end}}
+ </button>
+ </form>
+ {{end}}
+
+ <button class="gt-mt-2 fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock">
+ {{if .Issue.IsLocked}}
+ {{svg "octicon-key"}}
+ {{.locale.Tr "repo.issues.unlock"}}
+ {{else}}
+ {{svg "octicon-lock"}}
+ {{.locale.Tr "repo.issues.lock"}}
+ {{end}}
+ </button>
<div class="ui tiny modal" id="lock">
<div class="header">
{{if .Issue.IsLocked}}
@@ -605,7 +619,7 @@
</form>
</div>
</div>
- <button class="fluid ui show-modal button negative gt-mt-3" data-modal="#delete">
+ <button class="gt-mt-2 fluid ui show-modal button negative" data-modal="#delete">
{{svg "octicon-trash"}}
{{.locale.Tr "repo.issues.delete"}}
</button>