gitlab-org--gitlab-foss/app/helpers/broadcast_messages_helper.rb
2015-06-22 12:13:46 +02:00

16 lines
384 B
Ruby

module BroadcastMessagesHelper
def broadcast_styling(broadcast_message)
styling = ''
if broadcast_message.color.present?
styling << "background-color: #{broadcast_message.color}"
styling << '; ' if broadcast_message.font.present?
end
if broadcast_message.font.present?
styling << "color: #{broadcast_message.font}"
end
styling
end
end