mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 20:24:43 +08:00
26 lines
No EOL
947 B
Text
26 lines
No EOL
947 B
Text
<div class="panel panel-default panel-step-attachment">
|
|
<div class="panel-heading">
|
|
<span class="glyphicon glyphicon-file"></span>
|
|
<%= t("protocols.steps.new.asset_panel_title") %>
|
|
<div class="pull-right">
|
|
<%= ff.remove_nested_fields_link do %>
|
|
<span class="glyphicon glyphicon-remove"></span>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body">
|
|
<% if ff.object.file.exists? %>
|
|
<% if can_view_or_download_step_assets(@protocol) %>
|
|
<%= link_to download_asset_path(ff.object), data: {no_turbolink: true} do %>
|
|
<%= image_tag(preview_asset_path ff.object) if ff.object.is_image? %>
|
|
<p><%= ff.object.file_file_name %></p>
|
|
<% end %>
|
|
<% else %>
|
|
<%= image_tag(preview_asset_path ff.object) if ff.object.is_image? %>
|
|
<p><%= ff.object.file_file_name %></p>
|
|
<% end %>
|
|
<% else %>
|
|
<%= ff.file_field :file %>
|
|
<% end %>
|
|
</div>
|
|
</div> |