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

17 lines
384 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
module BroadcastMessagesHelper
def broadcast_styling(broadcast_message)
2015-09-11 14:41:01 +05:30
styling = ''
if broadcast_message.color.present?
styling << "background-color: #{broadcast_message.color}"
styling << '; ' if broadcast_message.font.present?
2014-09-02 18:07:02 +05:30
end
2015-09-11 14:41:01 +05:30
if broadcast_message.font.present?
styling << "color: #{broadcast_message.font}"
end
styling
2014-09-02 18:07:02 +05:30
end
end