Browse Source

Tidy formatting

tags/last-sinatra-version
Adrian Short 6 years ago
parent
commit
4057ee21b5
2 changed files with 5 additions and 6 deletions
  1. +2
    -2
      views/electionsummary.haml
  2. +3
    -4
      views/resultsdistrict.haml

+ 2
- 2
views/electionsummary.haml View File

@@ -11,7 +11,7 @@
- unless @election_index == 0 - unless @election_index == 0
- @previous_election = @elections_for_this_body[@election_index - 1] - @previous_election = @elections_for_this_body[@election_index - 1]
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@previous_election.d}", :title => "#{@previous_election.kind} #{short_date(@previous_election.d)}" }<
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@previous_election.d}", :title => "#{@previous_election.kind} #{short_date(@previous_election.d)}" }
&laquo; &laquo;
Previous Previous
= @election.body.name = @election.body.name
@@ -20,7 +20,7 @@
- unless @election_index == @elections_for_this_body.size - 1 - unless @election_index == @elections_for_this_body.size - 1
- @next_election = @elections_for_this_body[@election_index + 1] - @next_election = @elections_for_this_body[@election_index + 1]
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@next_election.d}", :title => "#{@next_election.kind} #{short_date(@next_election.d)}" }<
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@next_election.d}", :title => "#{@next_election.kind} #{short_date(@next_election.d)}" }
Next Next
= @election.body.name = @election.body.name
election election


+ 3
- 4
views/resultsdistrict.haml View File

@@ -6,22 +6,21 @@
- unless @district_index == 0 # Don't show the previous link if this is the first district for this election - unless @district_index == 0 # Don't show the previous link if this is the first district for this election
- @previous_district = @districts_in_this_election[@district_index - 1] - @previous_district = @districts_in_this_election[@district_index - 1]
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}/#{@election.body.districts_name}/#{@previous_district.slug}" }<
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}/#{@election.body.districts_name}/#{@previous_district.slug}" }
&laquo;&nbsp; &laquo;&nbsp;
= @previous_district.name = @previous_district.name
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
- unless @district_index == @districts_in_this_election.size - 1 # Don't show the next link if this is the last district for this election - unless @district_index == @districts_in_this_election.size - 1 # Don't show the next link if this is the last district for this election
- @next_district = @districts_in_this_election[@district_index + 1] - @next_district = @districts_in_this_election[@district_index + 1]
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}/#{@election.body.districts_name}/#{@next_district.slug}" }<
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}/#{@election.body.districts_name}/#{@next_district.slug}" }
= @next_district.name = @next_district.name
&raquo; &raquo;


%p %p
%a{ :href => "/bodies/#{@district.body.slug}/elections/#{@election.d}" }<
%a{ :href => "/bodies/#{@district.body.slug}/elections/#{@election.d}" }
= @body.name = @body.name
= @election.kind = @election.kind
&nbsp;
= long_date(@election.d) = long_date(@election.d)
%h1 %h1


Loading…
Cancel
Save