diff options
-rw-r--r-- | app/views/shared/_milestones_filter.html.haml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/views/shared/_milestones_filter.html.haml b/app/views/shared/_milestones_filter.html.haml index 4167f03da64..65cc2d6a401 100644 --- a/app/views/shared/_milestones_filter.html.haml +++ b/app/views/shared/_milestones_filter.html.haml @@ -1,15 +1,19 @@ -- counts = milestone_counts(@project.milestones) +- if @project + - counts = milestone_counts(@project.milestones) %ul.nav-links %li{class: ("active" if params[:state].blank? || params[:state] == 'opened')} = link_to milestones_filter_path(state: 'opened') do Open - %span.badge #{counts[:opened]} + - if @project + %span.badge #{counts[:opened]} %li{class: ("active" if params[:state] == 'closed')} = link_to milestones_filter_path(state: 'closed') do Closed - %span.badge #{counts[:closed]} + - if @project + %span.badge #{counts[:closed]} %li{class: ("active" if params[:state] == 'all')} = link_to milestones_filter_path(state: 'all') do All - %span.badge #{counts[:all]} + - if @project + %span.badge #{counts[:all]} |