<?php

/* DorcasTabithaBundle:Notes:noteloop.html.twig */
class __TwigTemplate_2fd3b411e7b270f67e1daa1ca9850fa6 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "
";
        // line 2
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable($this->getContext($context, "notes"));
        $context['_iterated'] = false;
        $context['loop'] = array(
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        );
        if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["_key"] => $context["note"]) {
            // line 3
            echo "    <article class=\"note ";
            echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), $this->getAttribute($this->getContext($context, "loop"), "index0")), "html", null, true);
            echo "\" id=\"note-";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "note"), "noteid"), "html", null, true);
            echo "\">
        <p>Entered By: ";
            // line 4
            echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "note"), "user"), "html", null, true);
            echo " Date: ";
            echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($this->getContext($context, "note"), "createddt"), "m/d/Y"), "html", null, true);
            echo "
        <br />

        <div style=\"border:2px solid #ccc; width:815px; background-color: white; \" > 
            ";
            // line 8
            echo $this->env->getExtension('actions')->renderAction("DorcasTabithaBundle:Notes:message", array("message" => $this->getAttribute($this->getContext($context, "note"), "note")), array());
            // line 9
            echo "        </div>

        <div style=\" position:relative; bottom:45px; left:850px;\">
            ";
            // line 12
            if ($this->env->getExtension('security')->isGranted("ROLE_ADMIN")) {
                // line 13
                echo "                    ";
                $context["urlpath"] = $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_note_update", array("note_id" => $this->getAttribute($this->getContext($context, "note"), "noteid")));
                // line 14
                echo "                    <input type=\"button\" value=\"Edit\" onclick=\"window.open(' ";
                echo twig_escape_filter($this->env, $this->getContext($context, "urlpath"), "html", null, true);
                echo " ','','width=880,height=370')\" />

                ";
            } elseif (($this->getAttribute($this->getContext($context, "note"), "user") == $this->getAttribute($this->getAttribute($this->getContext($context, "app"), "user"), "username"))) {
                // line 17
                echo "                    ";
                $context["urlpath"] = $this->env->getExtension('routing')->getPath("DorcasTabithaBundle_note_update", array("note_id" => $this->getAttribute($this->getContext($context, "note"), "noteid")));
                // line 18
                echo "                    <input type=\"button\" value=\"Edit\" onclick=\"window.open(' ";
                echo twig_escape_filter($this->env, $this->getContext($context, "urlpath"), "html", null, true);
                echo " ','','width=880,height=370')\" />
            ";
            }
            // line 20
            echo "        </div>
    </article>
";
            $context['_iterated'] = true;
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['length'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        if (!$context['_iterated']) {
            // line 23
            echo "    <p>There are no notes for this client. </p>
";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['note'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
    }

    public function getTemplateName()
    {
        return "DorcasTabithaBundle:Notes:noteloop.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  97 => 23,  82 => 20,  76 => 18,  73 => 17,  66 => 14,  63 => 13,  61 => 12,  56 => 9,  54 => 8,  45 => 4,  38 => 3,  20 => 2,  17 => 1,);
    }
}
