Changeset - 5153c491a964
[Not reviewed]
default
0 2 0
Mads Kiilerich - 11 years ago 2015-05-07 16:26:40
madski@unity3d.com
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".
2 files changed with 21 insertions and 38 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -4206,25 +4206,25 @@ div.rst-block {
 
div.rst-block h2 {
 
    font-weight: normal;
 
}
 

	
 
div.rst-block {
 
    background-color: #fafafa;
 
}
 

	
 
div.rst-block {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0;
 
    padding: 0 20px 10px;
 
    padding: 0 20px;
 
}
 

	
 
div.rst-block h1,
 
div.rst-block h2,
 
div.rst-block h3,
 
div.rst-block h4,
 
div.rst-block h5,
 
div.rst-block h6 {
 
    border-bottom: 0 !important;
 
    margin: 0 !important;
 
    padding: 0 !important;
 
    line-height: 1.5em !important;
kallithea/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -4,68 +4,51 @@
 
## ${comment.comment_block(co)}
 
##
 
<%def name="comment_block(co)">
 
  <div class="comment" id="comment-${co.comment_id}" line="${co.line_no}">
 
    <div class="comment-wrapp">
 
      <div class="meta">
 
          <div style="float:left">
 
               ${h.gravatar(co.author.email, size=20)}
 
          </div>
 
          <div class="user">
 
              ${co.author.username_and_name}
 
          </div>
 
          <div class="date">
 

	
 
          <span>
 
              ${h.age(co.modified_at)}
 
          </div>
 
              %if co.pull_request:
 
                ${_('on pull request')}
 
                <a href="${co.pull_request.url()}">"${co.pull_request.title or _("No title")}"</a>
 
              %else:
 
                ${_('on this changeset')}
 
              %endif
 
              <a class="permalink" href="#comment-${co.comment_id}">&para;</a>
 
          </span>
 

	
 
       <div style="float:left;padding:4px 0px 0px 5px">
 
        <span class="">
 
         %if co.pull_request:
 
            %if co.status_change:
 
              ${_('Status change from pull request')}
 
              <a href="${co.pull_request.url()}">"${co.pull_request.title or _("No title")}"</a>:
 
            %else:
 
              ${_('Comment from pull request')}
 
              <a href="${co.pull_request.url()}">"${co.pull_request.title or _("No title")}"</a>
 
            %endif
 
         %else:
 
            %if co.status_change:
 
              ${_('Status change on changeset')}:
 
            %else:
 
              ${_('Comment on changeset')}
 
            %endif
 
         %endif
 
        </span>
 
       </div>
 

	
 
          %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or co.author.user_id == c.authuser.user_id:
 
            <div onClick="confirm('${_("Delete comment?")}') && deleteComment(${co.comment_id})" class="buttons delete-comment btn btn-mini">${_('Delete')}</div>
 
          %endif
 
      </div>
 
      <div class="text">
 
        %if co.status_change:
 
           <div  style="float:left" class="changeset-status-container">
 
             <div style="float:left;padding:10px 2px 0px 2px"></div>
 
             <span title="${_('Changeset status')}" class="changeset-status-lbl">${_("Status change")}: ${co.status_change[0].status_lbl}</span>
 
             <span class="changeset-status-ico"><i class="icon-circle changeset-status-${co.status_change[0].status}"></i></span>
 
           <div class="rst-block automatic-comment">
 
             <p>
 
               <span title="${_('Changeset status')}" class="changeset-status-lbl">${_("Status change")}: ${co.status_change[0].status_lbl}</span>
 
               <span class="changeset-status-ico"><i class="icon-circle changeset-status-${co.status_change[0].status}"></i></span>
 
             </p>
 
           </div>
 
        %endif
 

	
 
      <a class="permalink" href="#comment-${co.comment_id}">&para;</a>
 
      %if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or co.author.user_id == c.authuser.user_id:
 
          <div onClick="confirm('${_("Delete comment?")}') && deleteComment(${co.comment_id})" class="buttons delete-comment btn btn-mini">${_('Delete')}</div>
 
      %endif
 
      </div>
 
      <div class="text">
 
        %if co.text:
 
          ${h.rst_w_mentions(co.text)|n}
 
        %else:
 
          <div class="rst-block automatic-comment">
 
            <p>${_('No comments.')}</p>
 
          </div>
 
        %endif
 
      </div>
 
    </div>
 
  </div>
 
</%def>
 

	
 

	
 
<%def name="comment_inline_form()">
 
<div id='comment-inline-form-template' style="display:none">
 
  <div class="comment-inline-form ac">
 
  %if c.authuser.username != 'default':
 
    ${h.form('#', class_='inline-form')}
0 comments (0 inline, 0 general)