<commit_before><%
# Display a user and their proposals/sessions with conditional formatting.
#
# Locals:
# * user => The User to display. REQUIRED.
# * wrapper_tag => Tag to wrap the display in. Defaults to :div.
# * display_sub_list => Should a sub_list, a detailed list of proposals/sessions for the user, be displayed? Defaults to false.
# * hide_rooms => Should the rooms be hidden in the list of sessions displayed for each user? Defaults to false.

hide_rooms ||= false
wrapper_tag ||= :div
display_sub_list ||= false
%>

<% content_tag wrapper_tag, :class => "user_box vcard #{admin? && user.admin? ? ' admin' : ''}" do %>
  <%= link_to( image_tag( user.photo.url(:profile), :class => 'user-photo photo' ), user ) if user.photo.file? %>
  <div class='user_head'>
    <h3><%= link_to user.fullname, user, :name => "id_#{user.id}", :id => "id_#{user.id}", :class => 'fn n' %></h3>
    <% unless user.affiliation.blank? -%>
    <span class='affiliation org'><%= user.affiliation %></span>
    <% end -%>
  </div>
  <div class='user_body'>
    <div class='user_links'>
      <ul>
        <% if admin? || can_edit?(user) %>
          <li>Email (private): <%= display_link_to(user.email, :mailto => true) %></li>
        <% end -%>
        <% unless user.website.blank? %>
          <li>Website: <%= display_link_to(user.website, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% unless user.blog_url.blank? %>
          <li>Blog: <%= display_link_to(user.blog_url, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% unless user.twitter.blank? %>
          <li>Twitter: <%= display_link_to(user.twitter_url, :title => user.twitter, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% unless user.identica.blank? %>
          <li>Identi.ca: <%= display_link_to(user.identica_url, :title => user.identica, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% user_favorites_count = @user_favorites_count_for_user_hash ? (@user_favorites_count_for_user_hash[user.id] || 0) : user.favorites.count %>
        <% unless user_favorites_count == 0 %>
          <li>Favorites: <%= link_to "View #{user.first_name.ergo.possessiveize} favorites", user_favorites_path(user) %></li>
        <% end -%>
      </ul>
    </div>

  <% unless user.biography.blank? %>
    <h4>Biography</h4>
    <div class='note'>
      <%= display_textile_for user.biography %>
    </div>
  <% end %>
  
  <% if can_edit?(user) %>
    <div class='record-controls'>
      <%= link_to "Edit", edit_user_path(user), :class => "editable" %>
      <% if admin? %>
        <%= link_to "Login as this user", browser_session_path(:login_as => user.login), :method => :post, :class => "cancelable" %>
      <% end %>
    </div>
  <% end %>
  
  <% if display_sub_list %>
    <%= render :partial => 'proposals/sub_list', :locals => { :container => user, :header_tag => :h4 } %>
  <% else %>
    <% if @event.proposal_status_published? %>
      <%
      # Use prefetched values
      sessions = @sessions_for_user_hash.ergo[user.id] || user.sessions
      %>
      <% unless sessions.empty? %>
        <h4 class='sessions'>Sessions</h4>
        <%#= render :partial => 'proposals/list_concise', :locals => { :items => sessions, :hide_rooms => hide_rooms } %><commit_msg>Fixed users#_block, display the concise list of sessions for a speaker.<commit_after><%
# Display a user and their proposals/sessions with conditional formatting.
#
# Locals:
# * user => The User to display. REQUIRED.
# * wrapper_tag => Tag to wrap the display in. Defaults to :div.
# * display_sub_list => Should a sub_list, a detailed list of proposals/sessions for the user, be displayed? Defaults to false.
# * hide_rooms => Should the rooms be hidden in the list of sessions displayed for each user? Defaults to false.

hide_rooms ||= false
wrapper_tag ||= :div
display_sub_list ||= false
%>

<% content_tag wrapper_tag, :class => "user_box vcard #{admin? && user.admin? ? ' admin' : ''}" do %>
  <%= link_to( image_tag( user.photo.url(:profile), :class => 'user-photo photo' ), user ) if user.photo.file? %>
  <div class='user_head'>
    <h3><%= link_to user.fullname, user, :name => "id_#{user.id}", :id => "id_#{user.id}", :class => 'fn n' %></h3>
    <% unless user.affiliation.blank? -%>
    <span class='affiliation org'><%= user.affiliation %></span>
    <% end -%>
  </div>
  <div class='user_body'>
    <div class='user_links'>
      <ul>
        <% if admin? || can_edit?(user) %>
          <li>Email (private): <%= display_link_to(user.email, :mailto => true) %></li>
        <% end -%>
        <% unless user.website.blank? %>
          <li>Website: <%= display_link_to(user.website, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% unless user.blog_url.blank? %>
          <li>Blog: <%= display_link_to(user.blog_url, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% unless user.twitter.blank? %>
          <li>Twitter: <%= display_link_to(user.twitter_url, :title => user.twitter, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% unless user.identica.blank? %>
          <li>Identi.ca: <%= display_link_to(user.identica_url, :title => user.identica, :nofollow => true, :popup => true, :class => 'url') %></li>
        <% end %>
        <% user_favorites_count = @user_favorites_count_for_user_hash ? (@user_favorites_count_for_user_hash[user.id] || 0) : user.favorites.count %>
        <% unless user_favorites_count == 0 %>
          <li>Favorites: <%= link_to "View #{user.first_name.ergo.possessiveize} favorites", user_favorites_path(user) %></li>
        <% end -%>
      </ul>
    </div>

  <% unless user.biography.blank? %>
    <h4>Biography</h4>
    <div class='note'>
      <%= display_textile_for user.biography %>
    </div>
  <% end %>
  
  <% if can_edit?(user) %>
    <div class='record-controls'>
      <%= link_to "Edit", edit_user_path(user), :class => "editable" %>
      <% if admin? %>
        <%= link_to "Login as this user", browser_session_path(:login_as => user.login), :method => :post, :class => "cancelable" %>
      <% end %>
    </div>
  <% end %>
  
  <% if display_sub_list %>
    <%= render :partial => 'proposals/sub_list', :locals => { :container => user, :header_tag => :h4 } %>
  <% else %>
    <% if @event.proposal_status_published? %>
      <%
      # Use prefetched values
      sessions = @sessions_for_user_hash.ergo[user.id] || user.sessions
      %>
      <% unless sessions.empty? %>
        <h4 class='sessions'>Sessions</h4>
        <%= render :partial => 'proposals/list_concise', :locals => { :items => sessions, :hide_rooms => hide_rooms } %>
{'fraction_non_alphanumeric': 0.18739903069466882, 'fraction_numerical': 0.0026435599941254224, 'mean_word_length': 3.172794117647059, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 221, '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': '1532032', 'n_tokens_mistral': 2472, 'n_tokens_neox': 2307, 'n_words': 528}