From 52c6cd8a4688a091f709791f1d92bc9a7dcf8f22 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Fri, 23 May 2014 09:03:56 +0100 Subject: [PATCH] Show results rather than candidate pages --- app.rb | 2 +- public/style.css | 2 +- views/index.haml | 4 ++-- views/layout.haml | 11 +++++------ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app.rb b/app.rb index d0c83ce..06d3350 100644 --- a/app.rb +++ b/app.rb @@ -81,7 +81,7 @@ get '/' do @p.polling_station.address, @p.polling_station.postcode] end - redirect "/bodies/sutton-council/wards/#{@ward.slug}" + redirect "/bodies/sutton-council/elections/2014-05-22/wards/#{@ward.slug}" else flash.now[:error] = "#{@postcode} is not a postcode in Sutton" end diff --git a/public/style.css b/public/style.css index b2a339d..9843bca 100644 --- a/public/style.css +++ b/public/style.css @@ -294,4 +294,4 @@ tr background-color: beige; border: 1px solid green; padding: 20px 20px; -} \ No newline at end of file +} diff --git a/views/index.haml b/views/index.haml index dab0f34..10b7736 100644 --- a/views/index.haml +++ b/views/index.haml @@ -2,11 +2,11 @@ #lookup %h2 - Vote for your local councillors in Sutton on 22 May 2014 + Sutton Council local election results 22 May 2014 %form{ :method => 'get', :action => '/' } %label{ :for => "postcode" } My postcode is %input{ :type => 'text', :name => 'postcode', :value => @default_pc, :size => 8, :maxlength => 8 } - %input{ :type => 'submit', :value => "Find my candidates" } + %input{ :type => 'submit', :value => "Find my results" } - if @future_elections.size > 0 diff --git a/views/layout.haml b/views/layout.haml index e232cf0..6218fae 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -14,12 +14,11 @@ - if flash[:error] #error %p= flash[:error] - .warning - %h1 Local and European Elections 22 May 2014 - %p Polling closed today at 10PM. If you haven't already voted you cannot vote in this election. - %p Results in the Sutton Council election are expected at around 4AM Friday 23 May. - %p Results in the European Parliament election are expected on Sunday 25 May late afternoon/evening. - %p Check back here soon for the local election results. + -# + .warning + %h1 Local and European Elections 22 May 2014 + %p Results in the Sutton Council election are now available on this website. + %p Results in the European Parliament election are expected on Sunday 25 May late afternoon/evening. = yield #footer #footer_inner