<commit_before><% if !list.nil? and list.size > 0 %>
<span class="label" data-toggle="collapse" data-target="#entities-list">
  <i class="icon-chevron-right"></i> Mostrar tabla de relaciones...
</span>
<div id="entities-list" class="entities-list collapse out">
  <table class="table">
    <thead>
      <tr>
        <th></th>
        <th></th>
        <th></th>
        <th>desde</th>
        <th>hasta</th>
        <th>en</th>
      </tr>
    </thead>

    <tbody>
      <% list.each do |relation| %>
        <tr>
          <td><%= 
            link_to relation.source.short_or_long_name, relation.source.person ? person_path(relation.source) : organization_path(relation.source) 
          %></td>
          <td><%= relation.relation_type.description %></td>
          <td><%= 
            link_to relation.target.short_or_long_name, relation.target.person ? person_path(relation.target) : organization_path(relation.target) 
          %></td>
          <td><%= relation.from %></td>
          <td><%= relation.to %></td>
          <td><%= relation.at %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<% end %><commit_msg>Show edit relation button for admin users<commit_after><% if !list.nil? and list.size > 0 %>
<span class="label" data-toggle="collapse" data-target="#entities-list">
  <i class="icon-chevron-right"></i> Mostrar tabla de relaciones...
</span>
<div id="entities-list" class="entities-list collapse out">
  <table class="table">
    <thead>
      <tr>
        <% if can? :manage, Relation %>
        <th></th>
        <% end %>
        <th></th>
        <th></th>
        <th></th>
        <th>desde</th>
        <th>hasta</th>
        <th>en</th>
      </tr>
    </thead>

    <tbody>
      <% list.each do |relation| %>
        <tr>
          <% if can? :manage, Relation %>
          <td>
            <%= link_to raw('<span class="label"><i class="icon-edit"></i></span>'),
                        rails_admin.edit_path(id: relation.id, model_name: relation.class.name), 
                        target: '_blank' %>
          </td>
          <% end %>
          <td>
            <%= link_to relation.source.short_or_long_name, 
                        relation.source.person ? person_path(relation.source) : organization_path(relation.source) %>
          </td>
          <td><%= relation.relation_type.description %></td>
          <td>
            <%= link_to relation.target.short_or_long_name, 
                        relation.target.person ? person_path(relation.target) : organization_path(relation.target) %>
          </td>
          <td><%= relation.from %></td>
          <td><%= relation.to %></td>
          <td><%= relation.at %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<% end %>
{'fraction_non_alphanumeric': 0.18523878437047755, 'fraction_numerical': 0.000723589001447178, 'mean_word_length': 1.9859611231101513, 'pattern_counts': {'":': 0, '<': 116, '<?xml version=': 0, '>': 118, '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': '2544150', 'n_tokens_mistral': 933, 'n_tokens_neox': 877, 'n_words': 171}