/
home
/
obinna
/
html
/
mixchief_app
/
var
/
cache
/
prod
/
twig
/
47
/
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/items.html.twig */ class __TwigTemplate_b9a7ecd8cf90819a2818fe80c9e4b84ef347708a90659ccbe590b185783ffda4 extends Template { private $source; private $macros = []; public function __construct(Environment $env) { parent::__construct($env); $this->source = $this->getSourceContext(); $this->blocks = [ 'content' => [$this, 'block_content'], 'javascripts' => [$this, 'block_javascripts'], ]; } protected function doGetParent(array $context) { // line 1 return "base1.html.twig"; } protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; $this->parent = $this->loadTemplate("base1.html.twig", "Inventory/items.html.twig", 1); $this->parent->display($context, array_merge($this->blocks, $blocks)); } // line 3 public function block_content($context, array $blocks = []) { $macros = $this->macros; // line 4 echo "\t<div class=\"content\"> \t\t<div class=\"row\"> \t\t\t<div class=\"col-sm-12 col-md-12 col-lg-12 col-xl-7\"> \t\t\t\t<div class=\"card\"> \t\t\t\t\t<div class=\"card-header\"> \t\t\t\t\t\t<h3 class=\"pull-left\">Items</h3> \t\t\t\t\t\t<a href=\""; // line 10 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax", ["page" => "category"]); echo "\" rel=\"modal:open\" class=\"btn btn-primary pull-right\">New Category</a> \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-striped item-table\" id=\"rowSelection\"> \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>Price</th> \t\t\t\t\t\t\t\t\t<th>Category</th> \t\t\t\t\t\t\t\t\t<th>Actions</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 23 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["items"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 24 echo "\t\t\t\t\t\t\t\t\t<tr class=\"clickable-row\" data-href=\""; echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("item", ["id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 24)]), "html", null, true); echo "\" style=\"cursor: pointer;\"> \t\t\t\t\t\t\t\t\t\t<td>"; // line 25 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 25), "html", null, true); echo "</td> \t\t\t\t\t\t\t\t\t\t<td>"; // line 26 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "sellingPrice", [], "any", false, false, false, 26), "html", null, true); echo "</td> \t\t\t\t\t\t\t\t\t\t<td>"; // line 27 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "category", [], "any", false, false, false, 27), "name", [], "any", false, false, false, 27), "html", null, true); echo "</td> \t\t\t\t\t\t\t\t\t\t<td class=\"flex-big\">\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t<a data-name=\""; // line 29 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 29), "html", null, true); echo "\" class=\"btn btn-danger action-icon delete-row\" href=\""; echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("removeitem", ["id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 29)]), "html", null, true); echo "\"><i class=\"fa fa-times\"></i></a> \t\t\t\t\t\t\t\t\t\t</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 33 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-12 col-lg-5 col-md-10 col-xs-12 new-item-add\"> \t\t\t\t<div class=\"card\"> \t\t\t\t\t<div class=\"card-header\"><h5><h3>Enter New Item</h3></h5></div> \t\t\t\t\t<div class=\"card-body\"> \t\t\t\t\t\t<form action=\""; // line 42 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("registerItem"); echo "\" method=\"POST\" class=\"json-form\" enctype=\"multipart/form-data\"> \t\t\t\t\t\t\t<div class=\"items\"> \t\t\t\t\t\t\t\t<div id=\"init\" class=\"item\"> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"name[]\" class=\"form-control\" placeholder=\"Item Name\" required> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"selling[]\" class=\"form-control\" placeholder=\"Price\" required> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"description[]\" class=\"form-control\" placeholder=\"Description\"> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<select class=\"form-control ajaxSelect\" name=\"category[]\" required> \t\t\t\t\t\t\t\t\t\t\t<option value=\"\">Select Category</option> \t\t\t\t\t\t\t\t\t\t\t"; // line 57 $context['_parent'] = $context; $context['_seq'] = twig_ensure_traversable(($context["category"] ?? null)); foreach ($context['_seq'] as $context["_key"] => $context["item"]) { // line 58 echo "\t\t\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, 58), "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, 58)), "html", null, true); echo "</option> \t\t\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 60 echo "\t\t\t\t\t\t\t\t\t\t</select> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t\t<!-- image input --> \t\t\t\t\t\t\t\t\t<div class=\"form-group\"> \t\t\t\t\t\t\t\t\t\t<input type=\"file\" name=\"image[]\" class=\"form-control\"> \t\t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t"; // line 71 echo "\t\t\t\t\t\t\t"; // line 91 echo "\t\t\t\t\t\t\t<input type=\"submit\" name=\"submit\" value=\"Save\" class=\"btn btn-success save-button\"> \t\t\t\t\t\t</form> \t\t\t\t\t\t<br> \t\t\t\t\t\t"; // line 95 echo "\t\t\t\t\t\t<button type=\"button\" id=\"add-item\" class=\"btn btn-primary pull-right\">Add More</button> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t</div> \t\t</div> \t</div> "; } // line 104 public function block_javascripts($context, array $blocks = []) { $macros = $this->macros; // line 105 echo "\t"; $this->displayParentBlock("javascripts", $context, $blocks); echo " \t<script> \t\t// var block = document.getElementById('initial'); \t\t// function addItem(){ \t\t// \tvar element = document.createElement('DIV'); \t\t// \telement.className = \"row\"; \t\t// \telement.innerHTML = block.innerHTML; \t\t// \tdocument.getElementById('stockitems').appendChild(element); \t\t// } \t\t// const item_url = \""; // line 116 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("item"); echo "\"; \t\t// const itemRow = (item) => ` \t\t// \t<tr> \t\t// \t\t<td><a href=\"\${item_url}/\${item.id}\">\${item.name}</a></td> \t\t// \t\t<td>\${item.sellingPrice}</td> \t\t// \t\t<td class=\"col-sm-hidden\">\${item.category.name}</td> \t\t// \t\t<td class=\"flex-big\">\t\t\t\t\t\t\t\t\t\t\t \t\t// \t\t\t<a data-name=\"\${item.name}\" class=\"btn btn-danger action-icon delete-row\" href=\"\${item_url}/\${item.id}\"><i class=\"fa fa-times\"></i></a> \t\t// \t\t</td> \t\t// \t</tr> \t\t// `; \t\tvar deleteButton = () => ` \t\t\t<div class=\"delete-button\" style=\"text-align: right;\"> \t\t\t\t<button type=\"button\" class=\"btn btn-danger delete-new-row\"><i class=\"fa fa-times\"></i></button> \t\t\t</div> \t\t`; \t\tvar itemTemplate = (function(){ \t\t\tvar item = document.getElementById('init').innerHTML; \t\t\treturn function(){ \t\t\t\tvar cover = document.createElement('DIV'); \t\t\t\tcover.className = 'item added'; \t\t\t\t// cover.innerHTML = '<hr>'; \t\t\t\tcover.innerHTML = item; \t\t\t\tcover.innerHTML += deleteButton(); \t\t\t\treturn cover; \t\t\t} \t\t}) \t\tvar cover = itemTemplate(); \t\t\$('#add-item').on('click', function(e){ \t\t\te.preventDefault(); \t\t\t// \$('.delete-new-row').hide(); \t\t\t\$('.items').append(cover()); \t\t\t\$('.ajaxSelect').select2(); \t\t\t// \$( \".item-name\" ).autocomplete({ \t\t\t// source: options \t\t\t// }); \t\t}); \t\t\$('.items').on('click', '.delete-new-row', function(e){ \t\t\te.preventDefault(); \t\t\tvar \$target = \$(e.currentTarget); \t\t\t\$target.closest('.added').fadeOut(300, function(){ \t\t\t\t\$(this).remove(); \t\t\t}) \t\t}); \t</script> \t"; } public function getTemplateName() { return "Inventory/items.html.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 200 => 116, 185 => 105, 181 => 104, 170 => 95, 165 => 91, 163 => 71, 153 => 60, 142 => 58, 138 => 57, 120 => 42, 109 => 33, 97 => 29, 92 => 27, 88 => 26, 84 => 25, 79 => 24, 75 => 23, 59 => 10, 51 => 4, 47 => 3, 36 => 1,); } public function getSourceContext() { return new Source("", "Inventory/items.html.twig", "/var/www/html/mixchief_app/templates/Inventory/items.html.twig"); } }