Mercurial > kallithea
changeset 4407:aba28699ec41
pull requests: make it possible to add comments to closed PRs
You can close a PR but you cannot close the discussion of it!
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 01 Aug 2014 20:28:42 +0200 |
parents | 980691743559 |
children | b5d079b76f72 |
files | kallithea/controllers/pullrequests.py kallithea/templates/pullrequests/pullrequest_show.html |
diffstat | 2 files changed, 6 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py Thu Jul 24 12:41:55 2014 +0200 +++ b/kallithea/controllers/pullrequests.py Fri Aug 01 20:28:42 2014 +0200 @@ -634,8 +634,7 @@ raise HTTPNotFound # load compare data into template context - enable_comments = not c.pull_request.is_closed() - self._load_compare_data(c.pull_request, enable_comments=enable_comments) + self._load_compare_data(c.pull_request, enable_comments=True) # inline comments c.inline_cnt = 0 @@ -668,8 +667,6 @@ @jsonify def comment(self, repo_name, pull_request_id): pull_request = PullRequest.get_or_404(pull_request_id) - if pull_request.is_closed(): - raise HTTPForbidden() status = request.POST.get('changeset_status') text = request.POST.get('text')
--- a/kallithea/templates/pullrequests/pullrequest_show.html Thu Jul 24 12:41:55 2014 +0200 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Fri Aug 01 20:28:42 2014 +0200 @@ -321,13 +321,11 @@ ## render comments and inlines ${comment.generate_comments()} - % if not c.pull_request.is_closed(): - ## main comment form and it status - ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, - pull_request_id=c.pull_request.pull_request_id), - c.current_voting_result, - is_pr=True, change_status=c.allowed_to_change_status)} - %endif + ## main comment form and it status + ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, + pull_request_id=c.pull_request.pull_request_id), + c.current_voting_result, + is_pr=True, change_status=c.allowed_to_change_status)} <script type="text/javascript"> $(document).ready(function(){