Show dashboard related options in the search dropdown.

This commit is contained in:
Fatih Acet 2016-06-07 14:49:25 +03:00
parent 495d27be38
commit 36f67b305f
1 changed files with 5 additions and 3 deletions

View File

@ -132,12 +132,14 @@ class @SearchAutocomplete
getCategoryContents: ->
userId = gon.current_user_id
projectName = 'Dashboard'
projectSlug = gl.utils.getProjectSlug()
projectOptions = gl.projectOptions[projectSlug]
return null if not projectSlug or not projectOptions
{ issuesPath, mrPath, projectName } = projectOptions
if projectSlug and projectOptions
{ issuesPath, mrPath, projectName } = projectOptions
else
{ issuesPath, mrPath } = gl.dashboardOptions
return [
{ header: "Go to in #{projectName}" }