]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6579 apply gravatars feedback
authorStas Vilchik <vilchiks@gmail.com>
Thu, 28 May 2015 08:39:24 +0000 (10:39 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 28 May 2015 08:39:24 +0000 (10:39 +0200)
server/sonar-web/src/main/coffee/components/issue/templates/issue-changelog.hbs
server/sonar-web/src/main/coffee/components/issue/templates/issue.hbs
server/sonar-web/src/main/js/components/common/handlebars-extensions.js
server/sonar-web/src/main/js/components/source-viewer/templates/source-viewer.hbs
server/sonar-web/src/main/less/components/source.less
server/sonar-web/src/main/less/init/misc.less

index e1cb758c5745a2c7958ef372e30ff53b263a3533..fd6f33d2d258068560ee20d76f9cc85e61138155 100644 (file)
     {{#each items}}
       <tr>
         <td class="thin text-left text-top" nowrap>{{dt creationDate}}</td>
-        <td class="thin text-left text-top" nowrap>{{userName}}</td>
+        <td class="thin text-left text-top" nowrap>
+          {{#ifShowAvatars}}{{avatarHelper email 16}}{{/ifShowAvatars}}
+          {{userName}}
+        </td>
         <td class="text-left text-top">
           {{#each diffs}}
             {{changelog this}}<br>
index b27f6b53c81f61db8a25d99391025a0d9987afea..f5a2d5e2fdaf418f2e77b06b5e955a4cc6c535f1 100644 (file)
     <div class="issue-comments">
       {{#each comments}}
         <div class="issue-comment" data-comment-key="{{key}}">
-          <div class="issue-comment-author" title="{{userName}}"><i class="icon-comment icon-half-transparent"></i>&nbsp;{{userName}}
+          <div class="issue-comment-author" title="{{userName}}">
+            {{#ifShowAvatars}}{{avatarHelper email 16}}{{else}}<i class="icon-comment icon-half-transparent"></i>{{/ifShowAvatars}}&nbsp;{{userName}}
           </div>
           <div class="issue-comment-text markdown">{{{show html htmlText}}}</div>
           <div class="issue-comment-age">({{fromNow createdAt}})</div>
index cec8c0c725b0aa0d3c66a329cd40a7db7b8de4da..44dc16d5680e367ccbe87e44e36b18c062c9ccce 100644 (file)
             .replace('{EMAIL_MD5}', emailHash)
             .replace('{SIZE}', size);
     return new Handlebars.SafeString(
-        '<img src="' + url + '" width="' + size + '" height="' + size + '" alt="' + email + '">'
+        '<img class="rounded" src="' + url + '" width="' + size + '" height="' + size + '" alt="' + email + '">'
     );
   });
 
index 1f4c3ffeb190127da4a2ea7d6da89f31cbc7bd15..123d21e86a29c81fcccc2f955c6f0f1d9b2f5649 100644 (file)
 
         <td class="source-meta source-line-scm" {{#if line}}data-line-number="{{line}}"{{/if}}>
           {{#ifSCMChanged2 ../source line}}
-            <div class="source-line-scm-inner" data-author="{{scmAuthor}}">
-              {{#gt line 0}}
-                {{avatarHelper scmAuthor 16}}
-              {{/gt}}
-            </div>
+            <div class="source-line-scm-inner" data-author="{{scmAuthor}}"></div>
           {{/ifSCMChanged2}}
         </td>
 
index c2f8237c6380522c935b0fa4e31849cb9c76476b..6e02fe6e7adcc2333948e6adfd926b7fa017d5c1 100644 (file)
 
 .source-line-scm-inner {
   max-width: 40px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+
+  &:before {
+    content: attr(data-author);
+  }
 }
 
 .source-line-bar {
index e369019dc77770b6a9699aa0899af8221c3dd00c..7c51d9d1a6295d9545525a4eed2fe797d721f39e 100644 (file)
@@ -103,6 +103,10 @@ td.spacer-top    { padding-top: 8px; }
   display: inline-block;
 }
 
+.rounded {
+  border-radius: 2px;
+}
+
 
 // Background Color