Sha256: f36be4bcbbcc256923b1af2c34e29d0666d11b9adc63cf86dd086d4afee66b8f

Contents?: true

Size: 1.88 KB

Versions: 14

Compression:

Stored size: 1.88 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="<%= member_of_collections_json(f.object) %>">

  <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 href="#" onclick="return false;" class="btn btn-primary" data-behavior="add-relationship"><%= t('.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

14 entries across 14 versions & 1 rubygems

Version Path
hyrax-3.6.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.5.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.4.2 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.4.1 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.4.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.3.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.2.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.1.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.2 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.1 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.0 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.0.pre.rc4 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.0.pre.rc3 app/views/hyrax/base/_form_member_of_collections.html.erb
hyrax-3.0.0.pre.rc2 app/views/hyrax/base/_form_member_of_collections.html.erb