<%# Form UI behavior code and details;
Code:
  app/assets/javascripts/hyrax/relationships
CSS:
  [data-behavior="remove-relationship"] : Button to remove its parent TR from the table
  [data-behavior="add-relationship"] : Button to clone its parent TR and inject a new row into the table
  .message.has-warning : Used to display UI errors related to input values and server errors
HTML Properties:
  table:
    [data-behavior="child-relationships"] : allows the javascript to be initialized
    data-param-key : the parameter key value for this model type %>
<h2><%= t("hyrax.works.form.in_collections") %></h2>

<div class="form-group" data-behavior="collection-relationships" data-param-key="<%= f.object.model_name.param_key %>" data-members="<%= f.object.member_of_collections_json %>">

  <div class="form-inline">
      <%= f.label :member_of_collection_ids %> <span class="label label-info required-tag">required</span>  
      <%= f.input_field :member_of_collection_ids,
                  prompt: :translate,
                  data: {
                    autocomplete: 'collection',
                    'autocomplete-url' => Rails.application.routes.url_helpers.qa_path + '/search/collections?access=deposit'
                  } %>          
      <a class="btn btn-primary" data-behavior="add-relationship">Add</a>
  </div>

  <table id="project-table" class="table table-striped">
    <caption><%= t('.caption') %></caption>
    <thead>
    <tr>
      <th><%= t('.header.title') %></th>
      <th><%= t('.header.actions') %></th>
    </tr>
    </thead>
    <tbody id="project-body">
    </tbody>
  </table>
</div>

<script type="text/x-tmpl" id="tmpl-collection">
<tr>
  <td>{%= o.title %}</td>
  <td><button id="remove-project" class="btn btn-danger" data-behavior="remove-relationship" data-confirm-text="<%= t('.confirm.text') %>" data-confirm-cancel="<%= t('.confirm.cancel') %>" data-confirm-remove="<%= t('.confirm.remove') %>"><%= t('.actions.remove') %></button></td>
</tr>
</script>

Add project ids to form
Add project ids to form
