Skip to content

Commit 45d2ef5

Browse files
authored
Merge pull request #581 from Floppy/show-images-in-file-details-page
Show images in file details pages
2 parents 873b736 + ed3d789 commit 45d2ef5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/views/model_files/show.html.erb

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
<div class="row row-cols-2">
99

1010
<div class="col-9">
11-
<%= render partial: "object_preview", locals: { library: @library, model: @model, file: @file } %>
11+
<% if image?(@file.file_format) %>
12+
<%= image_tag library_model_model_file_path(@model.library, @model, @file, format: @file.file_format), alt: @file.name, style: "width: 100%" %>
13+
<% elsif renderable?(@file.file_format) %>
14+
<%= render partial: "object_preview", locals: { library: @library, model: @model, file: @file } %>
15+
<% end %>
1216
</div>
1317

1418
<div class="col-3">

0 commit comments

Comments
 (0)