aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrancis <francis>2009-10-14 22:24:16 +0000
committerfrancis <francis>2009-10-14 22:24:16 +0000
commit9aada48b6e911a3faf572d651726f3a110256e55 (patch)
tree5cfe93575baf344739eda228ca90a949d9c67f5a
parent8cfd7a1834ed61f500fe1a737662160708708cf1 (diff)
Various tweaks to categorisation display.
-rw-r--r--app/controllers/request_game_controller.rb5
-rw-r--r--app/views/request_game/play.rhtml7
-rw-r--r--public/stylesheets/main.css2
3 files changed, 8 insertions, 6 deletions
diff --git a/app/controllers/request_game_controller.rb b/app/controllers/request_game_controller.rb
index 265b78bbe..134a87b73 100644
--- a/app/controllers/request_game_controller.rb
+++ b/app/controllers/request_game_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_game_controller.rb,v 1.7 2009-10-14 22:10:45 francis Exp $
+# $Id: request_game_controller.rb,v 1.8 2009-10-14 22:24:16 francis Exp $
class RequestGameController < ApplicationController
@@ -14,7 +14,8 @@ class RequestGameController < ApplicationController
old = InfoRequest.find_old_unclassified(:conditions => ["prominence = 'normal'"])
@missing = old.size
@total = InfoRequest.count
- @percentage = ((@total - @missing).to_f / @total.to_f * 10000).round / 100.0
+ @done = @total - @missing
+ @percentage = (@done.to_f / @total.to_f * 10000).round / 100.0
@requests = old.sort_by{ rand }.slice(0..2)
diff --git a/app/views/request_game/play.rhtml b/app/views/request_game/play.rhtml
index b4167878b..253d2959d 100644
--- a/app/views/request_game/play.rhtml
+++ b/app/views/request_game/play.rhtml
@@ -1,8 +1,9 @@
<% @title = 'Play the request categorisation game!' %>
<div id="game_sidebar">
- <p>
- <img width=200 height=100 src="http://chart.apis.google.com/chart?chs=200x100&cht=gom&chd=t:<%=@percentage%>" alt="<%=@percentage%>% of requests have been categorised">
+ <p style="text-align: center">
+ <img width=250 height=125 src="http://chart.apis.google.com/chart?chs=250x125&cht=gom&chd=t:<%=@percentage%>" alt="<%=@percentage%>% of requests have been categorised">
+ <br><%=@done%>/<%=@total%> requests categorised
</p>
<h2>Top recent players</h2>
@@ -10,7 +11,7 @@
<% for user, count in @league_table %>
<tr>
<td> <%= user_link(user) %> </td>
- <td> <%= count %> requests </td>
+ <td> <%=pluralize(count, 'request').gsub(" ", "&nbsp;")%> </td>
</tr>
<% end %>
</table>
diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css
index 4c2e490e2..5f95bfde3 100644
--- a/public/stylesheets/main.css
+++ b/public/stylesheets/main.css
@@ -1042,7 +1042,7 @@ div.act_link img {
{
float: right;
clear: none;
- width: 12em;
+ width: 20em;
margin: 0 0 0 2em;
font-size: 0.8em;
}