gitlab-org--gitlab-foss/app/helpers/broadcast_messages_helper.rb

17 lines
384 B
Ruby
Raw Normal View History

module BroadcastMessagesHelper
def broadcast_styling(broadcast_message)
2015-05-21 17:49:06 -04:00
styling = ''
if broadcast_message.color.present?
styling << "background-color: #{broadcast_message.color}"
styling << '; ' if broadcast_message.font.present?
end
2015-05-21 17:49:06 -04:00
if broadcast_message.font.present?
styling << "color: #{broadcast_message.font}"
end
styling
end
end