Skip to content

Commit ec8e826

Browse files
committed
Add icons for tags on materials and learning paths list
1 parent db5fc44 commit ec8e826

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

app/helpers/materials_helper.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,17 @@ def keywords_and_topics(resource, limit: nil)
119119

120120
if resource.respond_to?(:scientific_topics)
121121
tags += resource.scientific_topics.map do |term|
122-
content_tag(:span, term.preferred_label, class: 'label label-info tag-topic')
122+
content_tag(:span, class: 'label label-info tag-topic') do
123+
content_tag(:i, '', class: 'fa fa-flask') + ' ' + term.preferred_label
124+
end
123125
end
124126
end
125127

126128
if resource.respond_to?(:operations)
127129
tags += resource.operations.map do |term|
128-
content_tag(:span, term.preferred_label, class: 'label label-info tag-operation')
130+
content_tag(:span, class: 'label label-info tag-operation') do
131+
content_tag(:i, '', class: 'fa fa-cogs') + ' ' + term.preferred_label
132+
end
129133
end
130134
end
131135

0 commit comments

Comments
 (0)