diff --git a/app.rb b/app.rb index f24c986..46e2bf4 100644 --- a/app.rb +++ b/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 diff --git a/views/scoreboard.haml b/views/scoreboard.haml index 29c0828..6033a01 100644 --- a/views/scoreboard.haml +++ b/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