File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
app/views/content/display Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 16
16
preview_image = get_preview_image ( regular_images , basil_images )
17
17
combined_images = preview_image . present? ? [ preview_image ] : [ ]
18
18
19
- # If we have no images, try to add a default image
20
- if combined_images . empty? && @content . respond_to? ( :default_image )
21
- default_image = @content . default_image
22
- if default_image . present?
19
+ # If we have no images, add the card-header fallback image
20
+ if combined_images . empty?
21
+ card_header_path = @content . header_asset_for ( @content . class . name )
22
+ if card_header_path . present?
23
23
combined_images << {
24
- type : 'default ' ,
25
- data : default_image
24
+ type : 'card_header ' ,
25
+ data : card_header_path
26
26
}
27
27
end
28
28
end
42
42
<% else %>
43
43
<%= image_tag asset_path ( "missing-image.jpg" ) %>
44
44
<% end %>
45
- <% elsif image_type == 'default ' && image_data . is_a? ( String ) %>
46
- < img src =" < %= image_data %> " >
45
+ <% elsif image_type == 'card_header ' && image_data . is_a? ( String ) %>
46
+ <%= image_tag image_data %>
47
47
<% end %>
48
48
< div class ="caption bordered-text center ">
49
49
< h3 >
You can’t perform that action at this time.
0 commit comments