<commit_before>.row
  #submenu.col-md-3
    .panel.panel-default
      .panel-heading
        h2.panel-title
          = t('activerecord.models.resource_import_file')
      ul.list-group
        li.list-group-item
          = back_to_index(flash[:page_info])
  #content_list.col-md-9
    h1.title
      = t('page.new', model: t('activerecord.models.resource_import_file'))
    = form_for(@resource_import_file, html: { multipart: true }) do |f|
      = f.error_messages
      .form-group
        = f.label t('page.file')
        br
        = f.file_field :resource_import
      .form-group
        = f.label :edit_mode
        br
        .radio-inline
          = f.radio_button :edit_mode, 'create', checked: 'checked'
          = f.label :edit_mode, t('page.create'), value: 'create'
        .radio-inline
          = f.radio_button :edit_mode, 'update'
          = f.label :edit_mode, t('page.update'), value: 'update'
        .radio-inline
          = f.radio_button :edit_mode, 'update_relationship'
          = f.label :edit_mode, t('resource_import_file.update_relationship'), value: 'update_relationship'
        .radio-inline
          = f.radio_button :edit_mode, 'destroy'
          = f.label :edit_mode, t('page.destroy'), value: 'destroy'
      .form-group
        = f.label :user_encoding
        br
        .radio-inline
          = f.radio_button :user_encoding, 'auto_detect', checked: 'checked'
          = f.label :user_encoding, t('import.auto_detect'), value: 'auto_detect'
        .radio-inline
          = f.radio_button :user_encoding, 'utf-8'
          = f.label :user_encoding, 'UTF-8', value: 'utf-8'
        .radio-inline
          = f.radio_button :user_encoding, 'shift_jis'
          = f.label :user_encoding, 'Shift_JIS', value: 'shift_jis'
        .radio-inline
          = f.radio_button :user_encoding, 'euc-jp'
          = f.label :user_encoding, 'EUC-JP', value: 'euc-jp'
      .form-inline
        => f.label :default_shelf_id
        => f.select(:library_id, @libraries.map{|l| [l.display_name.localize, l.id]}, {}, {class: 'form-control'})
        => f.select(:default_shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]}, {}, {class: 'form-control'})
        = render 'observe_field'
        p.help-block
          = t('resource_import_file.default_shelf')
      .form-group
        = f.hidden_field :mode, value: 'import'
        = f.submit t('page.start_import'), class: 'btn btn-default'<commit_msg>hide 'destroy' button next-l/enju_leaf#788<commit_after>.row
  #submenu.col-md-3
    .panel.panel-default
      .panel-heading
        h2.panel-title
          = t('activerecord.models.resource_import_file')
      ul.list-group
        li.list-group-item
          = back_to_index(flash[:page_info])
  #content_list.col-md-9
    h1.title
      = t('page.new', model: t('activerecord.models.resource_import_file'))
    = form_for(@resource_import_file, html: { multipart: true }) do |f|
      = f.error_messages
      .form-group
        = f.label t('page.file')
        br
        = f.file_field :resource_import
      .form-group
        = f.label :edit_mode
        br
        .radio-inline
          = f.radio_button :edit_mode, 'create', checked: 'checked'
          = f.label :edit_mode, t('page.create'), value: 'create'
        .radio-inline
          = f.radio_button :edit_mode, 'update'
          = f.label :edit_mode, t('page.update'), value: 'update'
        .radio-inline
          = f.radio_button :edit_mode, 'update_relationship'
          = f.label :edit_mode, t('resource_import_file.update_relationship'), value: 'update_relationship'
        /.radio-inline
          /= f.radio_button :edit_mode, 'destroy'
          /= f.label :edit_mode, t('page.destroy'), value: 'destroy'
      .form-group
        = f.label :user_encoding
        br
        .radio-inline
          = f.radio_button :user_encoding, 'auto_detect', checked: 'checked'
          = f.label :user_encoding, t('import.auto_detect'), value: 'auto_detect'
        .radio-inline
          = f.radio_button :user_encoding, 'utf-8'
          = f.label :user_encoding, 'UTF-8', value: 'utf-8'
        .radio-inline
          = f.radio_button :user_encoding, 'shift_jis'
          = f.label :user_encoding, 'Shift_JIS', value: 'shift_jis'
        .radio-inline
          = f.radio_button :user_encoding, 'euc-jp'
          = f.label :user_encoding, 'EUC-JP', value: 'euc-jp'
      .form-inline
        => f.label :default_shelf_id
        => f.select(:library_id, @libraries.map{|l| [l.display_name.localize, l.id]}, {}, {class: 'form-control'})
        => f.select(:default_shelf_id, @shelves.map{|s| [s.display_name.localize, s.id]}, {}, {class: 'form-control'})
        = render 'observe_field'
        p.help-block
          = t('resource_import_file.default_shelf')
      .form-group
        = f.hidden_field :mode, value: 'import'
        = f.submit t('page.start_import'), class: 'btn btn-default'
{'fraction_non_alphanumeric': 0.145985401459854, 'fraction_numerical': 0.0034468775344687753, 'mean_word_length': 2.35350101971448, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5661347', 'n_tokens_mistral': 1682, 'n_tokens_neox': 1649, 'n_words': 282}