From 6a7990c007f2349f3093aef3e70eaa8c092033c8 Mon Sep 17 00:00:00 2001
From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Date: Sat, 14 Jun 2014 15:51:07 +0300
Subject: [PATCH] Remove garbage and apply wiki style

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
---
 app/controllers/help_controller.rb     | 11 ------
 app/views/help/_api_layout.html.haml   | 13 -------
 app/views/help/_layout.html.haml       |  6 ---
 app/views/help/api.html.haml           | 14 -------
 app/views/help/markdown.html.haml      |  6 ---
 app/views/help/permissions.html.haml   |  6 ---
 app/views/help/public_access.html.haml |  6 ---
 app/views/help/raketasks.html.haml     | 52 --------------------------
 app/views/help/security.html.haml      | 15 --------
 app/views/help/show.html.haml          |  5 +--
 app/views/help/ssh.html.haml           |  6 ---
 app/views/help/system_hooks.html.haml  |  6 ---
 app/views/help/web_hooks.html.haml     |  6 ---
 app/views/help/workflow.html.haml      |  6 ---
 14 files changed, 2 insertions(+), 156 deletions(-)
 delete mode 100644 app/views/help/_api_layout.html.haml
 delete mode 100644 app/views/help/_layout.html.haml
 delete mode 100644 app/views/help/api.html.haml
 delete mode 100644 app/views/help/markdown.html.haml
 delete mode 100644 app/views/help/permissions.html.haml
 delete mode 100644 app/views/help/public_access.html.haml
 delete mode 100644 app/views/help/raketasks.html.haml
 delete mode 100644 app/views/help/security.html.haml
 delete mode 100644 app/views/help/ssh.html.haml
 delete mode 100644 app/views/help/system_hooks.html.haml
 delete mode 100644 app/views/help/web_hooks.html.haml
 delete mode 100644 app/views/help/workflow.html.haml

diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb
index a4fcd4b29e82b..fc498559d6b25 100644
--- a/app/controllers/help_controller.rb
+++ b/app/controllers/help_controller.rb
@@ -2,17 +2,6 @@ class HelpController < ApplicationController
   def index
   end
 
-  def api
-    @category = params[:category]
-    @category = "README" if @category.blank?
-
-    if File.exists?(Rails.root.join('doc', 'api', @category + '.md'))
-      render 'api'
-    else
-      not_found!
-    end
-  end
-
   def show
     @category = params[:category]
     @file = params[:file]
