%
insert_link = refinery.insert_admin_resources_path({
:dialog => true,
:update_resource => "current_resource_#{field}",
:update_text => "current_resource_text_#{field}",
:callback => "resource_changed_#{field}",
:field => [f.object_name.gsub(/\]\[|[^-a-zA-Z0-9:.]/, '_').sub(/_$/, ''), field].join('_'),
:current_link => "#{resource.url if resource}",
:height => 480,
:conditions => local_assigns[:conditions]
})
%>
<%= f.hidden_field field %>
<%= content_tag(:div, id: "no_resource_selected_#{field}", style: ("display: none;" if resource)) do %>
<%= action_icon :add, insert_link, t('.name'), id: "current_resource_link_#{field}" %>
<% end %>
">
<%= "#{resource.title} (#{resource.file_name})" if resource %>
<%= action_icon :download, "#{resource.url if resource}", t('.download_current'), id: "current_resource_#{field}" %>
<%= action_icon :remove, '#', t('.remove_current'), :id => "remove_resource_#{field}"%>
<% content_for :javascripts do %>
<% end %>