feat(announces): anyone can read announces
This commit is contained in:
parent
ff8ed6016e
commit
e4c37758d4
11 changed files with 189 additions and 0 deletions
18
app/helpers/release_notes_helper.rb
Normal file
18
app/helpers/release_notes_helper.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
module ReleaseNotesHelper
|
||||
def announce_category_badge(category)
|
||||
color_class = case category.to_sym
|
||||
when :administrateur
|
||||
'fr-background-flat--blue-france fr-text-inverted--blue-france'
|
||||
when :instructeur
|
||||
'fr-background-contrast--yellow-tournesol'
|
||||
when :expert
|
||||
'fr-background-contrast--purple-glycine'
|
||||
when :usager
|
||||
'fr-background-contrast--green-emeraude'
|
||||
when :api
|
||||
'fr-background-contrast--blue-ecume'
|
||||
end
|
||||
|
||||
content_tag(:span, ReleaseNote.human_attribute_name("categories.#{category}"), class: "fr-badge #{color_class}")
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue