<commit_before><%
  @title = :prefs_title.t

  new_tab_set do
    add_tab(:bulk_license_link.t,
            :controller => 'image', :action => 'license_updater')
    add_tab(:profile_link.t,
            :controller => 'account', :action => 'profile')
    add_tab(:show_user_your_notifications.t,
            :controller => 'interest', :action => 'list_interests')
    add_tab(:turn_javascript_nil_title.t,
            :controller => 'observer', :action => 'turn_javascript_nil') if session[:js_override] != nil
    add_tab(:turn_javascript_on_title.t,
            :controller => 'observer', :action => 'turn_javascript_on') if !@js
    add_tab(:turn_javascript_off_title.t,
            :controller => 'observer', :action => 'turn_javascript_off') if @js
  end
%>

<% form_for(:user, :url => { :action => :prefs }) do |form| %>
  <br/><center><input type="submit" value="<%= :SAVE_EDITS.l %>" class="primary" /></center>

  <p><label for="user_login"><%= :prefs_login.t %></label>:<br/>
  <%= form.text_field("login", :size => 60) %></p>

  <p><label for="user_email"><%= :prefs_email.t %></label>:<br/>
  <%= form.text_field("email", :size => 60) %></p>

  <p><label for="user_password"><%= :prefs_password_new.t %></label>:<br/>
  <%= form.password_field("password", :value => '', :size => 30) %></p>

  <p><label for="user_password_confirmation"><%= :prefs_password_confirm.t %></label>:<br/>
  <%= form.password_field("password_confirmation", :size => 30) %></p>

  <br/>

  <p><label for="user_votes_anonymous"><b><%= :prefs_votes_anonymous.t %></b></label>:<br/>
  <%= values = [
    [:prefs_votes_anonymous_no.l, :no],
    [:prefs_votes_anonymous_yes.l, :yes],
  ]
  # Allow old users to granfather in old anonymous votes, but choose to go
  # public from here forward.
  if @user.created < Time.parse(VOTE_CUTOFF)
    values << [:prefs_votes_anonymous_old.l(:cutoff => VOTE_CUTOFF), :old]
  end
  form.select(:votes_anonymous, values) %></p>

  <p><label for="user_license_id"><b><%= :License.t %>:</b></label>
    <span class="HelpNote">(<%= :prefs_license_note.t %>)</span><br/>
  <%= form.select(:license_id, @licenses) %></p>

  <table cellpadding="0" cellspacing="0">
    <tr>
      <td><label for="user_theme"><b><%= :prefs_theme.t %>:</b></label><br/>
        <%= form.select(:theme, [[:theme_random.l, "NULL"]] + CSS) %></td>
      <td width="20"></td>
      <td><label for="user_locale"><b><%= :prefs_locale.t %>:</b></label><br/>
        <% locales = all_locales.map { |x| [x.sub('-','_').to_sym.t, x] } %>
        <%= form.select(:locale, locales) %></td>
    </tr>
  </table><br/>

  <table cellpadding="0" cellspacing="0">
    <tr>
      <td><label for="user_thumbnail_size"><b><%= :prefs_thumbnail_size.t %>:</b></label><br/>
        <%= form.select(:thumbnail_size, [
          [:prefs_thumbnail_small.l, :thumbnail],
          [:prefs_thumbnail_large.l, :small],
        ]) %></td>
      <td width="20"></td>
      <td><label for="user_image_size"><b><%= :prefs_image_size.t %>:</b></label>
        <span class="HelpNote">(<%= :prefs_image_size_help.t %>)</span><br/>
        <%= form.select(:image_size, [
          [:prefs_image_small.l,     :small],
          [:prefs_image_medium.l,    :medium],
          [:prefs_image_large.l,     :large],
          [:prefs_image_huge.l,      :huge],
          [:prefs_image_full_size.l, :full_size],
        ]) %></td>
    </tr>
  </table><br/>

  <b><%= :prefs_layout_title.t %>:</b><br/>
  <%= form.select(:rows, [1, 2, 3, 4, 5, 10, 20, 50]) %>
  <label for="user_rows"><%= :prefs_rows_by.t %></label>
  <%= form.select(:columns, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) %>
  <label for="user_columns"><%= :prefs_columns.t %></label><br/>

  <%= form.check_box("alternate_rows") %>
  <label for="user_alternate_rows"><%= :prefs_alt_row_colors.t %></label><br/>
  <%= form.check_box("alternate_columns") %>
  <label for="user_alternate_columns"><%= :prefs_alt_col_colors.t %></label><br/>
  <%= form.check_box("vertical_layout") %>
  <label for="user_vertical_layout"><%= :prefs_text_below_images.t %></label><br/><br/>

  <b><%= :prefs_email_comments.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_comments_owner") %>
    <label for="user_email_comments_owner"><%= :prefs_email_comments_owner.t %></label><br/>
  <%= form.check_box("email_comments_response") %>
    <label for="user_email_comments_response"><%= :prefs_email_comments_response.t %></label><br/>
  <%= form.check_box("email_comments_all") %>
    <label for="user_email_comments_all"><%= :prefs_email_comments_all.t %></label><br/><br/>

  <b><%= :prefs_email_observations.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_observations_consensus") %>
    <label for="user_email_observations_consensus"><%= :prefs_email_observations_consensus.t %></label><br/>
  <%= form.check_box("email_observations_naming") %>
    <label for="user_email_observations_naming"><%= :prefs_email_observations_naming.t %></label><br/>
  <%= form.check_box("email_observations_all") %>
    <label for="user_email_observations_all"><%= :prefs_email_observations_all.t %></label><br/><br/>

  <b><%= :prefs_email_names.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_names_admin") %>
    <label for="user_email_names_admin"><%= :prefs_email_names_admin.t %></label><br/>
  <%= form.check_box("email_names_author") %>
    <label for="user_email_names_author"><%= :prefs_email_names_author.t %></label><br/>
  <%= form.check_box("email_names_editor") %>
    <label for="user_email_names_editor"><%= :prefs_email_names_editor.t %></label><br/>
  <%= form.check_box("email_names_reviewer") %>
    <label for="user_email_names_reviewer"><%= :prefs_email_names_reviewer.t %></label><br/>
  <%= form.check_box("email_names_all") %>
    <label for="user_email_names_all"><%= :prefs_email_names_all.t %></label><br/><br/>

  <b><%= :prefs_email_locations.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_locations_admin") %>
    <label for="user_email_locations_admin"><%= :prefs_email_locations_admin.t %></label><br/>
  <%= form.check_box("email_locations_author") %>
    <label for="user_email_locations_author"><%= :prefs_email_locations_author.t %></label><br/>
  <%= form.check_box("email_locations_editor") %>
    <label for="user_email_locations_editor"><%= :prefs_email_locations_editor.t %></label><br/>
  <%= form.check_box("email_locations_all") %>
    <label for="user_email_locations_all"><%= :prefs_email_locations_all.t %></label><br/><br/>

  <b><%= :prefs_email_general.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_general_feature") %>
    <label for="user_email_general_feature"><%= :prefs_email_general_features.t %></label><br/>
  <%= form.check_box("email_general_commercial") %>
    <label for="user_email_general_commercial"><%= :prefs_email_general_commercial.t %></label><br/>
  <%= form.check_box("email_general_question") %>
    <label for="user_email_general_question"><%= :prefs_email_general_questions.t %></label><br/><br/>

  <b><%= :prefs_email_prefs.t %>:</b><br/>
  <%= form.check_box("email_html") %>
    <label for="user_email_html"><%= :prefs_email_html.t %></label><br/>

  <div class="HelpNoteIndent">
    <%= :prefs_email_note.tp %>
  </div>

  <br/><center><input type="submit" value="<%= :SAVE_EDITS.l %>" class="primary" /></center>
