From 0ef2b13aafa99be087a7051888f1c7855a3f7df5 Mon Sep 17 00:00:00 2001 From: Marie-Elise Date: Sun, 7 Jan 2018 10:50:06 -0600 Subject: [PATCH] Set condition for admin sidebar to only show for admin users. --- app/views/layouts/_navigation.html.haml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index 76072d81..7149e2ba 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -2,8 +2,15 @@ .container .navbar-header - if @conference && @conference.short_title.present? - %button{ "data-target"=>"#side-nav", "data-toggle"=>"collapse", class: 'navbar-toggle side-nav-btn', style: 'float:right', type: 'button' } - %span.sr-only Toggle navigation + - if can? :access, Admin + %button{ "data-target"=>"#side-nav", "data-toggle"=>"collapse", class: 'navbar-toggle side-nav-btn', type: 'button' } + %span.sr-only Toggle navigation + %span.icon-bar + %span.icon-bar + %span.icon-bar + %button{"data-target"=>"#main-nav", "data-toggle"=>"collapse", class: 'navbar-toggle', type: 'button'} + %span.sr-only + Toggle navigation %span.icon-bar %span.icon-bar %span.icon-bar