Przeglądaj źródła

Tidy formatting

tags/last-sinatra-version
Adrian Short 6 lat temu
rodzic
commit
4057ee21b5
2 zmienionych plików z 5 dodań i 6 usunięć
  1. +2
    -2
      views/electionsummary.haml
  2. +3
    -4
      views/resultsdistrict.haml

+ 2
- 2
views/electionsummary.haml Wyświetl plik

@@ -11,7 +11,7 @@
- unless @election_index == 0
- @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;
Previous
= @election.body.name
@@ -20,7 +20,7 @@
- unless @election_index == @elections_for_this_body.size - 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
= @election.body.name
election


+ 3
- 4
views/resultsdistrict.haml Wyświetl plik

@@ -6,22 +6,21 @@
- 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]
%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;
= @previous_district.name
&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
- @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
&raquo;

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


Ładowanie…
Anuluj
Zapisz