From a9580a157a39bd6d7bc046f1bada88eb5d698b9c Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Wed, 28 May 2014 15:47:03 +0200 Subject: Use the correct links, replace in search. --- app/helpers/search_helper.rb | 18 +++++++++--------- app/views/help/_layout.html.haml | 6 ------ app/views/projects/_visibility_level.html.haml | 2 +- config/routes.rb | 2 +- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index d7f3da7e537..01c31205695 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -33,15 +33,15 @@ module SearchHelper # Autocomplete results for internal help pages def help_autocomplete [ - { label: "help: API Help", url: help_api_path }, - { label: "help: Markdown Help", url: help_markdown_path }, - { label: "help: Permissions Help", url: help_permissions_path }, - { label: "help: Public Access Help", url: help_public_access_path }, - { label: "help: Rake Tasks Help", url: help_raketasks_path }, - { label: "help: SSH Keys Help", url: help_ssh_path }, - { label: "help: System Hooks Help", url: help_system_hooks_path }, - { label: "help: Web Hooks Help", url: help_web_hooks_path }, - { label: "help: Workflow Help", url: help_workflow_path }, + { label: "help: API Help", url: help_page_path("api", "README") }, + { label: "help: Markdown Help", url: help_page_path("markdown", "markdown") }, + { label: "help: Permissions Help", url: help_page_path("permissions", "permissions") }, + { label: "help: Public Access Help", url: help_page_path("public_access", "public_access") }, + { label: "help: Rake Tasks Help", url: help_page_path("raketasks", "README") }, + { label: "help: SSH Keys Help", url: help_page_path("ssh", "README") }, + { label: "help: System Hooks Help", url: help_page_path("system_hooks", "system_hooks") }, + { label: "help: Web Hooks Help", url: help_page_path("web_hooks", "web_hooks") }, + { label: "help: Workflow Help", url: help_page_path("workflow", "README") }, ] end diff --git a/app/views/help/_layout.html.haml b/app/views/help/_layout.html.haml index 72547ed0141..93a746c60ea 100644 --- a/app/views/help/_layout.html.haml +++ b/app/views/help/_layout.html.haml @@ -1,12 +1,6 @@ .row .col-md-3 %h3.page-title Help - / %ul.nav.nav-pills.nav-stacked - / - 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} - / - links.each do |title,path| - / %li{class: current_page?(path) ? 'active' : nil} - / = link_to title, path - .col-md-9 .wiki = yield diff --git a/app/views/projects/_visibility_level.html.haml b/app/views/projects/_visibility_level.html.haml index eb38fce0ecf..5f34e66b3ed 100644 --- a/app/views/projects/_visibility_level.html.haml +++ b/app/views/projects/_visibility_level.html.haml @@ -1,7 +1,7 @@ .form-group.project-visibility-level-holder = f.label :visibility_level, class: 'control-label' do Visibility Level - = link_to "(?)", help_public_access_path + = link_to "(?)", help_page_path("public_access", "public_access") .col-sm-10 - if can_change_visibility_level - Gitlab::VisibilityLevel.values.each do |level| diff --git a/config/routes.rb b/config/routes.rb index bab8fb1d218..38e6727b190 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -33,7 +33,7 @@ Gitlab::Application.routes.draw do # get 'help' => 'help#index' - get 'help/:category/:file' => 'help#show' + get 'help/:category/:file' => 'help#show', as: :help_page # # Global snippets -- cgit v1.2.3