<?php

/* batches.tpl */
class __TwigTemplate_a0177fb53ff756ec8faa61d78dca17036c3c4c54a436c3e4363516ad84498ffe extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("base.tpl", "batches.tpl", 1);
        $this->blocks = array(
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "base.tpl";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_content($context, array $blocks = array())
    {
        // line 4
        echo "  <div class=\"page-header\">
    <h1>Недавние загрузки</h1>
  </div>

  ";
        // line 8
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["batches"]) ? $context["batches"] : null));
        foreach ($context['_seq'] as $context["_key"] => $context["batch"]) {
            // line 9
            echo "    <div class=\"batch\">
      <h2><a href=\"/batch/";
            // line 10
            echo twig_escape_filter($this->env, $this->getAttribute($context["batch"], "id", array()), "html", null, true);
            echo "\">";
            echo twig_escape_filter($this->env, $this->getAttribute($context["batch"], "date", array()), "html", null, true);
            echo "</a> (";
            echo twig_escape_filter($this->env, $this->getAttribute($context["batch"], "count", array()), "html", null, true);
            echo ")</h2>
      <div class=\"files\">
        ";
            // line 12
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["batch"], "files", array()));
            foreach ($context['_seq'] as $context["_key"] => $context["file"]) {
                // line 13
                echo "          <div class=\"file";
                if ($this->getAttribute($context["file"], "ready", array())) {
                    echo " ready";
                } else {
                    echo " not_ready";
                }
                echo "\" data-id=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["file"], "id", array()), "html", null, true);
                echo "\">
            <a href=\"";
                // line 14
                echo twig_escape_filter($this->env, $this->getAttribute($context["file"], "link", array()), "html", null, true);
                echo "\" class=\"preview\" style=\"background-image: url(";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($context["file"], "thumbnails", array()), "sq", array()), "link", array()), "html", null, true);
                echo ")\"></a>
            <div class=\"name\"><a href=\"";
                // line 15
                echo twig_escape_filter($this->env, $this->getAttribute($context["file"], "link", array()), "html", null, true);
                echo "\">";
                echo twig_escape_filter($this->env, $this->getAttribute($context["file"], "name", array()), "html", null, true);
                echo "</a></div>
          </div>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['file'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 18
            echo "      </div>
    </div>
  ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['batch'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
    }

    public function getTemplateName()
    {
        return "batches.tpl";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  85 => 18,  74 => 15,  68 => 14,  57 => 13,  53 => 12,  44 => 10,  41 => 9,  37 => 8,  31 => 4,  28 => 3,  11 => 1,);
    }
}
/* {% extends "base.tpl" %}*/
/* */
/* {% block content %}*/
/*   <div class="page-header">*/
/*     <h1>Недавние загрузки</h1>*/
/*   </div>*/
/* */
/*   {% for batch in batches %}*/
/*     <div class="batch">*/
/*       <h2><a href="/batch/{{ batch.id }}">{{ batch.date }}</a> ({{ batch.count }})</h2>*/
/*       <div class="files">*/
/*         {% for file in batch.files %}*/
/*           <div class="file{% if file.ready %} ready{% else %} not_ready{% endif %}" data-id="{{ file.id }}">*/
/*             <a href="{{ file.link }}" class="preview" style="background-image: url({{ file.thumbnails.sq.link }})"></a>*/
/*             <div class="name"><a href="{{ file.link }}">{{ file.name }}</a></div>*/
/*           </div>*/
/*         {% endfor %}*/
/*       </div>*/
/*     </div>*/
/*   {% endfor %}*/
/* {% endblock %}*/
/* */
