]> git.openstreetmap.org Git - rails.git/commitdiff
Display number of comments in changeset list
authorSimon Legner <Simon.Legner@gmail.com>
Thu, 27 Aug 2015 18:50:05 +0000 (20:50 +0200)
committerSimon Legner <Simon.Legner@gmail.com>
Thu, 27 Aug 2015 19:26:31 +0000 (21:26 +0200)
app/assets/images/sprite.png
app/assets/images/sprite.svg
app/assets/stylesheets/common.scss
app/controllers/changeset_controller.rb
app/views/changeset/_changeset.html.erb

index d5577d4b7121a50486799d697e50f189dcfc835f..c511bd90fbc7db6e940d6abce045033eca31df44 100644 (file)
Binary files a/app/assets/images/sprite.png and b/app/assets/images/sprite.png differ
index b50b969e909620ce71400c28d5c54c4dc409e1f4..92350301d81c708c6c41306ae5a3397c0055878a 100644 (file)
@@ -13,7 +13,7 @@
    height="200"
    id="svg2"
    version="1.1"
    height="200"
    id="svg2"
    version="1.1"
-   inkscape:version="0.48.4 r9939"
+   inkscape:version="0.91 r13725"
    inkscape:export-filename="/home/tom/rails/app/assets/images/sprite.png"
    inkscape:export-xdpi="90"
    inkscape:export-ydpi="90"
    inkscape:export-filename="/home/tom/rails/app/assets/images/sprite.png"
    inkscape:export-xdpi="90"
    inkscape:export-ydpi="90"
          id="tspan3023"
          x="264.8125"
          y="869.62622">?</tspan></text>
          id="tspan3023"
          x="264.8125"
          y="869.62622">?</tspan></text>
+    <path
+       sodipodi:nodetypes="cccccccccccc"
+       inkscape:connector-curvature="0"
+       id="path3386"
+       d="m 244,884.36218 0,-7 1,-1 10,0 1,1 0,7 -1,1 -3,0 -2,3 -2,-3 -3,0 z"
+       style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;marker:none;enable-background:accumulate" />
   </g>
 </svg>
   </g>
 </svg>
index 6706aa6ed9321b5e5c6ce5b14003a046ba91d3f3..009082e2893937ae7d26ac89d5b0f8bdfe44be89 100644 (file)
@@ -175,6 +175,7 @@ small, aside {
 .icon.close:hover { background-position: -200px -20px; }
 .icon.check       { background-position: -220px 0; }
 .icon.note        { background-position: -240px 0; }
 .icon.close:hover { background-position: -200px -20px; }
 .icon.check       { background-position: -220px 0; }
 .icon.note        { background-position: -240px 0; }
+.icon.note.grey   { background-position: -240px -20px; }
 .icon.query       { background-position: -260px 0; }
 
 /* Rules for links */
 .icon.query       { background-position: -260px 0; }
 
 /* Rules for links */
@@ -1059,6 +1060,15 @@ tr.turn:hover {
       color: #000;
     }
   }
       color: #000;
     }
   }
+
+  .comments {
+    float: right;
+    color: #999;
+  }
+
+  .comments-0 {
+    opacity: 0.5;
+  }
 }
 
 /* Rules for the browse sidebar */
 }
 
 /* Rules for the browse sidebar */
index 2ce024c76476d4332550f7e99fed2c8b7a83c261..5b55980e3e93f0ff41f070a339b5fc38036bd1cd 100644 (file)
@@ -294,7 +294,7 @@ class ChangesetController < ApplicationController
         changesets = changesets.where("changesets.id <= ?", params[:max_id])
       end
 
         changesets = changesets.where("changesets.id <= ?", params[:max_id])
       end
 
-      @edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags)
+      @edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags, :comments)
 
       render :action => :list, :layout => false
     end
 
       render :action => :list, :layout => false
     end
index cbc60695b80a137e8d3fbffbe2bd2c06b6d84155..f27b0bc911be60723a8788d7efc304c4f2d32bab 100644 (file)
       <%= changeset.tags['comment'].to_s.presence || t('browse.no_comment') %>
     </a>
   </h4>
       <%= changeset.tags['comment'].to_s.presence || t('browse.no_comment') %>
     </a>
   </h4>
+  <div class="comments comments-<%= changeset.comments.length %>">
+    <%= changeset.comments.length %>
+    <span class="icon note grey"></span>
+  </div>
   <div class="details">
     <%= changeset_details(changeset) %>
     &middot;
   <div class="details">
     <%= changeset_details(changeset) %>
     &middot;