{% extends "otree/BaseAdmin.html" %}

{% block title %}
    Data Export
{% endblock %}


{% block content %}

    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">Citation requirement</h3>
        </div>
        <div class="panel-body">
            <p>
                If you publish research conducted using oTree,
                you are required by the oTree license to cite <a
                    href="http://dx.doi.org/10.1016/j.jbef.2015.12.001">this
                paper</a>.
            </p>
            <p>
                Citation:
            </p>
            <p>
                Chen, D.L., Schonger, M., Wickens, C., 2016. oTree - An
                open-source
                platform for laboratory, online and field experiments.
                Journal of Behavioral and Experimental Finance, vol 9: 88-97
            </p>

        </div>
    </div>

    <h3>All apps</h3>
    <p>
        <a href="{% url 'ExportWide' %}?xlsx=1">Excel</a> |
        <a href="{% url 'ExportWide' %}">CSV</a>
    </p>
    <p>
        Data for all apps in one file.
        There is one row per participant;
        different apps and rounds are stacked horizontally.
        This format is useful if you want to analyze participants' behavior
        across apps.
    </p>

    {% if apps %}
        <h3>Per-app</h3>
        <p>
            These files contain a row for each player in the given app.
            If there are multiple rounds, there will be multiple rows for the
            same participant.
            This format is useful if you are mainly interested in one app,
            or if you want to correlate data between rounds of the same app.
        </p>

        <table class="table">
            <thead>
            <tr>
                <th>App</th>
                <th>Data</th>
                <th>Documentation</th>
            </tr>
            </thead>
            <tbody>
            {% for app in apps %}
                <tr>
                    <td>
                        {{ app.name }}
                    </td>
                    <td>
                        <a href="{% url 'ExportApp' app.label %}?xlsx=1">Excel</a> |
                        <a href="{% url 'ExportApp' app.label %}">CSV</a>
                    </td>
                    <td>
                        <a href="{% url 'ExportAppDocs' app.label %}">CSV</a>
                    </td>
                    <td>
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>

    {% else %}
        <p>No sessions has yet taken place</p>
    {% endif %}

        <h3>Time spent on each page</h3>
        <p><a href="{% url 'ExportTimeSpent' %}"><span
            class="glyphicon glyphicon-download-alt"></span>
        <b>Download</b></a></p>

    <br/>
    <br/>

{% endblock %}
