{% extends "tp_base_extended.html" %}

{% load i18n baseurl %}

{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}

{% block body.id %}fileindex{% endblock body.id %}

{% block bodyclass %}tpoverview{% endblock bodyclass %}

{% block breadcrumbs_content %}
{% include "language/item_title.html" %}
{% endblock %}

{% block content %}
{% if children %}
<!--! The statistics view -->
<div class="module-primary" lang="{{ LANGUAGE_CODE }}">
    <div class="bd">
        <table class="sortable stats" id="stats" cellpadding="5"
        cellspacing="0" width="100%" lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
            <thead>
                <tr>
                    <th class="stats">{{ stats_headings.name }}</th>
                    <th class="stats">{{ stats_headings.progress }}</th>
                    <th class="stats sorttable_numeric">{{ stats_headings.summary }}</th>
                    <th class="stats">{{ stats_headings.totalwords }}</th>
                </tr>
            </thead>
            <tbody class="stats">
                {% for item in children %}
                <tr class="item {% cycle 'even' 'odd' %}" title="{{ item.description }}">
                {% include "language/item_summary.html" %}
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endif %}
{% endblock content %}

{% block postcontent %}
{% if upload %}
<div id="upload" class="module first clear" lang="{{ LANGUAGE_CODE }}">
    <div class="bd">
        <h2>{{ upload.form.title }}</h2>
        <form action="" method="post" id="uploadform" name="uploadform" enctype="multipart/form-data">
          {{ upload.as_p }}
        </form>
    </div>
</div>
{% endif %}

{% if update %}
<div id="update" class="module first clear" lang="{{ LANGUAGE_CODE }}">
    <div class="bd">
        <form action="" method="post" name="updateform" enctype="multipart/form-data">
          {{ update.as_p }}
        </form>
    </div>
</div>
{% endif %}

{% include "top_contributers_table.html" %}
{% endblock postcontent %}

{% block scripts_extra %}
{{ block.super }}
<script type="text/javascript" src='{{ "js/sorttable.js"|m }}'></script>
{% endblock %}
