From 91bd0b4b12469746a6e867332262907e35b2a013 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 27 Aug 2015 20:50:05 +0200 Subject: [PATCH] Display number of comments in changeset list --- app/assets/images/sprite.png | Bin 1926 -> 3371 bytes app/assets/images/sprite.svg | 8 +++++++- app/assets/stylesheets/common.scss | 10 ++++++++++ app/controllers/changeset_controller.rb | 2 +- app/views/changeset/_changeset.html.erb | 4 ++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/app/assets/images/sprite.png b/app/assets/images/sprite.png index d5577d4b7121a50486799d697e50f189dcfc835f..c511bd90fbc7db6e940d6abce045033eca31df44 100644 GIT binary patch literal 3371 zcmeHJ`B#%!(gqbp6t!DKg=T3X$i9W8fd&RqGo##}+6_3mE za!PViQd07O^F=QyDQSI)Jt%una(m5A`%2US^aa32Rw5a)QFkQ%VU%+KT9VKC&yl{M zU2#+LcsBWxf3kNHA{iTgBU%cJ#Tp_Luc0HuQPGA;H)1M;zbZ*d9eoU3bnv-Zxx&l5 z8{~WT&FXCHltHaxAW_lbXI_&-MkA)-pl*cxf%biI5gfd>l4DF@pHQ*Db$~Q(e^XqK5+YaXz*AC_w>>P+x2_J**Ecp zojZD(!Rmr&uv$Z)24)!{se}>ziz*Sb-*_}ERa>!;1Hg@t&qlp;nm{Q$x=r2Qe?xmzPrB z8!VpPwd>Hpey<}H@}2kENmv5caXq-W2wp%W5|i{43wv=7a3U`t_~UF(#M7;c3_E+y zF`q6U=08aqpz8hP@Xo!LsISfsvw%fg*$2lK`>i`dPY8Pkc&)+^S=ukEy|_<8Bdk~j z+^Y`@#RKqvsiSuP{* zLg15&bJ%Z2z1~ywV=cC~pYQ0%Eq==as1K4|aPhY_ySel%d%sLNJx)dxyM3XTKQ}jL z1)b7DYL^ZL;ms%^JRUE!Ok@I-S5}grQvuH$2oP$6Rl~Q1GDpBHVr_@HmSEc0^(wOw zu^Cm)_q@hXgiXk2R1;QKmX-qXBM33zWl_Q7a5x2A;O_@A=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-prM+`Ix+h!aJJG%)R?u!XFvXh#c?y&%=bB1j8zs zkzbAR=JwuN^`2Tfs=(CGQgC?>+9!4N$C6ICzd~I2;F0&$pbzpD;w$k0j9K$uS7Xd z?ELQ87Af$w>U(#O5L{=esnxYqcv+n*c9ms)_Co9B`VSfpoq`9%xJ?`>04;9)G8Km#fsrRjLP`eRN=ccKN6}{&K&+piNt06n- za%oOgBFR^EWAt%}r7cfrtkzY1&xg~xrxHol!!5K2xHW%H$dZChbJEcw+fYw*(ff;m zT)Wxn`m7bkV|e4V>VxCQk4)AM!ZY5YLj*f$2Y9Y!^V*gv_EdUePG?Mav#^hcOE7wc zTc3Ey{xzm8rlZ*jpS-pn-i|xlk7$f)UJs*@l}F6n=5xs0@VP1hwZ{VqIg&BWcGGMk zgH|uSc}V5{NYB#)E5XsBC&54CGo7xdT%6=9guFcXS^Gce)h(tcv! IOz?640?rxung9R* 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) %> · -- 2.39.5