ソースを参照

Used non-DM-serializer output for /scoreboard.csv

pull/3/head
Adrian Short 14年前
コミット
234a03642f
2個のファイルの変更17行の追加18行の削除
  1. +1
    -1
      app.rb
  2. +16
    -17
      views/scoreboard.haml

+ 1
- 1
app.rb ファイルの表示

@@ -166,7 +166,7 @@ get '/scoreboard.csv' do
"Content-Type" => "text/csv"
output = ""
for council in @councils
output += council.to_csv
output += "#{council.id},#{council.created_at.strftime("%d %b %Y")},#{council.updated_at.strftime("%d %b %Y")},#{council.name},#{council.slug},#{council.url},#{council.data_url},#{council.open_licence},#{council.machine_readable},#{council.start_d.strftime("%d %b %Y")},#{council.end_d.strftime("%d %b %Y")}\n"
end
labels.join(',') + "\n" + output
end


+ 16
- 17
views/scoreboard.haml ファイルの表示

@@ -1,9 +1,9 @@
.grid_12
%h2= @page_title = "Council Spending Data Scoreboard"
-#
%p.noprint.download
%a{ :href => "/scoreboard.csv" }
Download data as CSV
%p.noprint.download
%a{ :href => "/scoreboard.csv" }
Download data as CSV

%table
%tr
@@ -29,23 +29,22 @@
%td= council.end_d.strftime("%b %Y")
%td= council.updated_at.strftime("%d %b %Y")
-#
%p.highlight.noprint
This scoreboard data is free for you to use according to the
%a{ :href => "http://creativecommons.org/licenses/by/3.0/"}<
Creative Commons Attribution 3.0 Unported Licence.
Please credit to
%strong
Adrian Short/Armchair Auditor
and link back to
%a{ :href => "http://armchairauditor.co.uk/scoreboard" }<
http://armchairauditor.co.uk/scoreboard
where possible.
%p.highlight.noprint
This scoreboard data is free for you to use according to the
%a{ :href => "http://creativecommons.org/licenses/by/3.0/"}<
Creative Commons Attribution 3.0 Unported Licence.
Please credit to
%strong
Adrian Short/Armchair Auditor
and link back to
%a{ :href => "http://armchairauditor.co.uk/scoreboard" }<
http://armchairauditor.co.uk/scoreboard
where possible.
%h3 Notes
%p
If your council is publishing spending data please be aware of the guidance from the
If your council is publishing spending data please be aware of the guidance from
%a{ :href => "http://opengovernmentdata.org/finances/"}<
Open Government Data
and the


読み込み中…
キャンセル
保存