瀏覽代碼

Removed junk code; improved CSV download buttons

pull/3/head
Adrian Short 14 年之前
父節點
當前提交
3c47137f2d
共有 2 個文件被更改,包括 8 次插入21 次删除
  1. +1
    -21
      app.rb
  2. +7
    -0
      public/style.css

+ 1
- 21
app.rb 查看文件

@@ -6,27 +6,7 @@ require 'lib/models'


get '/' do
@directorates = Directorate.all
# @results = repository(:default).adapter.query("
# SELECT p.name,
# sum(c.votes_2010) AS votes,
# p.colour
#
# FROM parties p,
# councilcandidates c
#
# WHERE p.id = c.party_id
#
# GROUP BY p.name, p.colour
#
# ORDER BY votes desc
# ;")

# select p.name, count(c.*) AS seats
# FROM parties p, councilcandidates c
# GROUP BY p.id
@directorates = Directorate.all( :order => ['name'] )
haml :home
end



+ 7
- 0
public/style.css 查看文件

@@ -126,4 +126,11 @@ tr
margin: 15px 0;
padding: 7px;
background-color: red;
color: white;
}

.download a:hover
{
background-color: #ccc;
color: red;
}

Loading…
取消
儲存