mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 23:56:09 +10:00
Conflicts: Gemfile.lock app/controllers/uploads_controller.rb app/models/application_setting.rb app/models/project_services/issue_tracker_service.rb app/views/projects/services/_form.html.haml db/schema.rb doc/integration/README.md features/steps/groups.rb
26 lines
476 B
Ruby
26 lines
476 B
Ruby
class HelpController < ApplicationController
|
|
def index
|
|
end
|
|
|
|
def show
|
|
@category = params[:category]
|
|
@file = params[:file]
|
|
format = params[:format] || 'md'
|
|
file_path = Rails.root.join('doc', @category, @file + ".#{format}")
|
|
|
|
if %w(png jpg jpeg gif).include?(format)
|
|
send_file file_path, disposition: 'inline'
|
|
elsif File.exists?(file_path)
|
|
render 'show'
|
|
else
|
|
not_found!
|
|
end
|
|
end
|
|
|
|
def shortcuts
|
|
end
|
|
|
|
def ui
|
|
end
|
|
end
|