From 203bc7bb7e352391bc1405c800ae4907d7f3fe02 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 25 Sep 2013 16:54:36 +0300 Subject: Hide some filters if current_user is nil --- app/views/shared/_project_filter.html.haml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/app/views/shared/_project_filter.html.haml b/app/views/shared/_project_filter.html.haml index 5e0f503c819..f3d032ef986 100644 --- a/app/views/shared/_project_filter.html.haml +++ b/app/views/shared/_project_filter.html.haml @@ -1,15 +1,16 @@ = form_tag project_entities_path, method: 'get' do %fieldset - %ul.nav.nav-pills.nav-stacked - %li{class: ("active" if params[:scope].blank?)} - = link_to project_filter_path(scope: nil) do - Everyone's - %li{class: ("active" if params[:scope] == 'assigned-to-me')} - = link_to project_filter_path(scope: 'assigned-to-me') do - Assigned to me - %li{class: ("active" if params[:scope] == 'created-by-me')} - = link_to project_filter_path(scope: 'created-by-me') do - Created by me + - if current_user + %ul.nav.nav-pills.nav-stacked + %li{class: ("active" if params[:scope].blank?)} + = link_to project_filter_path(scope: nil) do + Everyone's + %li{class: ("active" if params[:scope] == 'assigned-to-me')} + = link_to project_filter_path(scope: 'assigned-to-me') do + Assigned to me + %li{class: ("active" if params[:scope] == 'created-by-me')} + = link_to project_filter_path(scope: 'created-by-me') do + Created by me %ul.nav.nav-pills.nav-stacked %li{class: ("active" if params[:state].blank?)} -- cgit v1.2.1