Commit fd476cf6 authored by Job van der Voort's avatar Job van der Voort Committed by Marin Jankovski

render items from doc

parent e61e3eaa
......@@ -13,6 +13,17 @@ class HelpController < ApplicationController
end
end
def show
@category = params[:category]
@file = params[:file]
if File.exists?(Rails.root.join('doc', @category, @file + '.md'))
render 'show'
else
not_found!
end
end
def shortcuts
end
end
.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
/ %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
......
= markdown File.read(Rails.root.join('doc', @category, @file + '.md'))
......@@ -31,19 +31,9 @@ Gitlab::Application.routes.draw do
#
# Help
#
get 'help' => 'help#index'
get 'help/api' => 'help#api'
get 'help/api/:category' => 'help#api', as: 'help_api_file'
get 'help/markdown' => 'help#markdown'
get 'help/permissions' => 'help#permissions'
get 'help/public_access' => 'help#public_access'
get 'help/raketasks' => 'help#raketasks'
get 'help/ssh' => 'help#ssh'
get 'help/system_hooks' => 'help#system_hooks'
get 'help/web_hooks' => 'help#web_hooks'
get 'help/workflow' => 'help#workflow'
get 'help/shortcuts'
get 'help/security'
get 'help/:category/:file' => 'help#show'
#
# Global snippets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment