summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Rowden <hello@danrowden.com>2016-07-26 14:00:47 +0100
committerAlfredo Sumaran <alfredo@gitlab.com>2016-09-07 15:27:14 -0500
commitdb116fa0811b41c220a2dd843426d81e40db42e7 (patch)
tree9fa625bee72c1b7f88192f517499b845e7e8b712
parentda7c14442cc97e1ecd4c34ab2ef9bf2662ea241d (diff)
downloadgitlab-ce-db116fa0811b41c220a2dd843426d81e40db42e7.tar.gz
Take out of /dashboard/milestones as the helper query clashes with kaminari arrays
-rw-r--r--app/views/shared/_milestones_filter.html.haml12
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]}