Sha256: cf6d5825c2a549bfb6107bb6a933e1f1b8550550fecec132533f863b37c27055

Contents?: true

Size: 1.83 KB

Versions: 33

Compression:

Stored size: 1.83 KB

Contents

<%# 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 %>
      <%= 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 class="table table-striped">
    <caption><%= t('.caption') %></caption>
    <thead>
    <tr>
      <th><%= t('.header.title') %></th>
      <th><%= t('.header.actions') %></th>
    </tr>
    </thead>
    <tbody>
    </tbody>
  </table>
</div>

<script type="text/x-tmpl" id="tmpl-collection">
<tr>
  <td>{%= o.title %}</td>
  <td><button 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>

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.9.5 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.9.4 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.9.3 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.9.2 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.9.1 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.9.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.8.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.7.2 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.7.1 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.7.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.6.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.5.1 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.5.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.0.pre.beta2 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.4.1 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.0.pre.beta1 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.4.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.3.3 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-2.3.2 app/views/hyrax/base/_form_member_of_collections.html.erb