Welcome to mirror list, hosted at ThFree Co, Russian Federation.

broadcast_messages_helper.rb « helpers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6484dca6b5539dd97016fa2403bf87de5b6286a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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