Commit 1eb3dde4 authored by Jeroen van Baarsen's avatar Jeroen van Baarsen

Merge branch 'add-custom-text-to-help' into 'master'

Allow custom info to be added to Help page

Fixes #2536

**Admin screen**

![image](https://gitlab.com/jeroenvanbaarsen/gitlab-ce/uploads/e62f3e0ff40558fb955f09e469293521/image.png)

**Text on the Help page**

![image](https://gitlab.com/jeroenvanbaarsen/gitlab-ce/uploads/ba315fb418e1698d8f44b88c7cc6c29a/image.png)

/cc @DouweM

See merge request !1309
parents d272682a fe17a236
......@@ -53,6 +53,7 @@ v 8.0.0 (unreleased)
- Add FogBugz project import (Jared Szechy)
- Sort users autocomplete lists by user (Allister Antosik)
- Webhook for issue now contains repository field (Jungkook Park)
- Add ability to add custom text to the help page (Jeroen van Baarsen)
v 7.14.3
- No changes
......
......@@ -46,6 +46,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:gravatar_enabled,
:twitter_sharing_enabled,
:sign_in_text,
:help_page_text,
:home_page_url,
:after_sign_out_path,
:max_attachment_size,
......
......@@ -118,6 +118,11 @@
.col-sm-10
= f.text_area :sign_in_text, class: 'form-control', rows: 4
.help-block Markdown enabled
.form-group
= f.label :help_page_text, class: 'control-label col-sm-2'
.col-sm-10
= f.text_area :help_page_text, class: 'form-control', rows: 4
.help-block Markdown enabled
.form-actions
= f.submit 'Save', class: 'btn btn-primary'
......@@ -17,6 +17,9 @@
Used by more than 100,000 organizations, GitLab is the most popular solution to manage git repositories on-premises.
%br
Read more about GitLab at #{link_to promo_host, promo_url, target: '_blank'}.
- if current_application_settings.help_page_text.present?
%hr
= markdown(current_application_settings.help_page_text)
%hr
......
class AddHelpPageTextToApplicationSettings < ActiveRecord::Migration
def change
add_column :application_settings, :help_page_text, :text
end
end
......@@ -45,6 +45,7 @@ ActiveRecord::Schema.define(version: 20150916145038) do
t.string "after_sign_out_path"
t.integer "session_expire_delay", default: 10080, null: false
t.text "import_sources"
t.text "help_page_text"
end
create_table "audit_events", force: true do |t|
......
......@@ -7,6 +7,7 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps
step 'I modify settings and save form' do
uncheck 'Gravatar enabled'
fill_in 'Home page URL', with: 'https://about.gitlab.com/'
fill_in 'Help page text', with: 'Example text'
click_button 'Save'
end
......
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