浏览代码

Tidy formatting

tags/last-sinatra-version
Adrian Short 6 年前
父节点
当前提交
4057ee21b5
共有 2 个文件被更改,包括 5 次插入6 次删除
  1. +2
    -2
      views/electionsummary.haml
  2. +3
    -4
      views/resultsdistrict.haml

+ 2
- 2
views/electionsummary.haml 查看文件

@@ -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 查看文件

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


正在加载...
取消
保存