<%= render_icon attachment.icon_css_class %> <% if can?(:show, attachment) && %w(audio image video flash pdf text).include?(attachment.icon_css_class) %> <%= link_to_dialog( attachment.name, alchemy.admin_attachment_path(attachment), { title: attachment.name, size: "fullscreen" }, { title: _t('View File') } ) %> <% else %> <%= attachment.name %> <% end %> <%= attachment.file_name %> <%= mime_to_human(attachment.file_mime_type) %> <%= number_to_human_size(attachment.file_size) %> <%= l(attachment.created_at, format: :short) %> <% if can?(:download, attachment) %> <%= link_to( "", alchemy.download_admin_attachment_path(attachment), title: _t("download_file", filename: attachment.file_name), class: "icon file_download" ) %> <% end %> <% if can?(:destroy, attachment) %> <%= link_to_confirm_dialog( "", _t(:confirm_to_delete_file), alchemy.admin_attachment_path( id: attachment, query: params[:query], page: params[:page], per_page: params[:per_page] ), { class: 'icon file_delete', title: _t(:delete_file) } ) %> <% end %> <% if can?(:edit, attachment) %> <%= link_to_dialog("", alchemy.edit_admin_attachment_path(attachment, query: params[:query], page: params[:page]), { title: _t(:rename_file), size: '380x250' }, class: 'icon file_edit', title: _t(:rename_file) ) %> <% end %>