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 1616 preview_image = get_preview_image ( regular_images , basil_images )
1717 combined_images = preview_image . present? ? [ preview_image ] : [ ]
1818
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?
2323 combined_images << {
24- type : 'default ' ,
25- data : default_image
24+ type : 'card_header ' ,
25+ data : card_header_path
2626 }
2727 end
2828 end
4242 <% else %>
4343 <%= image_tag asset_path ( "missing-image.jpg" ) %>
4444 <% 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 %>
4747 <% end %>
4848 < div class ="caption bordered-text center ">
4949 < h3 >
You can’t perform that action at this time.
0 commit comments