From 2016d01d5140d54ff101ebbbe24495140473ac56 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Fri, 11 Jun 2021 16:49:48 +0200 Subject: [PATCH] suite --- app/controllers/forum/forum_topics_controller.rb | 2 +- app/views/forum/forum_topics/index.haml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/forum/forum_topics_controller.rb b/app/controllers/forum/forum_topics_controller.rb index f522894..1450f27 100644 --- a/app/controllers/forum/forum_topics_controller.rb +++ b/app/controllers/forum/forum_topics_controller.rb @@ -23,7 +23,7 @@ class Forum::ForumTopicsController < ApplicationController end def index - @forum_topics = ForumTopic.where(:enabled => true).all + @forum_topics = ForumTopic.where(:enabled => true) per_page = (params[:per_page] and params[:per_page] != "") ? params[:per_page] : 50 page = (params[:page] and params[:page] != "") ? params[:page] : 1 diff --git a/app/views/forum/forum_topics/index.haml b/app/views/forum/forum_topics/index.haml index 2eb08c8..8da45ed 100644 --- a/app/views/forum/forum_topics/index.haml +++ b/app/views/forum/forum_topics/index.haml @@ -12,10 +12,10 @@ -if moderator? %th{:style => "width:50px;"} =render @forum_topics - - - #pagination - = paginate @forum_topics + + +#pagination + = paginate @forum_topics =link_to "Lancer un fil de discussion", new_forum_forum_topic_path, :class => "btn btn-primary", :style => "margin:1em 0em;float:right" \ No newline at end of file