Sha256: 15fd130c072c3c27b7f5b5c63959620c90b1cefd2d984c49d0ce2a9f37d3bfc7

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

<% if proposal.photos.any? %>
  <div class="row column">
    <strong><%= t(".photos") %>:</strong>
    <div id="photos" class="gallery row flex--fsc proposal-<%= proposal.id %>">
      <% proposal.photos.each do |photo| %>
        <div class="proposal-photo gallery__item" id="photo-<%= photo.id %>">
          <%= link_to photo.big_url, target: "_blank", rel: "noopener" do %>
            <%= image_tag photo.thumbnail_url, class: "thumbnail", alt: strip_tags(translated_attribute(photo.title)) %>
            <% if admin_allowed_to? :edit_photos, :proposals, extra_context = { proposal: proposal }, chain = [::Decidim::ReportingProposals::Admin::Permissions] %>
              <%= icon_link_to "x",
                               decidim_admin_reporting_proposals.remove_photo_path(id: proposal.id, photo_id: photo.id),
                               t(".delete_image"),
                               method: :delete,
                               class: "delete-proposal__button", style: "color:white;" %>
            <% end %>
          <% end %>
        </div>
      <% end %>
    </div>
  </div>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decidim-reporting_proposals-0.5.2 app/views/decidim/reporting_proposals/admin/proposals/_photo_gallery.html.erb
decidim-reporting_proposals-0.5.1 app/views/decidim/reporting_proposals/admin/proposals/_photo_gallery.html.erb
decidim-reporting_proposals-0.5.0 app/views/decidim/reporting_proposals/admin/proposals/_photo_gallery.html.erb
decidim-reporting_proposals-0.4.2 app/views/decidim/reporting_proposals/admin/proposals/_photo_gallery.html.erb
decidim-reporting_proposals-0.2.0 app/views/decidim/reporting_proposals/admin/proposals/_photo_gallery.html.erb