<commit_before><%= content_for(:meta_title, "#{t('nlt.user_profile')} - #{@user.username}") %>

<div id="default_header_section">
  <h1><%= t('nlt.user_profile') %> - <%= @user.username %></h1>
</div>

<div class="col-md-9 col-sm-9">
  <div class="row">
    <%= render partial: "users/tabnav", locals: {user: @user} %>
    <div class="ad_excerpt">
      <h4><%= t('nlt.username') %>: <%= @user.username %></h4>
      <h4><%= t('nlt.member_since') %>: <%= l @user.created_at, format: :long %></h4>
      <ul>

        <% unless current_user == @user ||
             (current_user && current_user.blocking?(@user)) %>
          <li>
            <%= link_to new_conversation_path(recipient_id: @user.id),
                        class: "world_link" do %>
              <%= t('nlt.send_a_message_to') %> <%= @user.username %>
              <%= image_tag "email_send.png" %>
            <% end %>
          </li>
        <% end %>

        <% if user_signed_in? %>
          <% if current_user == @user %>
            <li>
              <%= link_to t('nlt.user_edit_profile'), user_edit_path(@user) %>
            </li>
          <% else %>
            <li>
            <% friendship = current_user.friend?(@user) %>

            <% if friendship.nil? %>
              <%= link_to friendships_path(friend_id: @user.id),
                          class: 'world_link',
                          method: :post do %>
                <%= t('nlt.profile_actions.friend.add', username: @user.username) %>

                <%= image_tag "friend_add.png" %>
              <% end %>
            <% else %>
              <%= link_to friendship, class: 'world_link', method: :delete do %>
                <%= t('nlt.profile_actions.friend.delete', username: @user.username) %>

                <%= image_tag "friend_delete.png" %>
              <% end %>
            <% end %>
            </li>

            <li>
              <% blocking = current_user.blocking?(@user) %>

              <% if blocking %>
                <%= link_to blocking,
                            method: :delete,
                            class: 'world_link' do %>
                  <%= t('nlt.profile_actions.blocking.delete', username: @user.username) %>

                  <%= image_tag "unblock.png" %>
                <% end %>
              <% else %>
                <%= link_to blockings_path(blocked_id: @user.id),
                            data: { confirm: t('nlt.profile_actions.blocking.confirm', username: @user.username) },
                            method: :post,
                            class: 'world_link' do %>
                  <%= t('nlt.profile_actions.blocking.add', username: @user.username) %>

                  <%= image_tag "block.png" %>
                <% end %>
              <% end %>
            </li>
          <% end %>
        <% end %>

        <% if policy(:admin).lock? %>
          <li>
            <% if @user.locked? %>
              <%= link_to unlock_user_path(@user.id), data: {confirm: "¿Estás seguro que quieres desbloquear a este usuario? Podrá volver iniciar sesión."} do %>
                <%= t('nlt.admin.unlock_user') %>
                <%= image_tag "add.png" %>
              <% end %>
            <% else %>
              <%= link_to lock_user_path(@user.id), data: {confirm: "¿Estás seguro que quieres bloquear a este usuario? No podrá iniciar sesión."} do %>
                <%= t('nlt.admin.lock_user') %>
                <%= image_tag "remove.png" %>
              <% end %>
            <% end %>
          </li>
        <% end %>

        <% if policy(:admin).become? %>
          <li>
            <%= link_to t('nlt.admin.become_user'), become_user_path(@user.id) %>
          </li>
        <% end %>
      </ul>

      <% unless @user.friends.count == 0 %>
        <div>
        <h4><%= t('nlt.friends') %>:</h4>
        <ul>
          <% @user.friends.each do |friend| %>
            <li>
              <%= link_to friend.username, profile_path(friend.username) %>
            </li>
          <% end %>
        </ul>
        <br>
        </div>
      <% end %>
    </div>
  </div>
</div>
<commit_msg>Normalize link styles in profile<commit_after><%= content_for(:meta_title, "#{t('nlt.user_profile')} - #{@user.username}") %>

<div id="default_header_section">
  <h1><%= t('nlt.user_profile') %> - <%= @user.username %></h1>
