Sha256: 7074ceffcc7874efd4004e528bb7c4e607959e67182ccbeac02cec2de3596a34

Contents?: true

Size: 1.79 KB

Versions: 10

Compression:

Stored size: 1.79 KB

Contents

<tr class="<%= cycle('even', 'odd') %>">
  <td class="icon">
    <%= render_icon attachment.icon_css_class %>
  </td>
  <td class="name">
  <% 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: Alchemy.t('View File')
      }
    ) %>
  <% else %>
    <%= attachment.name %>
  <% end %>
  </td>
  <td class="file_name"><%= attachment.file_name %></td>
  <td class="file_type"><%= mime_to_human(attachment.file_mime_type) %></td>
  <td class="file_size"><%= number_to_human_size(attachment.file_size) %></td>
  <td class="date"><%= l(attachment.created_at, format: :default) %></td>
  <td class="tools long">
  <% if can?(:download, attachment) %>
    <%= link_to(
      "",
      alchemy.download_admin_attachment_path(attachment),
      title: Alchemy.t("download_file", filename: attachment.file_name),
      class: "icon file_download"
    ) %>
  <% end %>
  <% if can?(:destroy, attachment) %>
    <%= link_to_confirm_dialog(
      "",
      Alchemy.t(:confirm_to_delete_file),
      alchemy.admin_attachment_path(
        id: attachment,
        q: params[:q],
        page: params[:page],
        per_page: params[:per_page]
      ),
      {
        class: 'icon file_delete',
        title: Alchemy.t(:delete_file)
      }
    ) %>
  <% end %>
  <% if can?(:edit, attachment) %>
    <%= link_to_dialog("",
      alchemy.edit_admin_attachment_path(attachment, q: params[:q], page: params[:page]),
      {
        title: Alchemy.t(:rename_file),
        size: '380x250'
      },
      class: 'icon file_edit',
      title: Alchemy.t(:rename_file)
    ) %>
  <% end %>
  </td>
</tr>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
alchemy_cms-3.4.2 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.4.1 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.3.3 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.3.2 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.4.0 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.4.0.rc1 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.3.1 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.3.0 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.3.0.rc2 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.3.0.rc1 app/views/alchemy/admin/attachments/_attachment.html.erb