diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-02-18 21:55:04 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-02-18 22:55:04 +0200 |
commit | 44114b38e601c8bf44f575daef1d0e0597f37d1d (patch) | |
tree | d2d271b31bff505a09c2faf04d5fea69a9f9d58c /templates/repo/issue/view_content.tmpl | |
parent | 64ce159a6eacc81962d07a8f5ef7f69c17365363 (diff) | |
download | gitea-44114b38e601c8bf44f575daef1d0e0597f37d1d.tar.gz gitea-44114b38e601c8bf44f575daef1d0e0597f37d1d.zip |
Implement "conversation lock" for issue comments (#5073)
Diffstat (limited to 'templates/repo/issue/view_content.tmpl')
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 2b13768d54..7445dcce86 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -69,7 +69,38 @@ {{if and .Issue.IsPull (not $.Repository.IsArchived)}} {{ template "repo/issue/view_content/pull". }} {{end}} - + {{if .IsSigned}} + {{ if or .IsRepoAdmin .IsRepoIssuesWriter (or (not .Issue.IsLocked)) }} + <div class="comment form"> + <a class="avatar" href="{{.SignedUser.HomeLink}}"> + <img src="{{.SignedUser.RelAvatarLink}}"> + </a> + <div class="content"> + <form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post"> + {{template "repo/issue/comment_tab" .}} + {{.CsrfTokenHtml}} + <input id="status" name="status" type="hidden"> + <div class="text right"> + {{if and (or .IsIssueWriter .IsIssuePoster) (not .DisableStatusChange)}} + {{if .Issue.IsClosed}} + <div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen"> + {{.i18n.Tr "repo.issues.reopen_issue"}} + </div> + {{else}} + <div id="status-button" class="ui red basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.close_comment_issue"}}" data-status-val="close"> + {{.i18n.Tr "repo.issues.close_issue"}} + </div> + {{end}} + {{end}} + <button class="ui green button" tabindex="5"> + {{.i18n.Tr "repo.issues.create_comment"}} + </button> + </div> + </form> + </div> + </div> + {{ end }} + {{else}} {{if .Repository.IsArchived}} <div class="ui warning message"> {{if .Issue.IsPull}} @@ -114,6 +145,7 @@ </div> {{end}} {{end}} + {{end}} </ui> </div> |