Sha256: 9dc4606caf5bf5a28a1590fa76c609ec2efbaa076cd2e5954ec4d7396363fed7
Contents?: true
Size: 1.99 KB
Versions: 38
Compression:
Stored size: 1.99 KB
Contents
<div class='card' id="attachments"> <div class="card-divider"> <h2 class="card-title"> <%= t(".attachments_title") %> <% if can? :create, authorization_object %> <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.attachment.name", scope: "decidim.admin")), url_for(action: :new), class: 'button tiny button--title new' %> <% end %> </h2> </div> <div class="card-section"> <% if attached_to.attachments.any? %> <div class="table-scroll"> <table class="table-list"> <thead> <tr> <th><%= t("models.attachment.fields.title", scope: "decidim.admin") %></th> <th><%= t("models.attachment.fields.content_type", scope: "decidim.admin") %></th> <th class="actions"></th> </tr> </thead> <tbody> <% attached_to.attachments.each do |attachment| %> <tr data-id="<%= attachment.id %>"> <td> <%= link_to translated_attribute(attachment.title), edit_polymorphic_path([attached_to, attachment]) %><br /> </td> <td> <%= attachment.file_type %> </td> <td class="table-list__actions"> <% if can? :update, authorization_object %> <%= icon_link_to "pencil", edit_polymorphic_path([attached_to, attachment]), t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> <% end %> <% if can? :destroy, authorization_object %> <%= icon_link_to "circle-x", polymorphic_path([attached_to, attachment]), t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> <% end %> </td> </tr> <% end %> </tbody> </table> </div> <% end %> </div> </div>
Version data entries
38 entries across 38 versions & 2 rubygems