1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add watch button on issue

This commit is contained in:
Andrey Nering
2017-03-29 20:31:47 -03:00
parent a0d0de7233
commit b674460748
6 changed files with 111 additions and 0 deletions

View File

@@ -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>