From 8c4b6d426d11de682db601a5ca585c11bcd0cd23 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 30 Apr 2015 21:28:07 +0200 Subject: Set head panel title of help section. --- app/controllers/help_controller.rb | 7 +++++++ app/views/help/index.html.haml | 1 - app/views/help/show.html.haml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index b405cc7e689..2842151e3bd 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -1,4 +1,6 @@ class HelpController < ApplicationController + before_action :set_title + def index end @@ -44,6 +46,11 @@ class HelpController < ApplicationController private + def set_title + @title = "Help" + @title_url = help_path + end + def path_params params.require(:category) params.require(:file) diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index 9ebdd373f39..af39dfeac5b 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -1,4 +1,3 @@ -- page_title "Help" %div %h1 GitLab diff --git a/app/views/help/show.html.haml b/app/views/help/show.html.haml index bc8e08eeae4..8551496b98a 100644 --- a/app/views/help/show.html.haml +++ b/app/views/help/show.html.haml @@ -1,3 +1,3 @@ -- page_title @file.humanize, *@category.split("/").reverse.map(&:humanize), "Help" +- page_title @file.humanize, *@category.split("/").reverse.map(&:humanize) .documentation.wiki = markdown @markdown.gsub('$your_email', current_user.email) -- cgit v1.2.1