{% extends "otree_tools/BaseToolsAdmin.html" %}

{% block title %}

Time tracking info (<code>{% verbatim %}{%&nbsp;tracking_time&nbsp;%}{% endverbatim %}</code> tag)

{% endblock %}

{% block content %}

{%  if timestamps %}
<table class="table table-hover table-striped table-resonsive">
    <thead>
    <th>Session code</th>
    <th>Participant code</th>
    <th>App name</th>
    <th>Round number</th>
    <th>Page name</th>
    <th>Entrance timestamp</th>
    <th>Exit timestamp</th>
    <th>Duration</th>
    <th>Exit type</th>
    </thead>
    <tbody>
    {% for s in timestamps %}
    <tr>

        <td>{{ s.participant.session.code}}</td>
        <td>{{ s.participant.code}}</td>
        <td>{{ s.app_name}}</td>
        <td>{{ s.player.round_number}}</td>

        <td>{{ s.page_name }}</td>
        <td>{{ s.timestamp|date:'Y-m-d H:i:s.u'}}</td>
        <td>{{ s.early_exits|date:'Y-m-d H:i:s.u'}}</td>
        <td>{{ s.timediff}}</td>
        <td>{{ s.exittype}}</td>


    </tr>
    {% endfor %}
    </tbody>
</table>
{% include 'otree_tools/includes/pagination_footer.html' %}
{% else %}
No information about time tracking is available. If you want to track time spent per page, insert
<code>{% verbatim %} {%&nbsp;tracking_time&nbsp;%} {% endverbatim %}</code> to a corresponding template.
{% endif %}
{% endblock %}

{% block internal_styles %}
{{ block.super }}
<style>
    .red {
        color: red
    }

    .green {
        color: green
    }
</style>
{% endblock %}
