<commit_before><%- if manifestation -%>
  <%= render 'manifestations/title', :manifestation => manifestation -%>
<%- end -%>

<%# = render 'page/required_field' %>
<%= simple_form_for(@item) do |f| -%>
  <%= f.error_messages -%>
  <%= f.hidden_field :manifestation_id %>

  <div class="field">
    <%= f.label t('activerecord.models.library') -%><strong> / <%= t('activerecord.models.shelf') -%></strong><br />
    <%#= f.select :library_id, @libraries.map{|l| [l.display_name.localize, l.id]} %>
    <%= select2_script "item_library_id" %>
    <%= make_select2_struct("item_library_id", "item[library_id]", libraries, @item.library_id, 250) %>
    <%- if @shelf_categories %>
      <%= select_tag :shelf_category, options_for_select(@shelf_categories.map{|c|[i18n_shelf_category(c),c]}), {:include_blank => ''} %>
      <%#= select2_script "item_shelf_category" %>
      <%#= make_select2("item_shelf_category", "item[shelf_category]", @shelf_categories, nil, 250) %>
      <%= f.select :shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]}, :selected => @item.shelf_id %>
      <%#= select2_script "item_shelf_id" %>
      <%#= make_select2("item_shelf_id", "item[shelf_id]", @shelves, @item.shelf_id, 250) %>
    <%- else -%>
      <%#= f.select :shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]} %>
      <%= select2_script "item_shelf_id" %>
      <%= make_select2("item_shelf_id", "item[shelf_id]", @shelves, @item.shelf_id, 300, false, false) %>
    <%- end -%>
    <%= render 'observe_field' %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.checkout_type') -%><br />
    <%#= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name.localize, c.id]}) -%>
    <%= select2_script "checkout_type_id" %>
    <%= make_select2(:checkout_type_id, "item[checkout_type_id]", @checkout_types, @item.checkout_type_id, 200, false) %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.accept_type') -%><br />
    <%#= f.select(:accept_type_id, @accept_types.collect{|a| [a.display_name.localize, a.id]}, :include_blank => true) -%>
    <%= select2_script "accept_type_id" %>
    <%= make_select2(:accept_type_id, "item[accept_type_id]", @accept_types, @item.accept_type_id, 200, false) %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.circulation_status') -%><br />
    <%#= f.select(:circulation_status_id, @circulation_statuses.collect{|c| [c.display_name.localize, c.id]}) -%>
    <%= select2_script "circulation_status_id" %>
    <%= make_select2(:circulation_status_id, "item[circulation_status_id]", @circulation_statuses, @item.circulation_status_id, 500, false) %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.retention_period') -%><br />
    <%#= f.select(:retention_period_id, @retention_periods.collect{|r| [r.display_name.localize, r.id]}) -%>
    <%= select2_script "retention_period_id" %>
    <%= make_select2(:retention_period_id, "item[retention_period_id]", @retention_periods, @item.retention_period_id, 200, false) %>
  </div>

  <div class="field">
    <%= f.label :call_number -%><br />
    <%= f.text_field :call_number -%>
  </div>

  <div class="field">
    <%= f.label :location_symbol -%><br />
    <%= f.select :location_symbol_id, options_from_collection_for_select(@location_symbols, :id, :keyname, @item.location_symbol_id), :include_blank => true %>
  </div>

  <div class="field">
    <%= f.label :statistical_class -%><br /><commit_msg>refs 7577 call_number の field が２つあったので１つを削除<commit_after><%- if manifestation -%>
  <%= render 'manifestations/title', :manifestation => manifestation -%>
<%- end -%>

<%# = render 'page/required_field' %>
<%= simple_form_for(@item) do |f| -%>
  <%= f.error_messages -%>
  <%= f.hidden_field :manifestation_id %>

  <div class="field">
    <%= f.label t('activerecord.models.library') -%><strong> / <%= t('activerecord.models.shelf') -%></strong><br />
    <%#= f.select :library_id, @libraries.map{|l| [l.display_name.localize, l.id]} %>
    <%= select2_script "item_library_id" %>
    <%= make_select2_struct("item_library_id", "item[library_id]", libraries, @item.library_id, 250) %>
    <%- if @shelf_categories %>
      <%= select_tag :shelf_category, options_for_select(@shelf_categories.map{|c|[i18n_shelf_category(c),c]}), {:include_blank => ''} %>
      <%#= select2_script "item_shelf_category" %>
      <%#= make_select2("item_shelf_category", "item[shelf_category]", @shelf_categories, nil, 250) %>
      <%= f.select :shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]}, :selected => @item.shelf_id %>
      <%#= select2_script "item_shelf_id" %>
      <%#= make_select2("item_shelf_id", "item[shelf_id]", @shelves, @item.shelf_id, 250) %>
    <%- else -%>
      <%#= f.select :shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]} %>
      <%= select2_script "item_shelf_id" %>
      <%= make_select2("item_shelf_id", "item[shelf_id]", @shelves, @item.shelf_id, 300, false, false) %>
    <%- end -%>
    <%= render 'observe_field' %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.checkout_type') -%><br />
    <%#= f.select(:checkout_type_id, @checkout_types.collect{|c| [c.display_name.localize, c.id]}) -%>
    <%= select2_script "checkout_type_id" %>
    <%= make_select2(:checkout_type_id, "item[checkout_type_id]", @checkout_types, @item.checkout_type_id, 200, false) %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.accept_type') -%><br />
    <%#= f.select(:accept_type_id, @accept_types.collect{|a| [a.display_name.localize, a.id]}, :include_blank => true) -%>
    <%= select2_script "accept_type_id" %>
    <%= make_select2(:accept_type_id, "item[accept_type_id]", @accept_types, @item.accept_type_id, 200, false) %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.circulation_status') -%><br />
    <%#= f.select(:circulation_status_id, @circulation_statuses.collect{|c| [c.display_name.localize, c.id]}) -%>
    <%= select2_script "circulation_status_id" %>
    <%= make_select2(:circulation_status_id, "item[circulation_status_id]", @circulation_statuses, @item.circulation_status_id, 500, false) %>
  </div>

  <div class="field">
    <%= f.label t('activerecord.models.retention_period') -%><br />
    <%#= f.select(:retention_period_id, @retention_periods.collect{|r| [r.display_name.localize, r.id]}) -%>
    <%= select2_script "retention_period_id" %>
    <%= make_select2(:retention_period_id, "item[retention_period_id]", @retention_periods, @item.retention_period_id, 200, false) %>
  </div>

  <div class="field">
    <%= f.label :location_symbol -%><br />
    <%= f.select :location_symbol_id, options_from_collection_for_select(@location_symbols, :id, :keyname, @item.location_symbol_id), :include_blank => true %>
  </div>

  <div class="field">
    <%= f.label :statistical_class -%><br />
{'fraction_non_alphanumeric': 0.20567375886524822, 'fraction_numerical': 0.013026487190620929, 'mean_word_length': 4.801847187237615, 'pattern_counts': {'":': 0, '<': 140, '<?xml version=': 0, '>': 150, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7131345', 'n_tokens_mistral': 2951, 'n_tokens_neox': 2626, 'n_words': 361}