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
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-02-22 22:49:16 +0300
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-02-26 17:50:51 +0300
commit9a2869ab4674b8a6b94ec206660e083a00d4db37 (patch)
tree312031a3cf31c736e1e4f0d7090c7e1613e1a74c /app/helpers/appearances_helper.rb
parentbb3563b5cd063772fa16c934404e7912d9f3d726 (diff)
Branded login page also in CE
The only major difference with the EE version is the change from a light and dark logo to only a header logo The dark logo wasn't used anyway, so it seemed to make sense to me to rename the field to the actual function of it
Diffstat (limited to 'app/helpers/appearances_helper.rb')
-rw-r--r--app/helpers/appearances_helper.rb28
1 files changed, 20 insertions, 8 deletions
diff --git a/app/helpers/appearances_helper.rb b/app/helpers/appearances_helper.rb
index c5820bf4c50..e0abc3a2869 100644
--- a/app/helpers/appearances_helper.rb
+++ b/app/helpers/appearances_helper.rb
@@ -1,21 +1,33 @@
module AppearancesHelper
- def brand_item
- nil
- end
-
def brand_title
- 'GitLab Community Edition'
+ if brand_item && brand_item.title
+ brand_item.title
+ else
+ 'GitLab Community Edition'
+ end
end
def brand_image
- nil
+ if brand_item.logo?
+ image_tag brand_item.logo
+ else
+ nil
+ end
end
def brand_text
- nil
+ markdown(brand_item.description)
+ end
+
+ def brand_item
+ @appearance ||= Appearance.first
end
def brand_header_logo
- render 'shared/logo.svg'
+ if brand_item && brand_item.header_logo?
+ image_tag brand_item.header_logo
+ else
+ render 'shared/logo.svg'
+ end
end
end