diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-03-29 20:31:47 -0300 |
---|---|---|
committer | Andrey Nering <andrey.nering@gmail.com> | 2017-03-29 20:31:47 -0300 |
commit | b6744607484008826d18f129326664105b9d7bfc (patch) | |
tree | 77a41fe51c110e211bc1b0de95f163e62859c781 /templates/repo/issue | |
parent | a0d0de7233cd8a85d6572ae13d74078482a1ee27 (diff) | |
download | gitea-b6744607484008826d18f129326664105b9d7bfc.tar.gz gitea-b6744607484008826d18f129326664105b9d7bfc.zip |
Add watch button on issue
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/view_content/sidebar.tmpl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index ea46e5f94d..9a4a6cb1ae 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -98,5 +98,24 @@ {{end}} </div> </div> + + <div class="ui divider"></div> + + <div class="ui watching"> + <span class="text"><strong>{{.i18n.Tr "repo.issues.watch"}}</strong></span> + <div> + <form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/watch"> + <input type="hidden" name="watch" value="{{if $.IssueWatch.IsWatching}}0{{else}}1{{end}}" /> + {{$.CsrfTokenHtml}} + <button class="fluid ui button"> + {{if $.IssueWatch.IsWatching}} + {{.i18n.Tr "repo.issues.unwatch_issue"}} + {{else}} + {{.i18n.Tr "repo.issues.watch_issue"}} + {{end}} + </button> + </form> + </div> + </div> </div> </div> |