diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-03-06 13:05:52 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-04-28 09:07:19 +0100 |
commit | b5d9ed055c6b726be11519df560b6af2e19ee4d7 (patch) | |
tree | a5bfe261ad8369ff824525bdd42509736d6963bb | |
parent | e2011b5aa8dfc276d289608f5f92a2804f3b6647 (diff) |
Add a wrapper
We don't want to set absolute tops on the count and people in case
they swap around when translated to other languages.
-rw-r--r-- | app/assets/stylesheets/widget.css | 18 | ||||
-rw-r--r-- | app/views/widgets/show.html.erb | 4 |
2 files changed, 10 insertions, 12 deletions
diff --git a/app/assets/stylesheets/widget.css b/app/assets/stylesheets/widget.css index 1f730b3ea..2c7a746ba 100644 --- a/app/assets/stylesheets/widget.css +++ b/app/assets/stylesheets/widget.css @@ -83,21 +83,19 @@ a:active { width: 145px; } +.alaveteli-widget__people-count { + position: absolute; + left: 192px; + top: 44px; + width: 100px; + text-align: center; + +} .alaveteli-widget__count { - position: absolute; - left: 192px; - top: 44px; - width: 100px; font-size: 55px; - text-align: center; } .alaveteli-widget__people { - position: absolute; - left: 192px; - top: 83px; - width: 100px; - text-align: center; line-height: 1.3em; } diff --git a/app/views/widgets/show.html.erb b/app/views/widgets/show.html.erb index 5b25514d7..bf9b57e40 100644 --- a/app/views/widgets/show.html.erb +++ b/app/views/widgets/show.html.erb @@ -47,10 +47,10 @@ <% end %> </div> </div> - + <div class="alaveteli-widget__people-count"> <% count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 + WidgetVote.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) %> <%= n_('<div class="alaveteli-widget__count">{{count}}</div> <div class="alaveteli-widget__people">person wants to know</div>', '<div class="alaveteli-widget__count">{{count}}</div> <div class="alaveteli-widget__people">people want to know</div>', count, :count => count) %> - + </div> </div> <% if @user |