From 170fe79f5c73fb380843ba7adf7873e66886bea3 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Fri, 7 May 2010 04:51:26 +0100 Subject: [PATCH] Tweaks --- app.rb | 6 +++--- views/home.haml | 17 ++++++++++++++++- views/resultsukparliament.haml | 6 +++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/app.rb b/app.rb index 9c67ba9..173ec42 100644 --- a/app.rb +++ b/app.rb @@ -48,9 +48,9 @@ get '/results/uk-parliament/2010-05-06/:constituency' do else const = 2 end - @constituency = Constituency.get(const) - @candidates = Parliamentcandidate.all(:constituency_id => const, :order => [ :votes_2010.desc ]) - @total_2010 = Parliamentcandidate.sum(:votes_2010, :constituency_id => const) + @constituency = Constituency.get(const) + @candidates = Parliamentcandidate.all(:constituency_id => const, :order => [ :votes_2010.desc ]) + @total_2010 = Parliamentcandidate.sum(:votes_2010, :constituency_id => const) haml :resultsukparliament end diff --git a/views/home.haml b/views/home.haml index a8cc9ec..0048ee4 100644 --- a/views/home.haml +++ b/views/home.haml @@ -1,4 +1,19 @@ -.grid_9 +.grid_12 + %h1 Sutton Elections 6 May 2010 + + %h2 UK Parliament Election Results + -# + %p + %a{ :href => '/results/uk-parliament/2010-05-06/carshalton-and-wallington' } Carshalton and Wallington Constituency + %p + %a{ :href => '/results/uk-parliament/2010-05-06/sutton-and-cheam' } Sutton and Cheam Constituency + + %h2 Sutton Council Election Results + + %p + Votes for the Sutton Council election will be counted during the day on Friday 7 May. Results will appear here as soon as they are available. + +-# %h1 Vote for your MP and %br diff --git a/views/resultsukparliament.haml b/views/resultsukparliament.haml index 6cdaf21..a279670 100644 --- a/views/resultsukparliament.haml +++ b/views/resultsukparliament.haml @@ -12,9 +12,9 @@ %tr %th %th - %th Votes - %th % - %th Change + %th.right Votes + %th.right % + %th.right Change - for candidate in @candidates - count += 1 %tr.vcard