# HG changeset patch # User Mads Kiilerich # Date 2015-05-07 16:26:40 # Node ID 5153c491a9647a59d95b4f05efe48027fbe13e8f # Parent 293066605a4339d354d8723e4d64ad95a0a286ca comments: show status changes as a part of the comment instead of in the header This makes it obvious what the user said and there is no reason to explain what he is saying or where he is saying it. Comments will always have a text or a status change - there is no need for "No comments". 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 @@ -4215,7 +4215,7 @@ div.rst-block { clear: both; overflow: hidden; margin: 0; - padding: 0 20px 10px; + padding: 0 20px; } div.rst-block h1, 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 @@ -13,50 +13,33 @@
${co.author.username_and_name}
-
+ + ${h.age(co.modified_at)} -
+ %if co.pull_request: + ${_('on pull request')} + "${co.pull_request.title or _("No title")}" + %else: + ${_('on this changeset')} + %endif + + -
- - %if co.pull_request: - %if co.status_change: - ${_('Status change from pull request')} - "${co.pull_request.title or _("No title")}": - %else: - ${_('Comment from pull request')} - "${co.pull_request.title or _("No title")}" - %endif - %else: - %if co.status_change: - ${_('Status change on changeset')}: - %else: - ${_('Comment on changeset')} - %endif - %endif - -
- + %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or co.author.user_id == c.authuser.user_id: +
${_('Delete')}
+ %endif + +
%if co.status_change: -
-
- ${_("Status change")}: ${co.status_change[0].status_lbl} - +
+

+ ${_("Status change")}: ${co.status_change[0].status_lbl} + +

%endif - - - %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or co.author.user_id == c.authuser.user_id: -
${_('Delete')}
- %endif -
-
%if co.text: ${h.rst_w_mentions(co.text)|n} - %else: -
-

${_('No comments.')}

-
%endif