<% if can? :edit, curation_concern %>

Related Works

Add works that are related to this <%= curation_concern.human_readable_type %>.

<%= form_for [:curation_concern, curation_concern], method: :patch, html: {id:"edit_related_works"} do |f| %> <%# NOTE: You can't use a url builder to create the query URL because it will escape it; the JavaScript is already doing this %> <%= f.text_field :related_work_tokens, class:"autocomplete tokens", data: { url: "#{catalog_index_path}?f[generic_type_sim][]=Work", load: curation_concern.related_works.to_json, exclude:"[#{curation_concern.pid.inspect}]" } %> <%= f.submit "Update Related Works", class: 'btn btn-primary' %> <% end %> <% elsif curation_concern.related_works.present? %> <% if curation_concern.related_works.present? %> <% curation_concern.related_works.each do |related_work| %> <% end %> <% end %> <% end %> <% if curation_concern.referenced_by_works.present? %> <% curation_concern.referenced_by_works.each do |related_work| %> <% end %>

Referenced by

Works that list this one in as being related to them.

Work Title
<%= link_to related_work.title, polymorphic_path([:curation_concern, related_work]) %>
<% end %>