Sha256: 99a0647e4c5e49a28b9ab9f540cf8333c55109041f9c977e83f2d5090911b2e5

Contents?: true

Size: 1.52 KB

Versions: 6

Compression:

Stored size: 1.52 KB

Contents

<% if curation_concern.linked_resources.present? %>
<table class="table table-striped <%= dom_class(curation_concern) %> related_resources with-headroom">
  <caption class="table-heading">
    <h2>External Links</h2>
  </caption>
  <thead>
    <tr>
      <th>Url</th>
      <th>Actions</th>
    </tr>
  </thead>
  <tbody>
    <% curation_concern.linked_resources.each do |link| %>
      <tr class="<%= dom_class(link) %> attributes">
        <td class="attribute url"><%= link_to link.url, link.url %></td>
        <td>
          <%- if can?(:edit, link) -%>
            <%= link_to(
              'Edit',
              edit_polymorphic_path([:curation_concern, link]),
              { class: 'btn', title: "Edit #{link}" }
            ) %>
          <%- end -%>
          <%- if can?(:destroy, link) -%>
            <%= link_to(
              'Delete',
              polymorphic_path([:curation_concern, link]),
              class: 'btn', method: :delete, title: "Delete #{link.to_s.inspect}",
              data: {confirm: "Deleting #{link.to_s.inspect} from #{t('sufia.product_name')} is permanent. Click OK to delete this from #{t('sufia.product_name')}, or Cancel to cancel this operation"}
            )%>
          <%- end -%>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
<% elsif can? :edit, curation_concern %>
  <h2>External Links</h2>
  <p class="center"><em>This <%= curation_concern.human_readable_type %> has no external links associated with it. You can add one using the "Add an External Link" button below.</em></p>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
worthwhile-0.1.2 app/views/curation_concern/base/_related_resources.html.erb
worthwhile-0.1.1 app/views/curation_concern/base/_related_resources.html.erb
worthwhile-0.1.0 app/views/curation_concern/base/_related_resources.html.erb
worthwhile-0.0.3 app/views/curation_concern/base/_related_resources.html.erb
worthwhile-0.0.2 app/views/curation_concern/base/_related_resources.html.erb
worthwhile-0.0.1 app/views/curation_concern/base/_related_resources.html.erb