diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -349,7 +349,7 @@ class ChangesetController(BaseRepoContro @jsonify def comment(self, repo_name, revision): status = request.POST.get('changeset_status') - text = request.POST.get('text', '').strip() or _('No comments.') + text = request.POST.get('text', '').strip() c.co = comm = ChangesetCommentsModel().create( text=text, diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -696,7 +696,7 @@ class PullrequestsController(BaseRepoCon if allowed_to_change_status: status = request.POST.get('changeset_status') close_pr = request.POST.get('save_close') - text = request.POST.get('text', '').strip() or _('No comments.') + text = request.POST.get('text', '').strip() if close_pr: text = _('Closing.') + '\n' + text diff --git a/kallithea/model/comment.py b/kallithea/model/comment.py --- a/kallithea/model/comment.py +++ b/kallithea/model/comment.py @@ -182,7 +182,7 @@ class ChangesetCommentsModel(BaseModel): :param closing_pr: (for emails, not for comments) :param send_email: also send email """ - if not text: + if not status_change and not text: log.warning('Missing text for comment, skipping...') return diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -4347,6 +4347,10 @@ div.rst-block pre { font-size: 16px; } +.automatic-comment { + font-style: italic; +} + /** comment form **/ .status-block { diff --git a/kallithea/templates/changeset/changeset_file_comment.html b/kallithea/templates/changeset/changeset_file_comment.html --- a/kallithea/templates/changeset/changeset_file_comment.html +++ b/kallithea/templates/changeset/changeset_file_comment.html @@ -51,7 +51,13 @@ %endif
+ %if co.text: ${h.rst_w_mentions(co.text)|n} + %else: +
+

${_('No comments.')}

+
+ %endif