<commit_before><p class="bg-info">
  <h2 class='text-center'>Your Resume and Translations</h2>
</p>

<table class="table resume-table">
  <% resume = @original_resumes.first %>
  <thead>
    <tr>
      <th class="col-md-8 resume">Your Resume</th>
      <th class="col-md-4">Info</th>
      <!-- <th>Owner</th>
      <th>Translator</th>
      <th>Language</th>
      <th colspan="2"></th> -->
    </tr>
  </thead>

  <tbody>
      <tr>
        <% if resume.present? %>
          <td class="col-md-8 resume"><%= resume.sentence %></td>
          <td class="col-md-4 info">
            <ul>
              <li>owner: <%= resume.owner.username %></li>
              <li>lang: <%= resume.written_language.code %></li>
              <% if current_user.id == resume.owner_id %>
                <li><%= link_to 'Edit', edit_user_resume_path(id: resume.id), class: 'btn btn-default btn-sm' %></li>
                <li><%= link_to 'Delete', user_resume_path(id: resume.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger btn-sm' %></li>
              <% end %>
            </ul>
          </td>
        <% elsif current_user.username == params[:user_username] %>
          <td class="col-md-8"><%= link_to 'New Resume', new_user_resume_path(user_username:current_user.username), class: 'btn btn-default' %></td>
        <% end %>
      </tr>
    </tbody>
    <thead>
      <tr>
        <th class="col-md-8 resume">Your Translations</th>
        <th class="col-md-4">Info</th>
        <!-- <th>Owner</th>
        <th>Translator</th>
        <th>Language</th>
        <th colspan="2"></th> -->
      </tr>
    </thead>
    <% @translated_resumes.each do |resume| %>
      <tr>
        <td class="col-md-8 resume"><%= resume.sentence %></td>
        <td class="col-md-4 info">
          <ul>
            <li>owner: <%= resume.owner.username %></li>
            <li>lang: <%= resume.written_language.code %></li>
            <% if current_user.id == resume.translator_id or current_user.id == resume.owner_id %>
              <li><%= link_to 'Edit', edit_user_resume_path(id: resume.id), class: 'btn btn-default btn-sm' %></li>
              <li><%= link_to 'Delete', user_resume_path(id: resume.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger btn-sm' %></li>
            <% end %>
          </ul>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<!-- Link to create translation resumes in Other User's Resume -->
<%# if current_user.username != params[:user_username] && resume.present? %>
<% unless current_user.username == params[:user_username] || resume.blank? %>
  <%= link_to 'new Translation Resume', new_user_resume_path %><commit_msg>#77 modify view/resumes/index<commit_after><% user = params[:user_username]  %>
<p class="bg-info">
  <h2 class='text-center'><%= user %>'s Resume and Translations</h2>
</p>

<table class="table resume-table">
  <% resume = @original_resumes.first %>
  <thead>
    <tr>
      <th class="col-md-8 resume"><%= user %>'s Resume</th>
      <th class="col-md-4">Info</th>
      <!-- <th>Owner</th>
      <th>Translator</th>
      <th>Language</th>
      <th colspan="2"></th> -->
    </tr>
  </thead>

  <tbody>
      <tr>
        <% if resume.present? %>
          <td class="col-md-8 resume"><%= simple_format(resume.sentence) %></td>
          <td class="col-md-4 info">
            <ul>
              <li>owner: <%= resume.owner.username %></li>
              <li>lang: <%= resume.written_language.code %></li>
              <% if current_user.id == resume.owner_id %>
                <li><%= link_to 'Edit', edit_user_resume_path(id: resume.id), class: 'btn btn-default btn-sm' %></li>
                <li><%= link_to 'Delete', user_resume_path(id: resume.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger btn-sm' %></li>
              <% end %>
            </ul>
          </td>
        <% elsif current_user.username == params[:user_username] %>
          <td class="col-md-8"><%= link_to 'New Resume', new_user_resume_path(user_username:current_user.username), class: 'btn btn-default' %></td>
        <% end %>
      </tr>
    </tbody>
    <thead>
      <tr>
        <th class="col-md-8 resume"><%= user %>'s Translations</th>
        <th class="col-md-4">Info</th>
        <!-- <th>Owner</th>
        <th>Translator</th>
        <th>Language</th>
        <th colspan="2"></th> -->
      </tr>
    </thead>
    <% @translated_resumes.each do |resume| %>
      <tr>
        <td class="col-md-8 resume"><%= simple_format(resume.sentence) %></td>
        <td class="col-md-4 info">
          <ul>
            <li>translator: <%= resume.translator.username %></li>
            <li>lang: <%= resume.written_language.code %></li>
            <% if current_user.id == resume.translator_id or current_user.id == resume.owner_id %>
              <li><%= link_to 'Edit', edit_user_resume_path(id: resume.id), class: 'btn btn-default btn-sm' %></li>
              <li><%= link_to 'Delete', user_resume_path(id: resume.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger btn-sm' %></li>
            <% end %>
          </ul>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<!-- Link to create translation resumes in Other User's Resume -->
<%# if current_user.username != params[:user_username] && resume.present? %>
<% unless current_user.username == params[:user_username] || resume.blank? %>
  <%= link_to 'new Translation Resume', new_user_resume_path %>
{'fraction_non_alphanumeric': 0.19960188201230547, 'fraction_numerical': 0.005066956207021353, 'mean_word_length': 2.3762981062919977, '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': '3606105', 'n_tokens_mistral': 1959, 'n_tokens_neox': 1855, 'n_words': 395}