% if can? :edit, curation_concern %>
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? %>Work Title |
---|
<%= link_to related_work.title, polymorphic_path([:curation_concern, related_work]) %> |
Work Title |
---|
<%= link_to related_work.title, polymorphic_path([:curation_concern, related_work]) %> |