Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-01-05 22:54:59 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-01-05 22:54:59 +0300
commit43053c2e6f03ad60f85728f36c46588979f68024 (patch)
tree36c7234134d76bc98092973c3f0b6774e049490b /app
parenta298f694327b1241fc0d06618228e3750c20c5a1 (diff)
Make `page_description` less magical :sparkles:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/page_layout_helper.rb12
-rw-r--r--app/views/layouts/group.html.haml7
-rw-r--r--app/views/layouts/project.html.haml7
3 files changed, 9 insertions, 17 deletions
diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb
index f2a4afebbd1..5c0dd36252e 100644
--- a/app/helpers/page_layout_helper.rb
+++ b/app/helpers/page_layout_helper.rb
@@ -27,7 +27,7 @@ module PageLayoutHelper
#
# Returns an HTML-safe String.
def page_description(description = nil)
- @page_description ||= page_description_default
+ @page_description ||= brand_title
if description.present?
@page_description = description.squish
@@ -36,16 +36,6 @@ module PageLayoutHelper
end
end
- # Default value for page_description when one hasn't been defined manually by
- # a view
- def page_description_default
- if @project
- @project.description || brand_title
- else
- brand_title
- end
- end
-
def page_image
default = image_url('gitlab_logo.png')
diff --git a/app/views/layouts/group.html.haml b/app/views/layouts/group.html.haml
index 31888c5580e..1ce8d0ef7b5 100644
--- a/app/views/layouts/group.html.haml
+++ b/app/views/layouts/group.html.haml
@@ -1,5 +1,6 @@
-- page_title @group.name
-- header_title group_title(@group) unless header_title
-- sidebar "group" unless sidebar
+- page_title @group.name
+- page_description @group.description
+- header_title group_title(@group) unless header_title
+- sidebar "group" unless sidebar
= render template: "layouts/application"
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index abf73bcc709..f81283a5ddb 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -1,6 +1,7 @@
-- page_title @project.name_with_namespace
-- header_title project_title(@project) unless header_title
-- sidebar "project" unless sidebar
+- page_title @project.name_with_namespace
+- page_description @project.description
+- header_title project_title(@project) unless header_title
+- sidebar "project" unless sidebar
- content_for :scripts_body_top do
- project = @target_project || @project