diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 1dd0b1295..5e04f3405 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -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 diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 805417a65..153ce4908 100644 --- a/app/views/home/index.html.haml +++ b/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 diff --git a/app/views/polls/_box.html.haml b/app/views/polls/_box.html.haml new file mode 100644 index 000000000..41b31bf5a --- /dev/null +++ b/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)