Bläddra i källkod

Tweaks

tags/last-sinatra-version
Adrian Short 14 år sedan
förälder
incheckning
170fe79f5c
3 ändrade filer med 22 tillägg och 7 borttagningar
  1. +3
    -3
      app.rb
  2. +16
    -1
      views/home.haml
  3. +3
    -3
      views/resultsukparliament.haml

+ 3
- 3
app.rb Visa fil

@@ -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



+ 16
- 1
views/home.haml Visa fil

@@ -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


+ 3
- 3
views/resultsukparliament.haml Visa fil

@@ -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


Laddar…
Avbryt
Spara