From: Simon Legner Date: Thu, 27 Aug 2015 18:50:05 +0000 (+0200) Subject: Display number of comments in changeset list X-Git-Tag: live~4575^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/91bd0b4b12469746a6e867332262907e35b2a013?hp=--cc Display number of comments in changeset list --- 91bd0b4b12469746a6e867332262907e35b2a013 diff --git a/app/assets/images/sprite.png b/app/assets/images/sprite.png index d5577d4b7..c511bd90f 100644 Binary files a/app/assets/images/sprite.png and b/app/assets/images/sprite.png differ diff --git a/app/assets/images/sprite.svg b/app/assets/images/sprite.svg index b50b969e9..92350301d 100644 --- a/app/assets/images/sprite.svg +++ b/app/assets/images/sprite.svg @@ -13,7 +13,7 @@ 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" @@ -280,5 +280,11 @@ id="tspan3023" x="264.8125" y="869.62622">? + diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 6706aa6ed..009082e28 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -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.note.grey { background-position: -240px -20px; } .icon.query { background-position: -260px 0; } /* Rules for links */ @@ -1059,6 +1060,15 @@ tr.turn:hover { color: #000; } } + + .comments { + float: right; + color: #999; + } + + .comments-0 { + opacity: 0.5; + } } /* Rules for the browse sidebar */ diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index 2ce024c76..5b55980e3 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -294,7 +294,7 @@ class ChangesetController < ApplicationController 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 diff --git a/app/views/changeset/_changeset.html.erb b/app/views/changeset/_changeset.html.erb index cbc60695b..f27b0bc91 100644 --- a/app/views/changeset/_changeset.html.erb +++ b/app/views/changeset/_changeset.html.erb @@ -18,6 +18,10 @@ <%= changeset.tags['comment'].to_s.presence || t('browse.no_comment') %> +
+ <%= changeset.comments.length %> + +
<%= changeset_details(changeset) %> ·