<commit_before><% title h(@user_details.name) %>


<% crumb 'Userlist', {:controller => 'users', :action => 'list'} %>
<% crumb h(@user_details.name), {:controller => 'users', :action => 'show', :id => @user_details}, :class => 'active' %>

<div id="user-details" class="col-5 "> 


  
<div class="essentials clearfix">
   <%= link_to image_tag(gravatar_img(@user_details.email,@user_details.level), :alt => ""), :action => 'gravatar' %>
  <h2><%= h @user_details.name %></h2>
  <p id="user-title"><span id="user-title-name"><%= @user_details.title %></span> <span class="small"><%= link_to_function 'edit', "Opinion.togglePair('user-title','user-title-edit')" if superuser? %></span></p>
  <% if superuser? %>
  
   <div id="user-title-edit" style="display:none" class="clearfix">
     <% form_remote_for :user, @user_details, :url => {:controller => 'users', :action => 'update', :id => @user_details} do |user| %>
       <%= user.text_field 'title' %>
       <%= submit_tag 'save' %> or <%= link_to_function 'cancel', "Opinion.togglePair('user-title','user-title-edit')" %>
     <% end %>
   </div>
   <% end %>
   
</div><!-- .essientials -->

<div class="supplementary">

  <% if @user_details == @user %>
  
  <% form_for :user, @user_details, :url => users_url(:action => 'update', :id => @user) do |user| %>

    <%= error_messages_for :user %>
    <dl>
      
      <dt>
        <label for="user_email">Email address</label>

      </dt>
      <dd><%= user.text_field 'email' %></dd>

      <dt>
        <label for="user_name">Your user name</label>

      </dt>
      <dd><%= user.text_field 'name' %></dd>

      <dt>
        <label for="user_url">Homepage</label>

      </dt>
      <dd><%= user.text_field 'url' %></dd>
    
      <dt>
        <label for="user_signature">Signature (no line breaks allowed)</label>
       
      </dt>
      <dd><%= user.text_area 'signature', {:cols => 2, :rows => 1} %></dd>
    
    </dl>
    
    <input name="submit" type="image" src="/images/forums/btn-save.png" value="Save changes" style="vertical-align:middle; margin:0px" /> or <%= link_to 'Cancel', root_url %>
  <% end %>

  <% else %>

  <dl class="user-stats">
    
    <% if moderator? %>
      <dt><label for="user_email">Email</label></dt>
      <dd><%= h @user_details.email %></dd>

    <dt><label for="user_name">Level</label></dt>
    <dd>
      <% if superuser? %>  
        <select onchange="new Ajax.Request('/users/update/<%= @user_details.id %>', {parameters: {a:1, 'user[level]':(this.value == 'custom') ? prompt('Enter custom access level:',5) : this.value}, evalScripts:true});return false;">
          <% User.levels.each do |value, name| %>
            <option value="<%= value %>" <%= 'selected="selected"' if @user_details.level == value %>><%= name %></option><commit_msg>Added text "no line breaks allowed" in the sig form<commit_after><% title h(@user_details.name) %>


<% crumb 'Userlist', {:controller => 'users', :action => 'list'} %>
<% crumb h(@user_details.name), {:controller => 'users', :action => 'show', :id => @user_details}, :class => 'active' %>

<div id="user-details" class="col-5 "> 


  
<div class="essentials clearfix">
   <%= link_to image_tag(gravatar_img(@user_details.email,@user_details.level), :alt => ""), :action => 'gravatar' %>
  <h2><%= h @user_details.name %></h2>
  <p id="user-title"><span id="user-title-name"><%= @user_details.title %></span> <span class="small"><%= link_to_function 'edit', "Opinion.togglePair('user-title','user-title-edit')" if superuser? %></span></p>
  <% if superuser? %>
  
   <div id="user-title-edit" style="display:none" class="clearfix">
     <% form_remote_for :user, @user_details, :url => {:controller => 'users', :action => 'update', :id => @user_details} do |user| %>
       <%= user.text_field 'title' %>
       <%= submit_tag 'save' %> or <%= link_to_function 'cancel', "Opinion.togglePair('user-title','user-title-edit')" %>
     <% end %>
   </div>
   <% end %>
   
</div><!-- .essientials -->

<div class="supplementary">

  <% if @user_details == @user %>
  
  <% form_for :user, @user_details, :url => users_url(:action => 'update', :id => @user) do |user| %>

    <%= error_messages_for :user %>
    <dl>
      
      <dt>
        <label for="user_email">Email address</label>

      </dt>
      <dd><%= user.text_field 'email' %></dd>

      <dt>
        <label for="user_name">Your user name</label>

      </dt>
      <dd><%= user.text_field 'name' %></dd>

      <dt>
        <label for="user_url">Homepage</label>

      </dt>
      <dd><%= user.text_field 'url' %></dd>
    
      <dt>
        <label for="user_signature">Signature <span class="light">(no line breaks allowed)</span></label>
       
      </dt>
      <dd><%= user.text_area 'signature', {:cols => 2, :rows => 3} %></dd>
    
    </dl>
    
    <input name="submit" type="image" src="/images/forums/btn-save.png" value="Save changes" style="vertical-align:middle; margin:0px" /> or <%= link_to 'Cancel', root_url %>
  <% end %>

  <% else %>

  <dl class="user-stats">
    
    <% if moderator? %>
      <dt><label for="user_email">Email</label></dt>
      <dd><%= h @user_details.email %></dd>

    <dt><label for="user_name">Level</label></dt>
    <dd>
      <% if superuser? %>  
        <select onchange="new Ajax.Request('/users/update/<%= @user_details.id %>', {parameters: {a:1, 'user[level]':(this.value == 'custom') ? prompt('Enter custom access level:',5) : this.value}, evalScripts:true});return false;">
          <% User.levels.each do |value, name| %>
            <option value="<%= value %>" <%= 'selected="selected"' if @user_details.level == value %>><%= name %></option>
{'fraction_non_alphanumeric': 0.2272005644734521, 'fraction_numerical': 0.002822367260539778, 'mean_word_length': 3.395348837209302, 'pattern_counts': {'":': 0, '<': 183, '<?xml version=': 0, '>': 217, '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': '3075950', 'n_tokens_mistral': 2091, 'n_tokens_neox': 1922, 'n_words': 403}