debian-mirror-gitlab/app/helpers/appearances_helper.rb

38 lines
636 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
module AppearancesHelper
def brand_title
2016-04-02 18:10:28 +05:30
if brand_item && brand_item.title
brand_item.title
else
'GitLab Community Edition'
end
2014-09-02 18:07:02 +05:30
end
def brand_image
2016-04-02 18:10:28 +05:30
if brand_item.logo?
image_tag brand_item.logo
else
nil
end
2014-09-02 18:07:02 +05:30
end
def brand_text
2016-04-02 18:10:28 +05:30
markdown(brand_item.description)
end
def brand_item
@appearance ||= Appearance.first
2014-09-02 18:07:02 +05:30
end
2015-04-26 12:48:37 +05:30
def brand_header_logo
2016-04-02 18:10:28 +05:30
if brand_item && brand_item.header_logo?
image_tag brand_item.header_logo
else
render 'shared/logo.svg'
end
2015-04-26 12:48:37 +05:30
end
def navbar_icon(icon_name)
render "shared/icons/#{icon_name}.svg"
end
2014-09-02 18:07:02 +05:30
end