% cache(content) do %>
<% dialog_link = link_to_dialog('',
alchemy.admin_attachments_path(
content_id: content.id,
only: content_settings_value(content, :only,
local_assigns.fetch(:options, {})),
except: content_settings_value(content, :except,
local_assigns.fetch(:options, {})),
options: local_assigns.fetch(:options, {}).to_json
),
{
title: _t(:assign_file),
size: '780x585',
padding: false
},
{
class: 'assign_file',
title: _t(:assign_file)
}
) %>
<%= label_and_remove_link(content) %>
<% if content.ingredient %>
<%= render_icon(content.ingredient.icon_css_class) %>
<% else %>
<%= dialog_link %>
<% end %>
<%= content.ingredient.try(:name) ||
("←" + _t(:assign_file_from_archive)).html_safe %>
<%= dialog_link %>
<%= link_to_dialog '',
alchemy.edit_admin_essence_file_path(
id: content.essence.id,
options: local_assigns.fetch(:options, {}).to_json
),
{
title: _t(:edit_file_properties),
size: '400x165'
},
class: 'edit_file',
title: _t(:edit_file_properties) %>
<% if content.ingredient %>
<%= hidden_field_tag content.form_field_name(:attachment_id),
content.ingredient.id %>
<% end %>
<% end %>