Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
64008b9e
Commit
64008b9e
authored
Oct 12, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve search suggestions
parent
baf94bd7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+25
-11
No files found.
app/helpers/application_helper.rb
View file @
64008b9e
...
@@ -76,26 +76,40 @@ module ApplicationHelper
...
@@ -76,26 +76,40 @@ module ApplicationHelper
def
search_autocomplete_source
def
search_autocomplete_source
projects
=
current_user
.
projects
.
map
{
|
p
|
{
label:
p
.
name
,
url:
project_path
(
p
)
}
}
projects
=
current_user
.
projects
.
map
{
|
p
|
{
label:
p
.
name
,
url:
project_path
(
p
)
}
}
default_nav
=
[
default_nav
=
[
{
label:
"Profile"
,
url:
profile_path
},
{
label:
"
My
Profile"
,
url:
profile_path
},
{
label:
"Keys"
,
url:
keys_path
},
{
label:
"
My SSH
Keys"
,
url:
keys_path
},
{
label:
"Dashboard"
,
url:
root_path
},
{
label:
"
My
Dashboard"
,
url:
root_path
},
{
label:
"Admin
"
,
url:
admin_root_path
}
{
label:
"Admin
Section"
,
url:
admin_root_path
},
]
]
project_nav
=
[]
help_nav
=
[
{
label:
"Workflow Help"
,
url:
help_workflow_path
},
{
label:
"Permissions Help"
,
url:
help_permissions_path
},
{
label:
"Web Hooks Help"
,
url:
help_web_hooks_path
},
{
label:
"System Hooks Help"
,
url:
help_system_hooks_path
},
{
label:
"API Help"
,
url:
help_api_path
},
{
label:
"Markdown Help"
,
url:
help_markdown_path
},
{
label:
"SSH Keys Help"
,
url:
help_ssh_path
},
]
project_nav
=
[]
if
@project
&&
!
@project
.
new_record?
if
@project
&&
!
@project
.
new_record?
project_nav
=
[
project_nav
=
[
{
label:
"
#{
@project
.
name
}
/ Issues"
,
url:
project_issues_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
Issues"
,
url:
project_issues_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Wall"
,
url:
wall_project_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
Commits"
,
url:
project_commits_path
(
@project
,
@ref
||
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
/ Tree"
,
url:
project_tree_path
(
@project
,
@ref
||
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
Merge Requests"
,
url:
project_merge_requests_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Commits"
,
url:
project_commits_path
(
@project
,
@ref
||
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
Milestones"
,
url:
project_milestones_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Team"
,
url:
project_team_index_path
(
@project
)
}
{
label:
"
#{
@project
.
name
}
Snippets"
,
url:
project_snippets_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
Team"
,
url:
project_team_index_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
Tree"
,
url:
project_tree_path
(
@project
,
@ref
||
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
Wall"
,
url:
wall_project_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
Wiki"
,
url:
project_wikis_path
(
@project
)
},
]
]
end
end
[
projects
,
default_nav
,
project_nav
].
flatten
.
to_json
[
projects
,
default_nav
,
project_nav
,
help_nav
].
flatten
.
to_json
end
end
def
emoji_autocomplete_source
def
emoji_autocomplete_source
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment