From feb43eaed55ca02a3eff30a6b136f7639046cc74 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Wed, 10 Dec 2014 23:14:24 +0100 Subject: [PATCH] bug forum --- app/views/layouts/forum.haml | 59 ++++++++++--------- .../20130114112013_create_forum_users.rb | 4 +- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/app/views/layouts/forum.haml b/app/views/layouts/forum.haml index a1334fb..b36356e 100644 --- a/app/views/layouts/forum.haml +++ b/app/views/layouts/forum.haml @@ -15,40 +15,41 @@ %body.admin - %nav#admin_nav.navbar.navbar-default.navbar-inverse{role: "navigation", :style => "border-radius:0;"} - .container-fluid - / Brand and toggle get grouped for better mobile display - .navbar-header - %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", type: "button"} - %span.sr-only Toggle navigation - %span.icon-bar - %span.icon-bar - %span.icon-bar - %a.navbar-brand{href: "/forum"} - =ic(:home, :icon => false) - Forum du Pic Vert + -if current_fuser + %nav#admin_nav.navbar.navbar-default.navbar-inverse{role: "navigation", :style => "border-radius:0;"} + .container-fluid + / Brand and toggle get grouped for better mobile display + .navbar-header + %button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", type: "button"} + %span.sr-only Toggle navigation + %span.icon-bar + %span.icon-bar + %span.icon-bar + %a.navbar-brand{href: "/forum"} + =ic(:home, :icon => false) + Forum du Pic Vert - #bs-example-navbar-collapse-1.collapse.navbar-collapse - %ul.nav.navbar-nav - %li=link_to "Fils de discussion", forum_forum_topics_path - %li=link_to "Utilisateurs", forum_forum_users_path - %li=link_to "Catégories", forum_forum_categories_path if moderator? + #bs-example-navbar-collapse-1.collapse.navbar-collapse + %ul.nav.navbar-nav + %li=link_to "Fils de discussion", forum_forum_topics_path + %li=link_to "Utilisateurs", forum_forum_users_path + %li=link_to "Catégories", forum_forum_categories_path if moderator? - %ul.nav.navbar-nav.navbar-right - %li.dropdown - %a{:href => "#", :class => "dropdown-toggle", :data => {:toggle => "dropdown"}} - =image_tag (current_fuser.avatar? ? current_fuser.avatar.square.url : ""), :class => "img img-rounded", :style => "height:15px;" - =current_fuser.firstname - =current_fuser.name - %b.caret - %ul.dropdown-menu - %li=link_to "Mon profil", [:forum, current_fuser] - %li= link_to "Mes paramètres", edit_forum_forum_user_path(current_fuser) - %li.divider - %li=link_to "se déconnecter", logout_forum_auths_path, :method => :delete + %ul.nav.navbar-nav.navbar-right + %li.dropdown + %a{:href => "#", :class => "dropdown-toggle", :data => {:toggle => "dropdown"}} + =image_tag (current_fuser.avatar? ? current_fuser.avatar.square.url : ""), :class => "img img-rounded", :style => "height:15px;" + =current_fuser.firstname + =current_fuser.name + %b.caret + %ul.dropdown-menu + %li=link_to "Mon profil", [:forum, current_fuser] + %li= link_to "Mes paramètres", edit_forum_forum_user_path(current_fuser) + %li.divider + %li=link_to "se déconnecter", logout_forum_auths_path, :method => :delete diff --git a/db/migrate/20130114112013_create_forum_users.rb b/db/migrate/20130114112013_create_forum_users.rb index a28f098..85a313e 100644 --- a/db/migrate/20130114112013_create_forum_users.rb +++ b/db/migrate/20130114112013_create_forum_users.rb @@ -27,8 +27,8 @@ class CreateForumUsers < ActiveRecord::Migration t.string :current_sign_in_ip t.string :last_sign_in_ip - t.boolean :lock - t.datetime :locked_at + t.boolean :lock + t.datetime :locked_at