<% end %>
<commit_msg>Oops, test fixture users don't have 'created' set.<commit_after><%
  @title = :prefs_title.t

  new_tab_set do
    add_tab(:bulk_license_link.t,
            :controller => 'image', :action => 'license_updater')
    add_tab(:profile_link.t,
            :controller => 'account', :action => 'profile')
    add_tab(:show_user_your_notifications.t,
            :controller => 'interest', :action => 'list_interests')
    add_tab(:turn_javascript_nil_title.t,
            :controller => 'observer', :action => 'turn_javascript_nil') if session[:js_override] != nil
    add_tab(:turn_javascript_on_title.t,
            :controller => 'observer', :action => 'turn_javascript_on') if !@js
    add_tab(:turn_javascript_off_title.t,
            :controller => 'observer', :action => 'turn_javascript_off') if @js
  end
%>

<% form_for(:user, :url => { :action => :prefs }) do |form| %>
  <br/><center><input type="submit" value="<%= :SAVE_EDITS.l %>" class="primary" /></center>

  <p><label for="user_login"><%= :prefs_login.t %></label>:<br/>
  <%= form.text_field("login", :size => 60) %></p>

  <p><label for="user_email"><%= :prefs_email.t %></label>:<br/>
  <%= form.text_field("email", :size => 60) %></p>

  <p><label for="user_password"><%= :prefs_password_new.t %></label>:<br/>
  <%= form.password_field("password", :value => '', :size => 30) %></p>

  <p><label for="user_password_confirmation"><%= :prefs_password_confirm.t %></label>:<br/>
  <%= form.password_field("password_confirmation", :size => 30) %></p>

  <br/>

  <p><label for="user_votes_anonymous"><b><%= :prefs_votes_anonymous.t %></b></label>:<br/>
  <%= values = [
    [:prefs_votes_anonymous_no.l, :no],
    [:prefs_votes_anonymous_yes.l, :yes],
  ]
  # Allow old users to granfather in old anonymous votes, but choose to go
  # public from here forward.
  if @user.created && @user.created < Time.parse(VOTE_CUTOFF)
    values << [:prefs_votes_anonymous_old.l(:cutoff => VOTE_CUTOFF), :old]
  end
  form.select(:votes_anonymous, values) %></p>

  <p><label for="user_license_id"><b><%= :License.t %>:</b></label>
    <span class="HelpNote">(<%= :prefs_license_note.t %>)</span><br/>
  <%= form.select(:license_id, @licenses) %></p>

  <table cellpadding="0" cellspacing="0">
    <tr>
      <td><label for="user_theme"><b><%= :prefs_theme.t %>:</b></label><br/>
        <%= form.select(:theme, [[:theme_random.l, "NULL"]] + CSS) %></td>
      <td width="20"></td>
      <td><label for="user_locale"><b><%= :prefs_locale.t %>:</b></label><br/>
        <% locales = all_locales.map { |x| [x.sub('-','_').to_sym.t, x] } %>
        <%= form.select(:locale, locales) %></td>
    </tr>
  </table><br/>

  <table cellpadding="0" cellspacing="0">
    <tr>
      <td><label for="user_thumbnail_size"><b><%= :prefs_thumbnail_size.t %>:</b></label><br/>
        <%= form.select(:thumbnail_size, [
          [:prefs_thumbnail_small.l, :thumbnail],
          [:prefs_thumbnail_large.l, :small],
        ]) %></td>
      <td width="20"></td>
      <td><label for="user_image_size"><b><%= :prefs_image_size.t %>:</b></label>
        <span class="HelpNote">(<%= :prefs_image_size_help.t %>)</span><br/>
        <%= form.select(:image_size, [
          [:prefs_image_small.l,     :small],
          [:prefs_image_medium.l,    :medium],
          [:prefs_image_large.l,     :large],
          [:prefs_image_huge.l,      :huge],
          [:prefs_image_full_size.l, :full_size],
        ]) %></td>
    </tr>
  </table><br/>

  <b><%= :prefs_layout_title.t %>:</b><br/>
  <%= form.select(:rows, [1, 2, 3, 4, 5, 10, 20, 50]) %>
  <label for="user_rows"><%= :prefs_rows_by.t %></label>
  <%= form.select(:columns, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) %>
  <label for="user_columns"><%= :prefs_columns.t %></label><br/>

  <%= form.check_box("alternate_rows") %>
  <label for="user_alternate_rows"><%= :prefs_alt_row_colors.t %></label><br/>
  <%= form.check_box("alternate_columns") %>
  <label for="user_alternate_columns"><%= :prefs_alt_col_colors.t %></label><br/>
  <%= form.check_box("vertical_layout") %>
  <label for="user_vertical_layout"><%= :prefs_text_below_images.t %></label><br/><br/>

  <b><%= :prefs_email_comments.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_comments_owner") %>
    <label for="user_email_comments_owner"><%= :prefs_email_comments_owner.t %></label><br/>
  <%= form.check_box("email_comments_response") %>
    <label for="user_email_comments_response"><%= :prefs_email_comments_response.t %></label><br/>
  <%= form.check_box("email_comments_all") %>
    <label for="user_email_comments_all"><%= :prefs_email_comments_all.t %></label><br/><br/>

  <b><%= :prefs_email_observations.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_observations_consensus") %>
    <label for="user_email_observations_consensus"><%= :prefs_email_observations_consensus.t %></label><br/>
  <%= form.check_box("email_observations_naming") %>
    <label for="user_email_observations_naming"><%= :prefs_email_observations_naming.t %></label><br/>
  <%= form.check_box("email_observations_all") %>
    <label for="user_email_observations_all"><%= :prefs_email_observations_all.t %></label><br/><br/>

  <b><%= :prefs_email_names.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_names_admin") %>
    <label for="user_email_names_admin"><%= :prefs_email_names_admin.t %></label><br/>
  <%= form.check_box("email_names_author") %>
    <label for="user_email_names_author"><%= :prefs_email_names_author.t %></label><br/>
  <%= form.check_box("email_names_editor") %>
    <label for="user_email_names_editor"><%= :prefs_email_names_editor.t %></label><br/>
  <%= form.check_box("email_names_reviewer") %>
    <label for="user_email_names_reviewer"><%= :prefs_email_names_reviewer.t %></label><br/>
  <%= form.check_box("email_names_all") %>
    <label for="user_email_names_all"><%= :prefs_email_names_all.t %></label><br/><br/>

  <b><%= :prefs_email_locations.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_locations_admin") %>
    <label for="user_email_locations_admin"><%= :prefs_email_locations_admin.t %></label><br/>
  <%= form.check_box("email_locations_author") %>
    <label for="user_email_locations_author"><%= :prefs_email_locations_author.t %></label><br/>
  <%= form.check_box("email_locations_editor") %>
    <label for="user_email_locations_editor"><%= :prefs_email_locations_editor.t %></label><br/>
  <%= form.check_box("email_locations_all") %>
    <label for="user_email_locations_all"><%= :prefs_email_locations_all.t %></label><br/><br/>

  <b><%= :prefs_email_general.t %>:</b> <%= :prefs_email_please_notify.t %><br/>
  <%= form.check_box("email_general_feature") %>
    <label for="user_email_general_feature"><%= :prefs_email_general_features.t %></label><br/>
  <%= form.check_box("email_general_commercial") %>
    <label for="user_email_general_commercial"><%= :prefs_email_general_commercial.t %></label><br/>
  <%= form.check_box("email_general_question") %>
    <label for="user_email_general_question"><%= :prefs_email_general_questions.t %></label><br/><br/>

  <b><%= :prefs_email_prefs.t %>:</b><br/>
  <%= form.check_box("email_html") %>
    <label for="user_email_html"><%= :prefs_email_html.t %></label><br/>

  <div class="HelpNoteIndent">
    <%= :prefs_email_note.tp %>
  </div>

  <br/><center><input type="submit" value="<%= :SAVE_EDITS.l %>" class="primary" /></center>
<% end %>

{'fraction_non_alphanumeric': 0.22431094460797432, 'fraction_numerical': 0.005084292213005084, 'mean_word_length': 4.825798908807482, 'pattern_counts': {'":': 0, '<': 565, '<?xml version=': 0, '>': 599, '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': '2462685', 'n_tokens_mistral': 5967, 'n_tokens_neox': 5511, 'n_words': 776}