Commit 228386d15da884a7c8663193942a23352f35afcd

Authored by Dmitriy Zaporozhets
2 parents 68e4df70 6a7990c0

Merge branch 'cleanup-help' into 'master'

Cleanup help

Remove a lot of unused help files.
Apply `wiki` css to help content
app/controllers/help_controller.rb
@@ -2,17 +2,6 @@ class HelpController < ApplicationController @@ -2,17 +2,6 @@ class HelpController < ApplicationController
2 def index 2 def index
3 end 3 end
4 4
5 - def api  
6 - @category = params[:category]  
7 - @category = "README" if @category.blank?  
8 -  
9 - if File.exists?(Rails.root.join('doc', 'api', @category + '.md'))  
10 - render 'api'  
11 - else  
12 - not_found!  
13 - end  
14 - end  
15 -  
16 def show 5 def show
17 @category = params[:category] 6 @category = params[:category]
18 @file = params[:file] 7 @file = params[:file]
app/views/help/_api_layout.html.haml
@@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
1 -.row  
2 - .col-md-3  
3 - .append-bottom-20  
4 - = link_to help_path, class: 'btn btn-small' do  
5 - %i.icon-angle-left  
6 - Back to help  
7 - %ul.nav.nav-pills.nav-stacked  
8 - - %w(README projects project_snippets repositories repository_files commits deploy_keys users groups session issues milestones merge_requests notes system_hooks).each do |file|  
9 - %li{class: file == @category ? 'active' : nil}  
10 - = link_to file.titleize, help_api_file_path(file)  
11 -  
12 - .col-md-9.pull-right  
13 - = yield  
app/views/help/_layout.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -.row  
2 - .col-md-3  
3 - %h3.page-title Help  
4 - .col-md-9  
5 - .wiki  
6 - = yield  
app/views/help/api.html.haml
@@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
1 -= render layout: 'help/api_layout' do  
2 - %h3.page-title  
3 - %span.light API  
4 - %span  
5 - \/  
6 - = @category.titleize  
7 -  
8 - .file-holder  
9 - .file-title  
10 - %i.icon-file  
11 - = @category  
12 - .file-content.wiki  
13 - = preserve do  
14 - = markdown File.read(Rails.root.join("doc", "api", "#{@category}.md"))  
app/views/help/markdown.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title GitLab Flavored Markdown  
3 -  
4 - .help_body  
5 - = preserve do  
6 - = markdown File.read(Rails.root.join("doc", "markdown", "markdown.md"))  
app/views/help/permissions.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title Permissions  
3 -  
4 - .help_body  
5 - = preserve do  
6 - = markdown File.read(Rails.root.join("doc", "permissions", "permissions.md"))  
app/views/help/public_access.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title Public Access  
3 -  
4 - .help_body  
5 - = preserve do  
6 - = markdown File.read(Rails.root.join("doc", "public_access", "public_access.md"))  
app/views/help/raketasks.html.haml
@@ -1,52 +0,0 @@ @@ -1,52 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title GitLab Rake Tasks  
3 -  
4 - %p.slead  
5 - GitLab provides some specific rake tasks to enable special features or perform maintenance tasks.  
6 -  
7 - %ul.nav.nav-tabs.log-tabs  
8 - %li.active  
9 - = link_to "Maintenance", "#maintenance", 'data-toggle' => 'tab'  
10 - %li  
11 - = link_to "User Management", "#user_management", 'data-toggle' => 'tab'  
12 - %li  
13 - = link_to "Backup & Restore", "#backup_restore", 'data-toggle' => 'tab'  
14 - %li  
15 - = link_to "Cleanup", "#cleanup", 'data-toggle' => 'tab'  
16 -  
17 - .tab-content  
18 - .tab-pane.active#maintenance  
19 - .file-holder  
20 - .file-title  
21 - %i.icon-file  
22 - Maintenance  
23 - .file-content.wiki  
24 - = preserve do  
25 - = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md"))  
26 -  
27 - .tab-pane#user_management  
28 - .file-holder  
29 - .file-title  
30 - %i.icon-file  
31 - User Management  
32 - .file-content.wiki  
33 - = preserve do  
34 - = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md"))  
35 -  
36 - .tab-pane#cleanup  
37 - .file-holder  
38 - .file-title  
39 - %i.icon-file  
40 - Cleanup  
41 - .file-content.wiki  
42 - = preserve do  
43 - = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md"))  
44 -  
45 - .tab-pane#backup_restore  
46 - .file-holder  
47 - .file-title  
48 - %i.icon-file  
49 - Backup & Restore  
50 - .file-content.wiki  
51 - = preserve do  
52 - = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md"))  
app/views/help/security.html.haml
@@ -1,15 +0,0 @@ @@ -1,15 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title Security  
3 -  
4 - %p.slead  
5 - If your GitLab instance is visible from the internet chances are it will be 'tested' by bots sooner or later.  
6 - %br  
7 - %br  
8 - %br  
9 - .file-holder  
10 - .file-title  
11 - %i.icon-file  
12 - Dealing with bruteforcing  
13 - .file-content.wiki  
14 - = preserve do  
15 - = markdown File.read(Rails.root.join("doc", "security", "rack_attack.md"))  
app/views/help/show.html.haml
1 -.col-md-12  
2 - .documentation  
3 - = markdown File.read(Rails.root.join('doc', @category, @file + '.md')) 1 +.documentation.wiki
  2 + = markdown File.read(Rails.root.join('doc', @category, @file + '.md'))
app/views/help/ssh.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title SSH Keys  
3 -  
4 - .help_body  
5 - = preserve do  
6 - = markdown File.read(Rails.root.join("doc", "ssh", "ssh.md")).gsub("$your_email", current_user.email)  
app/views/help/system_hooks.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title System hooks  
3 -  
4 - .help_body  
5 - = preserve do  
6 - = markdown File.read(Rails.root.join("doc", "system_hooks", "system_hooks.md"))  
app/views/help/web_hooks.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title Project web hooks  
3 -  
4 - .help_body  
5 - = preserve do  
6 - = markdown File.read(Rails.root.join("doc", "web_hooks", "web_hooks.md"))  
app/views/help/workflow.html.haml
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -= render layout: 'help/layout' do  
2 - %h3.page-title Workflow  
3 -  
4 - .help_body  
5 - = preserve do  
6 - = markdown File.read(Rails.root.join("doc", "workflow", "workflow.md"))