scinote-web/app/views/assets/_asset.html.erb

22 lines
556 B
Text
Raw Normal View History

2020-11-04 20:08:40 +08:00
<%
2020-11-05 15:44:48 +08:00
gallery_view_id = nil unless defined? gallery_view_id
2020-11-05 17:41:06 +08:00
deletable = asset.step.present?
editable = true
2020-11-04 20:08:40 +08:00
partial_locals = {
asset: asset,
gallery_view_id: gallery_view_id,
deletable: deletable,
editable: editable
}
%>
<div>
<% if asset.inline? %>
<%= render partial: 'assets/asset_inline', locals: partial_locals %>
<% elsif asset.list? %>
<%= render partial: 'assets/asset_list', locals: partial_locals %>
<% else %>
<%= render partial: 'assets/asset_thumbnail', locals: partial_locals %>
<% end %>
</div>