Skip to content

Commit

Permalink
Show the current poll in the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Mar 21, 2011
1 parent 5e1ed8f commit 3bf3c80
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/home_controller.rb
Expand Up @@ -11,6 +11,7 @@ def index
@order = default unless VALID_ORDERS.include?(@order)
@ppp = News.ppp
@banner = Banner.random
@poll = Poll.current
@nodes = Node.public_listing(@types, @order).page(params[:page])
end
end
3 changes: 3 additions & 0 deletions app/views/home/index.html.haml
@@ -1,3 +1,6 @@
- content_for :column do
= render 'polls/box'

=h1 "Accueil"
- feed "S'abonner au flux Atom des dépêches", "/news.atom"
- if @ppp
Expand Down
4 changes: 4 additions & 0 deletions app/views/polls/_box.html.haml
@@ -0,0 +1,4 @@
#poll_box.box
%h1 Sondage
%h2= @poll.title
= render("polls/answers_#{poll_current_or_archived @poll}", :poll => @poll)

0 comments on commit 3bf3c80

Please sign in to comment.