2016-02-12 23:52:43 +08:00
|
|
|
<div class="panel panel-default panel-step-attachment">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<span class="glyphicon glyphicon-file"></span>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= t("protocols.steps.new.asset_panel_title") %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<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 !(ff.object.file.content_type =~ /^image/).nil? %>
|
|
|
|
<%= image_tag ff.object.file.url(:medium) %>
|
2016-07-14 00:47:06 +08:00
|
|
|
<br>
|
|
|
|
<%= ff.object.file_file_name %>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% else %>
|
|
|
|
<%= ff.object.file_file_name %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<%= ff.file_field :file %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|