<h5>{% trans %}title_order_from_last_old{% endtrans %}</h5>
<hr>
{% for i in history %}
<div class="row border m-2">
  <div class="col-md-8">
    <p class="text-info">{{ ('history_' ~ i.action)|trans }} : {{ i.loggedAt |date('_datetime.format'|trans) }} 
      {% if i.username %}
        {% trans %}title_author{% endtrans %}: {% if '@' in i.username and app.user.adminmode == false  %} {% trans %}hided_email{% endtrans %} {% else %} {{ i.username }} {% endif %}
      {% else %}
        {% trans %}title_noauthor{% endtrans %}
      {% endif %}
    </p> 
    {% if notype is not defined %}
      <p>{{ i.objectClass }} (# {{ i.objectId }}) {% if is_granted('ROLE_ADMIN') %}<a href="{{ path('admin_watchdog', {'type':i.objectClass|replace({'App\\Entity\\': ''}), 'id': i.objectId}) }}" class="btn btn-warning btn-sm" data-bs-toggle="tooltip" data-placement="top"  title="{% trans %}tooltip_directory_history{% endtrans %} (Admin)"><i class="fas fa-clock"></i></a>{% endif %}</p>
    {% endif %}   
    <p>{{ ('title_data_' ~ i.action)|trans }}</p>    
    <div class="table-responsive">
      <table class="table table-dark table-striped table-bordered">
        <thead>
          <tr>
            <th scope="col">{% trans %}title_field{% endtrans %}</th>
            <th scope="col">{% trans %}title_value{% endtrans %}</th>
          </tr>
        </thead>
        {% for field, value in i.data %}
        <tr>
          <td>
            {{ ('form_label_' ~ field)|trans }}
          </td>
          <td>
            {% if value is iterable %}
                {% for x, y in value %}
                  {{ x }} : {% if y is iterable %}{'iterable_value'|trans }}{% else %}{{ y }}{% endif %}
                {% endfor %}
            {% elseif value.timestamp is defined %}
              {{ value|date('_datetime.format'|trans) }}
            {% else %}
              {{ value? value|raw : 'value_no_value'|trans }}
            {% endif %}
            
          </td>
        </tr>
        {% endfor %} 
      </table>
    </div>
  </div>
</div>
{% endfor %}