{% extends "tp_base_extended.html" %}

{% load i18n %}

{% block title %}
{{ block.super }} » {% trans "Translate" %}
{% endblock %}

{% block bodyclass %}tptranslate{% endblock bodyclass %}

{% block content %}
<!-- The editing view -->
{% for item in children %}
<div class="module-primary" lang="{{ LANGUAGE_CODE }}">
    <div class="bd">
        {% if item.isdir or item.isfile %}
        <div class="item {% cycle 'even' 'odd' %}">
        {% include "language/item_block.html" %}
        {% include "language/item_stats.html" %}
        </div>
        {% endif %}
    </div>
</div>
{% endfor %}
{% endblock content %}

{% block postcontent %}
{% include "translation_project/fileop_forms.html" %}
{% include "top_contributers_table.html" %}
{% endblock postcontent %}

{% block scripts_extra %}
{{ block.super }}
{% if upload %}
<script type="text/javascript">
$(document).ready(function() {
  $("select#id_upload_to_dir").parent().hide();
  $("input#id_file").change(function() {
    if (/\.zip$/.test($(this).val())) {
      $("select#id_upload_to").parent().hide();
      $("select#id_upload_to_dir").parent().show();
    } else {
      $("select#id_upload_to_dir").parent().hide();
      $("select#id_upload_to").parent().show();
    }
  });
});
</script>
{% endif %}
{% endblock %}
