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 14 insertions and 31 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -4212,13 +4212,13 @@ div.rst-block {
 
}
 

	
 
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,
kallithea/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -10,56 +10,39 @@
 
          <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>
 

	
 
       <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')}
 
                ${_('on 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')}
 
                ${_('on this changeset')}
 
            %endif
 
         %endif
 
              <a class="permalink" href="#comment-${co.comment_id}">&para;</a>
 
        </span>
 
       </div>
 

	
 
        %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>
 
        %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.status_change:
 
           <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
 
        %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>
 

	
0 comments (0 inline, 0 general)