<% # Allow multiple subjects to be linked if it's an empty linker multiplicity = "many" if multiplicity.blank? if form.obj['ref'].blank? selected_json = (multiplicity === "many") ? "[]" : "{}" else multiplicity = "one" selected_json = form.obj['_resolved'].to_json end data_path = form.path data_name = "ref" # De-referenced by the controller if the schema def calls for an item array exclude_ids = [] if exclude_ids.blank? hide_create = false if hide_create.blank? if !defined?(linker_label) linker_label = (multiplicity === "many") ? I18n.t("classification._plural") : I18n.t("classification._singular") end %>
" data-label="<%= I18n.t("classification._singular") %>" data-label_plural="<%= I18n.t("classification._plural") %>" data-path="<%= form.path %>" data-name="ref" data-url="<%= url_for :controller => :search, :action => :do_search, :format => :json %>" data-browse-url="<%= url_for :controller => :search, :action => :do_search, :format => :js, :facets => SearchResultData.RESOURCE_FACETS, :exclude => exclude_ids %>" data-selected="<%= selected_json %>" data-format_property="title" data-multiplicity="<%= multiplicity %>" <% if multiplicity === "many" %>data-sortable="true"<% end %> data-types='["classification", "classification_term"]' data-exclude='<%= exclude_ids.to_json %>' />