Commit 203bc7bb7e352391bc1405c800ae4907d7f3fe02
1 parent
9d33c726
Exists in
master
and in
4 other branches
Hide some filters if current_user is nil
Showing
1 changed file
with
11 additions
and
10 deletions
Show diff stats
app/views/shared/_project_filter.html.haml
| 1 | 1 | = form_tag project_entities_path, method: 'get' do |
| 2 | 2 | %fieldset |
| 3 | - %ul.nav.nav-pills.nav-stacked | |
| 4 | - %li{class: ("active" if params[:scope].blank?)} | |
| 5 | - = link_to project_filter_path(scope: nil) do | |
| 6 | - Everyone's | |
| 7 | - %li{class: ("active" if params[:scope] == 'assigned-to-me')} | |
| 8 | - = link_to project_filter_path(scope: 'assigned-to-me') do | |
| 9 | - Assigned to me | |
| 10 | - %li{class: ("active" if params[:scope] == 'created-by-me')} | |
| 11 | - = link_to project_filter_path(scope: 'created-by-me') do | |
| 12 | - Created by me | |
| 3 | + - if current_user | |
| 4 | + %ul.nav.nav-pills.nav-stacked | |
| 5 | + %li{class: ("active" if params[:scope].blank?)} | |
| 6 | + = link_to project_filter_path(scope: nil) do | |
| 7 | + Everyone's | |
| 8 | + %li{class: ("active" if params[:scope] == 'assigned-to-me')} | |
| 9 | + = link_to project_filter_path(scope: 'assigned-to-me') do | |
| 10 | + Assigned to me | |
| 11 | + %li{class: ("active" if params[:scope] == 'created-by-me')} | |
| 12 | + = link_to project_filter_path(scope: 'created-by-me') do | |
| 13 | + Created by me | |
| 13 | 14 | |
| 14 | 15 | %ul.nav.nav-pills.nav-stacked |
| 15 | 16 | %li{class: ("active" if params[:state].blank?)} | ... | ... |