/
home
/
obinna
/
html
/
mixchief_app
/
var
/
cache
/
dev
/
twig
/
f3
/
Upload File
HOME
<?php use Twig\Environment; use Twig\Error\LoaderError; use Twig\Error\RuntimeError; use Twig\Extension\SandboxExtension; use Twig\Markup; use Twig\Sandbox\SecurityError; use Twig\Sandbox\SecurityNotAllowedTagError; use Twig\Sandbox\SecurityNotAllowedFilterError; use Twig\Sandbox\SecurityNotAllowedFunctionError; use Twig\Source; use Twig\Template; /* Inventory/category.html.twig */ class __TwigTemplate_3260ef9b0df78209ccef30df557b89320197cebf07bf7ba25c0c144cc64d2214 extends Template { private $source; private $macros = []; public function __construct(Environment $env) { parent::__construct($env); $this->source = $this->getSourceContext(); $this->blocks = [ 'content' => [$this, 'block_content'], ]; } protected function doGetParent(array $context) { // line 1 return "base1.html.twig"; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"]; $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Inventory/category.html.twig")); $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"]; $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Inventory/category.html.twig")); $this->parent = $this->loadTemplate("base1.html.twig", "Inventory/category.html.twig", 1); $this->parent->display($context, array_merge($this->blocks, $blocks)); $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof); $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof); } // line 3 public function block_content($context, array $blocks = []) { $macros = $this->macros; $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"]; $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content")); $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"]; $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content")); // line 4 echo "\t<div class=\"content\"> \t\t<div class=\"row\"> \t\t\t<div class=\"col-sm-6\"> \t\t\t\t<div class=\"card\"> \t\t\t\t\t<div class=\"card-header\"> \t\t\t\t\t\t<h3>Categories</h3> \t\t\t\t\t</div> \t\t\t\t\t<div class=\"card-body\"> \t\t\t\t\t\t<table class=\"table table-default\"> \t\t\t\t\t\t\t<thead> \t\t\t\t\t\t\t\t<tr> \t\t\t\t\t\t\t\t\t<th>Name</th> \t\t\t\t\t\t\t\t\t<th>Group</th> \t\t\t\t\t\t\t\t\t<th>Action</th> \t\t\t\t\t\t\t\t</tr> \t\t\t\t\t\t\t</thead> \t\t\t\t\t\t\t<tbody> \t\t\t\t\t\t\t\t"; // line 21 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 21, $this->source); })())); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 22 echo "\t\t\t\t\t\t\t\t\t<tr> \t\t\t\t\t\t\t\t\t\t<td><a href=\""; // line 23 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("category", ["id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 23)]), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 23), "html", null, true); echo "</a></td> \t\t\t\t\t\t\t\t\t\t<td>"; // line 24 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "groups", [], "any", false, false, false, 24), "html", null, true); echo "</td> \t\t\t\t\t\t\t\t\t\t<td><a class=\"btn btn-danger\" href=\""; // line 25 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("delete", ["query" => "Category", "id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 25)]), "html", null, true); echo "\">Delete</a></td> \t\t\t\t\t\t\t\t\t</tr> \t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 28 echo "\t\t\t\t\t\t\t</tbody> \t\t\t\t\t\t</table> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t</div> \t\t\t<div class=\"col-sm-6\"> \t\t\t\t<div class=\"card\"> \t\t\t\t\t<div class=\"card-header\"><h5>"; // line 35 if ((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 35, $this->source); })())) { echo "Edit"; } else { echo "Add"; } echo " Category</h5></div> \t\t\t\t\t<div class=\"card-body\"> \t\t\t\t\t\t<form action=\""; // line 37 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("category"); echo "\" method=\"POST\" name=\"edit\"> \t\t\t\t\t\t\t"; // line 38 if ((isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 38, $this->source); })())) { echo "<input type=\"hidden\" name=\"edit\" value=\""; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 38, $this->source); })()), "id", [], "any", false, false, false, 38), "html", null, true); echo "\">"; } // line 39 echo "\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t<input type=\"text\" name=\"name\" class=\"form-control\" placeholder=\"Category Name\" value=\""; // line 40 echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["category"] ?? null), "name", [], "any", true, true, false, 40)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["category"] ?? null), "name", [], "any", false, false, false, 40), "")) : ("")), "html", null, true); echo "\"> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t<select class=\"form-control\" name=\"group\"> \t\t\t\t\t\t\t\t\t<option value=\"-1\">Select Group</option> \t\t\t\t\t\t\t\t\t"; // line 45 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable((isset($context["group"]) || array_key_exists("group", $context) ? $context["group"] : (function () { throw new RuntimeError('Variable "group" does not exist.', 45, $this->source); })())); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 46 echo "\t\t\t\t\t\t\t\t\t\t<option value=\""; echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 46), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 46)), "html", null, true); echo "</option> \t\t\t\t\t\t\t\t\t"; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 48 echo "\t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"Save\" class=\"btn btn-primary\"> \t\t\t\t\t\t</form> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t</div> \t\t</div> \t</div> \t<script> \t\tvar group = \""; // line 59 echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["category"] ?? null), "gId", [], "any", true, true, false, 59)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["category"] ?? null), "gId", [], "any", false, false, false, 59), "")) : ("")), "html", null, true); echo "\"; \t\tif(group) { \t\t\tdocument.forms.edit.group.value = group; \t\t} \t</script> "; $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof); $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof); } public function getTemplateName() { return "Inventory/category.html.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 180 => 59, 167 => 48, 156 => 46, 152 => 45, 144 => 40, 141 => 39, 135 => 38, 131 => 37, 122 => 35, 113 => 28, 104 => 25, 100 => 24, 94 => 23, 91 => 22, 87 => 21, 68 => 4, 58 => 3, 35 => 1,); } public function getSourceContext() { return new Source("{% extends 'base1.html.twig' %} {% block content %} \t<div class=\"content\"> \t\t<div class=\"row\"> \t\t\t<div class=\"col-sm-6\"> \t\t\t\t<div class=\"card\"> \t\t\t\t\t<div class=\"card-header\"> \t\t\t\t\t\t<h3>Categories</h3> \t\t\t\t\t</div> \t\t\t\t\t<div class=\"card-body\"> \t\t\t\t\t\t<table class=\"table table-default\"> \t\t\t\t\t\t\t<thead> \t\t\t\t\t\t\t\t<tr> \t\t\t\t\t\t\t\t\t<th>Name</th> \t\t\t\t\t\t\t\t\t<th>Group</th> \t\t\t\t\t\t\t\t\t<th>Action</th> \t\t\t\t\t\t\t\t</tr> \t\t\t\t\t\t\t</thead> \t\t\t\t\t\t\t<tbody> \t\t\t\t\t\t\t\t{% for item in categories %} \t\t\t\t\t\t\t\t\t<tr> \t\t\t\t\t\t\t\t\t\t<td><a href=\"{{ path('category', {'id': item.id }) }}\">{{ item.name }}</a></td> \t\t\t\t\t\t\t\t\t\t<td>{{ item.groups }}</td> \t\t\t\t\t\t\t\t\t\t<td><a class=\"btn btn-danger\" href=\"{{ path('delete', {'query': 'Category', 'id': item.id }) }}\">Delete</a></td> \t\t\t\t\t\t\t\t\t</tr> \t\t\t\t\t\t\t\t{% endfor %} \t\t\t\t\t\t\t</tbody> \t\t\t\t\t\t</table> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t</div> \t\t\t<div class=\"col-sm-6\"> \t\t\t\t<div class=\"card\"> \t\t\t\t\t<div class=\"card-header\"><h5>{% if category %}Edit{% else %}Add{% endif %} Category</h5></div> \t\t\t\t\t<div class=\"card-body\"> \t\t\t\t\t\t<form action=\"{{ path('category') }}\" method=\"POST\" name=\"edit\"> \t\t\t\t\t\t\t{% if category %}<input type=\"hidden\" name=\"edit\" value=\"{{ category.id }}\">{% endif %} \t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t<input type=\"text\" name=\"name\" class=\"form-control\" placeholder=\"Category Name\" value=\"{{ category.name|default('') }}\"> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t<select class=\"form-control\" name=\"group\"> \t\t\t\t\t\t\t\t\t<option value=\"-1\">Select Group</option> \t\t\t\t\t\t\t\t\t{% for item in group %} \t\t\t\t\t\t\t\t\t\t<option value=\"{{ item.id }}\">{{ item.name|upper }}</option> \t\t\t\t\t\t\t\t\t{% endfor %} \t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"Save\" class=\"btn btn-primary\"> \t\t\t\t\t\t</form> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t</div> \t\t</div> \t</div> \t<script> \t\tvar group = \"{{ category.gId|default('') }}\"; \t\tif(group) { \t\t\tdocument.forms.edit.group.value = group; \t\t} \t</script> {% endblock %}", "Inventory/category.html.twig", "/var/www/html/mixchief_app/templates/Inventory/category.html.twig"); } }