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

render items from doc

parent e61e3eaa
.documentation { .documentation {
padding-bottom: 10px; padding-bottom: 10px;
p { p {
padding: 10px; padding: 10px;
margin: 0; margin: 0;
} }
li { li {
list-style-type: none; list-style-type: none;
padding-left: 10px; padding-left: 10px;
} }
} }
\ No newline at end of file
...@@ -13,6 +13,17 @@ class HelpController < ApplicationController ...@@ -13,6 +13,17 @@ class HelpController < ApplicationController
end end
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 def shortcuts
end end
end end
.row .row
.col-md-3 .col-md-3
%h3.page-title Help %h3.page-title Help
%ul.nav.nav-pills.nav-stacked / %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 = {:"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| / - links.each do |title,path|
%li{class: current_page?(path) ? 'active' : nil} / %li{class: current_page?(path) ? 'active' : nil}
= link_to title, path / = link_to title, path
.col-md-9 .col-md-9
.wiki .wiki
......
...@@ -38,4 +38,4 @@ ...@@ -38,4 +38,4 @@
.title Documentation .title Documentation
= preserve do = preserve do
= markdown File.read(Rails.root.join("doc", "README.md")) = markdown File.read(Rails.root.join("doc", "README.md"))
\ No newline at end of file
= markdown File.read(Rails.root.join('doc', @category, @file + '.md'))
...@@ -31,19 +31,9 @@ Gitlab::Application.routes.draw do ...@@ -31,19 +31,9 @@ Gitlab::Application.routes.draw do
# #
# Help # Help
# #
get 'help' => 'help#index'
get 'help/api' => 'help#api' get 'help' => 'help#index'
get 'help/api/:category' => 'help#api', as: 'help_api_file' get 'help/:category/:file' => 'help#show'
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'
# #
# Global snippets # 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