From 20321d56606a29a168aeaf58a9b823d11a736df1 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 21 Jan 2015 19:01:09 +0100 Subject: [PATCH] vues --- app/views/forum/forum_topics/_forum_topic.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/forum/forum_topics/_forum_topic.haml b/app/views/forum/forum_topics/_forum_topic.haml index 485bf59..ba929e2 100644 --- a/app/views/forum/forum_topics/_forum_topic.haml +++ b/app/views/forum/forum_topics/_forum_topic.haml @@ -4,9 +4,10 @@ %td{:style => "width:100px;"} =forum_topic.forum_messages.count - 1 %br - vu - = forum_topic.forum_user_topic_vieweds.count - fois + -views = forum_topic.forum_user_topic_vieweds.count + =views + =views > 1 ? "vues" : "vue" + -#views = forum_topic.forum_user_topic_vieweds.select("DISTINCT forum_user_id").count %td{:style => "width:160px;"}