Sha256: fef19ac1e94fbf08d30f2c0a2455042035f28f125c4254f99e39dd0877387025

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

<div class="picture_thumbnail <%= @size %>" id="picture_<%= picture.id %>" name="<%= picture.name %>">
  <span class="picture_tool select">
    <%= check_box_tag "picture_ids[]", picture.id %>
  </span>
  <% if picture.deletable? && can?(:destroy, picture) %>
  <span class="picture_tool delete">
    <sl-tooltip content="<%= Alchemy.t('Delete image') %>">
      <%= link_to_confirm_dialog(
        render_icon("delete-bin-2"),
        Alchemy.t(:confirm_to_delete_image_from_server),
        alchemy.admin_picture_path(
          id: picture,
          q: search_filter_params[:q],
          page: params[:page],
          tagged_with: search_filter_params[:tagged_with],
          size: @size,
          filter: search_filter_params[:filter]
        )
      ) -%>
    </sl-tooltip>
  </span>
  <% end %>
  <% image = image_tag(
    picture.url(size: preview_size(@size), flatten: true) || "alchemy/missing-image.svg",
    alt: picture.name
  ) %>
  <% if can?(:edit, picture) %>
    <%= link_to(
      image,
      alchemy.admin_picture_path(
        id: picture,
        q: search_filter_params[:q],
        page: params[:page],
        tagged_with: search_filter_params[:tagged_with],
        size: @size,
        filter: search_filter_params[:filter]
      ),
      class: 'thumbnail_background'
    ) %>
  <% else %>
    <%= image %>
  <% end %>
  <span class="picture_name" title="<%= picture.name %>">
    <%= picture.name %>
  </span>
  <div class="picture_tags">
  <% picture.tag_list.each do |tag| %>
    <span class="tag"><%= tag %></span>
  <% end %>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alchemy_cms-7.1.0.pre.b1 app/views/alchemy/admin/pictures/_picture.html.erb