Commit a9580a157a39bd6d7bc046f1bada88eb5d698b9c

Authored by Marin Jankovski
1 parent 59797b2f

Use the correct links, replace in search.

app/helpers/search_helper.rb
... ... @@ -33,15 +33,15 @@ module SearchHelper
33 33 # Autocomplete results for internal help pages
34 34 def help_autocomplete
35 35 [
36   - { label: "help: API Help", url: help_api_path },
37   - { label: "help: Markdown Help", url: help_markdown_path },
38   - { label: "help: Permissions Help", url: help_permissions_path },
39   - { label: "help: Public Access Help", url: help_public_access_path },
40   - { label: "help: Rake Tasks Help", url: help_raketasks_path },
41   - { label: "help: SSH Keys Help", url: help_ssh_path },
42   - { label: "help: System Hooks Help", url: help_system_hooks_path },
43   - { label: "help: Web Hooks Help", url: help_web_hooks_path },
44   - { label: "help: Workflow Help", url: help_workflow_path },
  36 + { label: "help: API Help", url: help_page_path("api", "README") },
  37 + { label: "help: Markdown Help", url: help_page_path("markdown", "markdown") },
  38 + { label: "help: Permissions Help", url: help_page_path("permissions", "permissions") },
  39 + { label: "help: Public Access Help", url: help_page_path("public_access", "public_access") },
  40 + { label: "help: Rake Tasks Help", url: help_page_path("raketasks", "README") },
  41 + { label: "help: SSH Keys Help", url: help_page_path("ssh", "README") },
  42 + { label: "help: System Hooks Help", url: help_page_path("system_hooks", "system_hooks") },
  43 + { label: "help: Web Hooks Help", url: help_page_path("web_hooks", "web_hooks") },
  44 + { label: "help: Workflow Help", url: help_page_path("workflow", "README") },
45 45 ]
46 46 end
47 47  
... ...
app/views/help/_layout.html.haml
1 1 .row
2 2 .col-md-3
3 3 %h3.page-title Help
4   - / %ul.nav.nav-pills.nav-stacked
5   - / - links = {:"Workflow" => help_workflow_path, :"SSH Keys" => help_ssh_path, :"GitLab Markdown" => help_markdown_path, :"Permissions" => help_permissions_path, :"API" => help_api_path, :"Web Hooks" => help_web_hooks_path, :"Rake Tasks" => help_raketasks_path, :"System Hooks" => help_system_hooks_path, :"Public Access" => help_public_access_path, :"Security" => help_security_path}
6   - / - links.each do |title,path|
7   - / %li{class: current_page?(path) ? 'active' : nil}
8   - / = link_to title, path
9   -
10 4 .col-md-9
11 5 .wiki
12 6 = yield
... ...
app/views/projects/_visibility_level.html.haml
1 1 .form-group.project-visibility-level-holder
2 2 = f.label :visibility_level, class: 'control-label' do
3 3 Visibility Level
4   - = link_to "(?)", help_public_access_path
  4 + = link_to "(?)", help_page_path("public_access", "public_access")
5 5 .col-sm-10
6 6 - if can_change_visibility_level
7 7 - Gitlab::VisibilityLevel.values.each do |level|
... ...
config/routes.rb
... ... @@ -33,7 +33,7 @@ Gitlab::Application.routes.draw do
33 33 #
34 34  
35 35 get 'help' => 'help#index'
36   - get 'help/:category/:file' => 'help#show'
  36 + get 'help/:category/:file' => 'help#show', as: :help_page
37 37  
38 38 #
39 39 # Global snippets
... ...