diff --git a/app/views/help/_api_layout.html.haml b/app/views/help/_api_layout.html.haml
deleted file mode 100644
index af723f906d9e5..0000000000000
--- a/app/views/help/_api_layout.html.haml
+++ /dev/null
@@ -1,13 +0,0 @@
-.row
-  .col-md-3
-    .append-bottom-20
-      = link_to help_path, class: 'btn btn-small' do
-        %i.icon-angle-left
-        Back to help
-    %ul.nav.nav-pills.nav-stacked
-      - %w(README projects project_snippets repositories repository_files commits deploy_keys users groups session issues milestones merge_requests notes system_hooks).each do |file|
-        %li{class: file == @category ? 'active' : nil}
-          = link_to file.titleize, help_api_file_path(file)
-
-  .col-md-9.pull-right
-    = yield
diff --git a/app/views/help/_layout.html.haml b/app/views/help/_layout.html.haml
deleted file mode 100644
index 93a746c60eaef..0000000000000
--- a/app/views/help/_layout.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-.row
-  .col-md-3
-    %h3.page-title Help
-  .col-md-9
-    .wiki
-      = yield
diff --git a/app/views/help/api.html.haml b/app/views/help/api.html.haml
deleted file mode 100644
index 3d2cf50b7f216..0000000000000
--- a/app/views/help/api.html.haml
+++ /dev/null
@@ -1,14 +0,0 @@
-= render layout: 'help/api_layout' do
-  %h3.page-title
-    %span.light API
-    %span
-      \/
-    = @category.titleize
-
-  .file-holder
-    .file-title
-      %i.icon-file
-      = @category
-    .file-content.wiki
-      = preserve do
-        = markdown File.read(Rails.root.join("doc", "api", "#{@category}.md"))
diff --git a/app/views/help/markdown.html.haml b/app/views/help/markdown.html.haml
deleted file mode 100644
index ec9d13f2d6bf7..0000000000000
--- a/app/views/help/markdown.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title GitLab Flavored Markdown
-
-  .help_body
-    = preserve do
-      = markdown File.read(Rails.root.join("doc", "markdown", "markdown.md"))
diff --git a/app/views/help/permissions.html.haml b/app/views/help/permissions.html.haml
deleted file mode 100644
index 5d3ee4526fec1..0000000000000
--- a/app/views/help/permissions.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title Permissions 
-
-  .help_body
-    = preserve do
-      = markdown File.read(Rails.root.join("doc", "permissions", "permissions.md"))
diff --git a/app/views/help/public_access.html.haml b/app/views/help/public_access.html.haml
deleted file mode 100644
index d1ec3f5d5c12e..0000000000000
--- a/app/views/help/public_access.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title Public Access 
-
-  .help_body
-    = preserve do
-      = markdown File.read(Rails.root.join("doc", "public_access", "public_access.md"))
diff --git a/app/views/help/raketasks.html.haml b/app/views/help/raketasks.html.haml
deleted file mode 100644
index 61a3774a1322e..0000000000000
--- a/app/views/help/raketasks.html.haml
+++ /dev/null
@@ -1,52 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title GitLab Rake Tasks
-
-  %p.slead
-    GitLab provides some specific rake tasks to enable special features or perform maintenance tasks.
-
-  %ul.nav.nav-tabs.log-tabs
-    %li.active
-      = link_to "Maintenance", "#maintenance", 'data-toggle' => 'tab'
-    %li
-      = link_to "User Management", "#user_management", 'data-toggle' => 'tab'
-    %li
-      = link_to "Backup & Restore", "#backup_restore", 'data-toggle' => 'tab'
-    %li
-      = link_to "Cleanup", "#cleanup", 'data-toggle' => 'tab'
-
-  .tab-content
-    .tab-pane.active#maintenance
-      .file-holder
-        .file-title
-          %i.icon-file
-          Maintenance
-        .file-content.wiki
-          = preserve do
-            = markdown File.read(Rails.root.join("doc", "raketasks", "maintenance.md"))
-
-    .tab-pane#user_management
-      .file-holder
-        .file-title
-          %i.icon-file
-          User Management
-        .file-content.wiki
-          = preserve do
-            = markdown File.read(Rails.root.join("doc", "raketasks", "user_management.md"))
-
-    .tab-pane#cleanup
-      .file-holder
-        .file-title
-          %i.icon-file
-          Cleanup
-        .file-content.wiki
-          = preserve do
-            = markdown File.read(Rails.root.join("doc", "raketasks", "cleanup.md"))
-
-    .tab-pane#backup_restore
-      .file-holder
-        .file-title
-          %i.icon-file
-          Backup &amp; Restore
-        .file-content.wiki
-          = preserve do
-            = markdown File.read(Rails.root.join("doc", "raketasks", "backup_restore.md"))
diff --git a/app/views/help/security.html.haml b/app/views/help/security.html.haml
deleted file mode 100644
index 72f21e9f634d5..0000000000000
--- a/app/views/help/security.html.haml
+++ /dev/null
@@ -1,15 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title Security
-
-  %p.slead
-    If your GitLab instance is visible from the internet chances are it will be 'tested' by bots sooner or later.
-    %br
-    %br
-    %br
-    .file-holder
-      .file-title
-        %i.icon-file
-        Dealing with bruteforcing
-      .file-content.wiki
-        = preserve do
-          = markdown File.read(Rails.root.join("doc", "security", "rack_attack.md"))
diff --git a/app/views/help/show.html.haml b/app/views/help/show.html.haml
index e9fc6163c79df..67f9cc41cf365 100644
--- a/app/views/help/show.html.haml
+++ b/app/views/help/show.html.haml
@@ -1,3 +1,2 @@
-.col-md-12
-  .documentation
-    = markdown File.read(Rails.root.join('doc', @category, @file + '.md'))
+.documentation.wiki
+  = markdown File.read(Rails.root.join('doc', @category, @file + '.md'))
diff --git a/app/views/help/ssh.html.haml b/app/views/help/ssh.html.haml
deleted file mode 100644
index 75419c3dd0132..0000000000000
--- a/app/views/help/ssh.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title SSH Keys 
-
-  .help_body
-    = preserve do
-      = markdown File.read(Rails.root.join("doc", "ssh", "ssh.md")).gsub("$your_email", current_user.email)
diff --git a/app/views/help/system_hooks.html.haml b/app/views/help/system_hooks.html.haml
deleted file mode 100644
index e24f566121d3b..0000000000000
--- a/app/views/help/system_hooks.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title System hooks 
-
-  .help_body
-    = preserve do
-      = markdown File.read(Rails.root.join("doc", "system_hooks", "system_hooks.md"))
diff --git a/app/views/help/web_hooks.html.haml b/app/views/help/web_hooks.html.haml
deleted file mode 100644
index 9e2b54ab6ecdd..0000000000000
--- a/app/views/help/web_hooks.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title Project web hooks 
-
-  .help_body
-    = preserve do
-      = markdown File.read(Rails.root.join("doc", "web_hooks", "web_hooks.md"))
diff --git a/app/views/help/workflow.html.haml b/app/views/help/workflow.html.haml
deleted file mode 100644
index 47de4ad796cdd..0000000000000
--- a/app/views/help/workflow.html.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-= render layout: 'help/layout' do
-  %h3.page-title Workflow 
-
-  .help_body
-    = preserve do
-      = markdown File.read(Rails.root.join("doc", "workflow", "workflow.md"))
-- 
GitLab