Sha256: 0576a43108713efed57dcfc5aa4f55e2a41f25d679a3f4d349fcb20b9d354164

Contents?: true

Size: 1.77 KB

Versions: 27

Compression:

Stored size: 1.77 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: _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: :short) %></td>
  <td class="tools long">
  <% 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 %>
  </td>
</tr>

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
alchemy_cms-3.2.1 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.3 app/views/alchemy/admin/attachments/_attachment.html.erb
lc_alchemy_cms-3.2.1 app/views/alchemy/admin/attachments/_attachment.html.erb
lc_alchemy_cms-3.2.0 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.2.0 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.2.0.rc1 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.2.0.beta app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.1 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.0.4 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.rc3 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.rc2 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.rc1 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.beta6 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.beta5 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.beta4 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.0.3 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.beta3 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.beta2 app/views/alchemy/admin/attachments/_attachment.html.erb
alchemy_cms-3.1.0.beta1 app/views/alchemy/admin/attachments/_attachment.html.erb