<commit_before><h2><span class="fn n"><%= @person.name %></span>'s Profile</h2>
<%- if current_person?(@person) || current_person.admin? -%>
  <div class="button_container">
<%- end -%>
<%- if current_person.admin? -%>
  <%- activity = activated_status(@person)  -%>
  <%= link_to activity,
              admin_person_path(@person, :task => "deactivated"),
              :method => :put %>
  <%= "|" if current_person?(@person) %>
<%- end -%>
<%- if current_person?(@person) -%>
  <%= link_to "Edit profile", edit_person_path(@person) %> |
  <%= link_to "Change photo", @person.galleries.first %>
<%- end -%>
<%- if current_person?(@person) || current_person.admin? -%>
    <div class="clear"></div>
  </div>
<%- end -%>
<%- if admin? and not @person.active? -%>
  <p class="error">This person is not active</p>
<%- end -%>
<%- if current_person?(@person) && current_person.description.blank? -%>
  <div class="error">
    Your description is blank.
    <%= link_to "Click here to add a description", 
      edit_person_path(@person) %>
  </div>
<%- end -%>

<div class="toolbox">
  <%= image_tag @person.main_photo, :class => "profile-image photo",
                                    :alt => h(@person.name) %>
  <%- unless current_person?(@person) -%>
    <h3><%= @person.name %></h3>
    <ul class="tools">
      <%- if logged_in? -%>
        <%- unless Connection.exists?(@person, current_person) -%>
          <li><%= link_to "Request Connection",
                          person_connections_path(@person),
                          :method => :post %></li>
        <%- end -%>
        <%- if Connection.connected?(@person, current_person) -%>
          <li><%= link_to "Remove Connection " +
                          image_tag('icons/user_delete.png'),
                          connection_path(Connection.conn(current_person,
                                                          @person)), 
                          :method => :delete,
             :confirm => "Are you sure you want to remove this connection?" %>
          </li>
        <%- end -%>
          <%- if Connection.pending?(current_person, @person) -%>
          <li>
            <%= h @person.name %> has contacted you
            <br />
            (<%= link_to "respond to contact request", 
                         edit_connection_path(Connection.conn(current_person,
                                                              @person)) %>)
          </li>
          <%- end -%>
          <%- if Connection.pending?(@person, current_person) -%>
          <li>
            You've contacted <%= h @person.name %>
          </li>
          <%- end -%>
        <li><%= email_link(@person) %></li>
      <%- end -%>
    </ul>
  <%- end -%>
</div>
<%= display @person.description %><commit_msg>Polished connection message<commit_after><h2><span class="fn n"><%= @person.name %></span>'s Profile</h2>
<%- if current_person?(@person) || current_person.admin? -%>
  <div class="button_container">
<%- end -%>
<%- if current_person.admin? -%>
  <%- activity = activated_status(@person)  -%>
  <%= link_to activity,
              admin_person_path(@person, :task => "deactivated"),
              :method => :put %>
  <%= "|" if current_person?(@person) %>
<%- end -%>
<%- if current_person?(@person) -%>
  <%= link_to "Edit profile", edit_person_path(@person) %> |
  <%= link_to "Change photo", @person.galleries.first %>
<%- end -%>
<%- if current_person?(@person) || current_person.admin? -%>
    <div class="clear"></div>
  </div>
<%- end -%>
<%- if admin? and not @person.active? -%>
  <p class="error">This person is not active</p>
<%- end -%>
<%- if current_person?(@person) && current_person.description.blank? -%>
  <div class="error">
    Your description is blank.
    <%= link_to "Click here to add a description", 
      edit_person_path(@person) %>
  </div>
<%- end -%>

<div class="toolbox">
  <%= image_tag @person.main_photo, :class => "profile-image photo",
                                    :alt => h(@person.name) %>
  <%- unless current_person?(@person) -%>
    <h3><%= @person.name %></h3>
    <ul class="tools">
      <%- if logged_in? -%>
        <%- unless Connection.exists?(@person, current_person) -%>
          <li><%= link_to "Request Connection",
                          person_connections_path(@person),
                          :method => :post %></li>
        <%- end -%>
        <%- if Connection.connected?(@person, current_person) -%>
          <li>You're connected!
          <%= link_to image_tag('icons/user_delete.png'),
                      connection_path(Connection.conn(current_person,
                                                      @person)), 
                          :method => :delete,
                      :title => "Remove connection",
             :confirm => "Are you sure you want to remove this connection?" %>
          </li>
        <%- end -%>
          <%- if Connection.pending?(current_person, @person) -%>
          <li>
            <%= h @person.name %> has contacted you
            <br />
            (<%= link_to "respond to contact request", 
                         edit_connection_path(Connection.conn(current_person,
                                                              @person)) %>)
          </li>
          <%- end -%>
          <%- if Connection.pending?(@person, current_person) -%>
          <li>
            You've contacted <%= h @person.name %>
          </li>
          <%- end -%>
        <li><%= email_link(@person) %></li>
      <%- end -%>
    </ul>
  <%- end -%>
</div>
<%= display @person.description %>
{'fraction_non_alphanumeric': 0.18550983899821108, 'fraction_numerical': 0.0014311270125223613, 'mean_word_length': 1.889405684754522, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 156, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5609272', 'n_tokens_mistral': 1793, 'n_tokens_neox': 1668, 'n_words': 338}