</div>

<div class="col-md-9 col-sm-9">
  <div class="row">
    <%= render partial: "users/tabnav", locals: {user: @user} %>
    <div class="ad_excerpt">
      <h4><%= t('nlt.username') %>: <%= @user.username %></h4>
      <h4><%= t('nlt.member_since') %>: <%= l @user.created_at, format: :long %></h4>
      <ul>

        <% unless current_user == @user ||
             (current_user && current_user.blocking?(@user)) %>
          <li>
            <%= link_to new_conversation_path(recipient_id: @user.id),
                        class: "world_link" do %>
              <%= t('nlt.send_a_message_to') %> <%= @user.username %>
              <%= image_tag "email_send.png" %>
            <% end %>
          </li>
        <% end %>

        <% if user_signed_in? %>
          <% if current_user == @user %>
            <li>
              <%= link_to t('nlt.user_edit_profile'), user_edit_path(@user) %>
            </li>
          <% else %>
            <li>
            <% friendship = current_user.friend?(@user) %>

            <% if friendship.nil? %>
              <%= link_to friendships_path(friend_id: @user.id),
                          class: 'world_link',
                          method: :post do %>
                <%= t('nlt.profile_actions.friend.add', username: @user.username) %>

                <%= image_tag "friend_add.png" %>
              <% end %>
            <% else %>
              <%= link_to friendship, class: 'world_link', method: :delete do %>
                <%= t('nlt.profile_actions.friend.delete', username: @user.username) %>

                <%= image_tag "friend_delete.png" %>
              <% end %>
            <% end %>
            </li>

            <li>
              <% blocking = current_user.blocking?(@user) %>

              <% if blocking %>
                <%= link_to blocking,
                            method: :delete,
                            class: 'world_link' do %>
                  <%= t('nlt.profile_actions.blocking.delete', username: @user.username) %>

                  <%= image_tag "unblock.png" %>
                <% end %>
              <% else %>
                <%= link_to blockings_path(blocked_id: @user.id),
                            data: { confirm: t('nlt.profile_actions.blocking.confirm', username: @user.username) },
                            method: :post,
                            class: 'world_link' do %>
                  <%= t('nlt.profile_actions.blocking.add', username: @user.username) %>

                  <%= image_tag "block.png" %>
                <% end %>
              <% end %>
            </li>
          <% end %>
        <% end %>

        <% if policy(:admin).lock? %>
          <li>
            <% if @user.locked? %>
              <%= link_to unlock_user_path(@user.id),
                          data: {confirm: "¿Estás seguro que quieres desbloquear a este usuario? Podrá volver iniciar sesión."},
                          class: 'world_link' do %>
                <%= t('nlt.admin.unlock_user') %>
                <%= image_tag "add.png" %>
              <% end %>
            <% else %>
              <%= link_to lock_user_path(@user.id),
                          data: {confirm: "¿Estás seguro que quieres bloquear a este usuario? No podrá iniciar sesión."},
                          class: 'world_link' do %>
                <%= t('nlt.admin.lock_user') %>
                <%= image_tag "remove.png" %>
              <% end %>
            <% end %>
          </li>
        <% end %>

        <% if policy(:admin).become? %>
          <li>
            <%= link_to t('nlt.admin.become_user'),
                        become_user_path(@user.id),
                        class: 'world_link' %>
          </li>
        <% end %>
      </ul>

      <% unless @user.friends.count == 0 %>
        <div>
        <h4><%= t('nlt.friends') %>:</h4>
        <ul>
          <% @user.friends.each do |friend| %>
            <li>
              <%= link_to friend.username, profile_path(friend.username) %>
            </li>
          <% end %>
        </ul>
        <br>
        </div>
      <% end %>
    </div>
  </div>
</div>

{'fraction_non_alphanumeric': 0.17341176470588235, 'fraction_numerical': 0.0025882352941176473, 'mean_word_length': 1.4171168609610463, 'pattern_counts': {'":': 0, '<': 211, '<?xml version=': 0, '>': 211, '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': '103822', 'n_tokens_mistral': 2859, 'n_tokens_neox': 2515, 'n_words': 464}