var/cache/dev/twig/5a/5a704c59e33a4c7c3214f19c1ceb35b7cb4167f3a6c266277505352d74c00f73.php line 53

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* index/menu_show.html.twig */
  14. class __TwigTemplate_95f4f6c6fc75b7ea226a2b0ff751ada99406234e68dfe26a09f617fc142cc930 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'page_name' => [$this'block_page_name'],
  24.             'title' => [$this'block_title'],
  25.             'header_title' => [$this'block_header_title'],
  26.             'stylesheet' => [$this'block_stylesheet'],
  27.             'main' => [$this'block_main'],
  28.             'js' => [$this'block_js'],
  29.         ];
  30.     }
  31.     protected function doGetParent(array $context)
  32.     {
  33.         // line 1
  34.         return "index/layout.html.twig";
  35.     }
  36.     protected function doDisplay(array $context, array $blocks = [])
  37.     {
  38.         $macros $this->macros;
  39.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""index/menu_show.html.twig"));
  41.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""index/menu_show.html.twig"));
  43.         $this->parent $this->loadTemplate("index/layout.html.twig""index/menu_show.html.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  47.         
  48.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  49.     }
  50.     // line 3
  51.     public function block_page_name($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_name"));
  56.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_name"));
  58.         echo "menu_detail";
  59.         
  60.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  61.         
  62.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  63.     }
  64.     // line 5
  65.     public function block_title($context, array $blocks = [])
  66.     {
  67.         $macros $this->macros;
  68.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  69.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  70.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  71.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  72.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'5$this->source); })()), "name", [], "any"falsefalsefalse5), "html"nulltrue);
  73.         echo "|";
  74.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["shop"]) || array_key_exists("shop"$context) ? $context["shop"] : (function () { throw new RuntimeError('Variable "shop" does not exist.'5$this->source); })()), "name", [], "any"falsefalsefalse5), "html"nulltrue);
  75.         
  76.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  77.         
  78.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  79.     }
  80.     // line 6
  81.     public function block_header_title($context, array $blocks = [])
  82.     {
  83.         $macros $this->macros;
  84.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  85.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header_title"));
  86.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  87.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header_title"));
  88.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'6$this->source); })()), "name", [], "any"falsefalsefalse6), "html"nulltrue);
  89.         
  90.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  91.         
  92.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  93.     }
  94.     // line 8
  95.     public function block_stylesheet($context, array $blocks = [])
  96.     {
  97.         $macros $this->macros;
  98.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  99.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  100.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  101.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  102.         // line 9
  103.         echo "  <link rel=\"stylesheet\" href=\"/css/detail.css\">
  104.   <style>
  105.       [v-cloak] {
  106.           display: none;
  107.       }
  108.   </style>
  109. ";
  110.         
  111.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  112.         
  113.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  114.     }
  115.     // line 17
  116.     public function block_main($context, array $blocks = [])
  117.     {
  118.         $macros $this->macros;
  119.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  120.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  121.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  122.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  123.         // line 18
  124.         echo "  <main class=\"pd0 v-element\">
  125. ";
  126.         // line 35
  127.         echo "
  128.     <section class=\"add_cart_wr\">
  129.         <img src=\"";
  130.         // line 37
  131.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'37$this->source); })()), "image", [], "any"falsefalsefalse37), "html"nulltrue);
  132.         echo "\" class=\"shop_img\" alt=\"";
  133.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'37$this->source); })()), "name", [], "any"falsefalsefalse37), "html"nulltrue);
  134.         echo "\">
  135.         <h2 class=\"title\">";
  136.         // line 38
  137.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'38$this->source); })()), "name", [], "any"falsefalsefalse38), "html"nulltrue);
  138.         echo "</h2>
  139.         <p class=\"text\">";
  140.         // line 39
  141.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'39$this->source); })()), "description", [], "any"falsefalsefalse39), "html"nulltrue);
  142.         echo "</p>
  143.         <p class=\"indication\">提供目安時間 : <span>";
  144.         // line 40
  145.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["menu"] ?? null), "minutes", [], "any"truetruefalse40)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["menu"] ?? null), "minutes", [], "any"falsefalsefalse40), "-")) : ("-")), "html"nulltrue);
  146.         echo "分</span></p>
  147.       ";
  148.         // line 42
  149.         if ((=== twig_compare(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'42$this->source); })()), "shop", [], "any"falsefalsefalse42), "shopPlan", [], "any"falsefalsefalse42), "slug", [], "any"falsefalsefalse42), twig_constant("App\\Entity\\ShopPlan::SLUG_PAID")))) {
  150.             // line 43
  151.             echo "        <div class=\"add_cart_area\">
  152.             <form action=\"";
  153.             // line 44
  154.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cart_add", ["menu" => twig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'44$this->source); })()), "id", [], "any"falsefalsefalse44)]), "html"nulltrue);
  155.             echo "\" method=\"post\" v-cloak>
  156.               <input type=\"hidden\" name=\"token\" value=\"";
  157.             // line 45
  158.             echo twig_escape_filter($this->env$this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("add-item"), "html"nulltrue);
  159.             echo "\"/>
  160. ";
  161.             // line 47
  162.             echo "              <input type=\"hidden\" name=\"cart_add_item[quantity]\" :value=\"amount\">
  163.                 <div class=\"add_control\">
  164.                   ";
  165.             // line 49
  166.             if (twig_get_attribute($this->env$this->source, (isset($context["shop"]) || array_key_exists("shop"$context) ? $context["shop"] : (function () { throw new RuntimeError('Variable "shop" does not exist.'49$this->source); })()), "acceptable", [], "any"falsefalsefalse49)) {
  167.                 // line 50
  168.                 echo "                    <button class=\"add_button\" type=\"button\" @click=\"increment\" :disabled=\"! canIncrement\">+</button>
  169.                     <div class=\"num\">[[ amount ]]</div>
  170.                     <button class=\"delete_button\" type=\"button\" @click=\"decrement\" :disabled=\"! canDecrement\">ー</button>
  171.                   ";
  172.             }
  173.             // line 54
  174.             echo "                </div>
  175.               ";
  176.             // line 55
  177.             if (twig_get_attribute($this->env$this->source, (isset($context["shop"]) || array_key_exists("shop"$context) ? $context["shop"] : (function () { throw new RuntimeError('Variable "shop" does not exist.'55$this->source); })()), "acceptable", [], "any"falsefalsefalse55)) {
  178.                 // line 56
  179.                 echo "                <button type=\"submit\" name=\"submit\" class=\"button\">[[ amount ]]つカートに入れる &yen;[[ numberFormat(subtotal) ]]</button>
  180.               ";
  181.             } else {
  182.                 // line 58
  183.                 echo "                <span class=\"button tel out-of-service\">受付時間外です</span>
  184.               ";
  185.             }
  186.             // line 60
  187.             echo "            </form>
  188.         </div>
  189.       ";
  190.         }
  191.         // line 63
  192.         echo "    </section>
  193.   </main>
  194. ";
  195.         
  196.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  197.         
  198.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  199.     }
  200.     // line 67
  201.     public function block_js($context, array $blocks = [])
  202.     {
  203.         $macros $this->macros;
  204.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  205.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""js"));
  206.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  207.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""js"));
  208.         // line 68
  209.         echo "<script>
  210.     ";
  211.         // line 69
  212.         echo twig_include($this->env$context"components/common-js.html.twig");
  213.         echo "
  214.     var vApp = new Vue({
  215.         el: '.v-element',
  216.         delimiters: ['[[', ']]'],
  217.         data: function () {
  218.             return {
  219.                 amount: 1,
  220.                 unitPrice: ";
  221.         // line 77
  222.         if ( !(twig_get_attribute($this->env$this->source, (isset($context["menu"]) || array_key_exists("menu"$context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.'77$this->source); })()), "discountedPrice", [], "any"falsefalsefalse77) === null)) {
  223.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["menu"] ?? null), "discountedPrice", [], "any"truetruefalse77)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["menu"] ?? null), "discountedPrice", [], "any"falsefalsefalse77), 0)) : (0)), "html"nulltrue);
  224.         } else {
  225.             echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["menu"] ?? null), "price", [], "any"truetruefalse77)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["menu"] ?? null), "price", [], "any"falsefalsefalse77), 0)) : (0)), "html"nulltrue);
  226.         }
  227.         echo ",
  228.             };
  229.         },
  230.         computed: {
  231.             canIncrement: function () {
  232.                 return (this.amount < 99);
  233.             },
  234.             canDecrement: function () {
  235.                 return (this.amount > 1);
  236.             },
  237.             subtotal: function () {
  238.                 return this.unitPrice * this.amount;
  239.             },
  240.         },
  241.         methods: {
  242.             numberFormat: function (value) {
  243.                 return _numberFormat(value);
  244.             },
  245.             increment: function () {
  246.                 if (this.canIncrement) {
  247.                     ++this.amount;
  248.                 }
  249.             },
  250.             decrement: function () {
  251.                 if (this.canDecrement) {
  252.                     --this.amount;
  253.                 }
  254.             },
  255.         },
  256.     });
  257. </script>
  258. ";
  259.         
  260.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  261.         
  262.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  263.     }
  264.     public function getTemplateName()
  265.     {
  266.         return "index/menu_show.html.twig";
  267.     }
  268.     public function isTraitable()
  269.     {
  270.         return false;
  271.     }
  272.     public function getDebugInfo()
  273.     {
  274.         return array (  263 => 77,  252 => 69,  249 => 68,  239 => 67,  227 => 63,  222 => 60,  218 => 58,  214 => 56,  212 => 55,  209 => 54,  203 => 50,  201 => 49,  197 => 47,  193 => 45,  189 => 44,  186 => 43,  184 => 42,  179 => 40,  175 => 39,  171 => 38,  165 => 37,  161 => 35,  158 => 18,  148 => 17,  132 => 9,  122 => 8,  103 => 6,  82 => 5,  63 => 3,  40 => 1,);
  275.     }
  276.     public function getSourceContext()
  277.     {
  278.         return new Source("{% extends 'index/layout.html.twig' %}
  279. {% block page_name %}menu_detail{% endblock %}
  280. {% block title %}{{ menu.name }}|{{ shop.name }}{% endblock %}
  281. {% block header_title %}{{ menu.name }}{% endblock %}
  282. {% block stylesheet %}
  283.   <link rel=\"stylesheet\" href=\"/css/detail.css\">
  284.   <style>
  285.       [v-cloak] {
  286.           display: none;
  287.       }
  288.   </style>
  289. {% endblock %}
  290. {% block main %}
  291.   <main class=\"pd0 v-element\">
  292. {#    <section class=\"details_wr\">#}
  293. {#      <h1>{{ shop.name }}</h1>#}
  294. {#      <h2>{{ shop.categories|join(' / ') }}</h2>#}
  295. {#      <ul class=\"provide\">#}
  296. {#        {% if shop.toGo %}<li>テイクアウト</li>{% endif %}#}
  297. {#        {% if shop.delivery %}<li>デリバリー</li>{% endif %}#}
  298. {#      </ul>#}
  299. {#      <ul class=\"time\">#}
  300. {#        <li class=\"indication\">提供時間目安 <span>{{ shop.estimatedMinutes|default('-') }}分</span></li>#}
  301. {#        <li class=\"start\">{{ shop.hourFrom|date('H:i') }}〜{{ shop.hourTo|date('H:i') }}受付可</li>#}
  302. {#      </ul>#}
  303. {#      <div class=\"add\">〒{{ shop.zipcode }} {{ shop.address }}</div>#}
  304. {#      #}{#<div class=\"map\">#}
  305. {#      #}{#<div id=\"map-container\" style=\"height: 150px;width: 100%;\"></div>#}
  306. {#      #}{#</div>#}
  307. {#    </section>#}
  308.     <section class=\"add_cart_wr\">
  309.         <img src=\"{{ menu.image }}\" class=\"shop_img\" alt=\"{{ menu.name }}\">
  310.         <h2 class=\"title\">{{ menu.name }}</h2>
  311.         <p class=\"text\">{{ menu.description }}</p>
  312.         <p class=\"indication\">提供目安時間 : <span>{{ menu.minutes|default('-') }}分</span></p>
  313.       {% if menu.shop.shopPlan.slug == constant('App\\\\Entity\\\\ShopPlan::SLUG_PAID') %}
  314.         <div class=\"add_cart_area\">
  315.             <form action=\"{{ path('cart_add', {menu: menu.id}) }}\" method=\"post\" v-cloak>
  316.               <input type=\"hidden\" name=\"token\" value=\"{{ csrf_token('add-item') }}\"/>
  317. {#                <input type=\"hidden\" name=\"form[cart][menu]\" :value=\"{{ menu.id }}\">#}
  318.               <input type=\"hidden\" name=\"cart_add_item[quantity]\" :value=\"amount\">
  319.                 <div class=\"add_control\">
  320.                   {% if shop.acceptable %}
  321.                     <button class=\"add_button\" type=\"button\" @click=\"increment\" :disabled=\"! canIncrement\">+</button>
  322.                     <div class=\"num\">[[ amount ]]</div>
  323.                     <button class=\"delete_button\" type=\"button\" @click=\"decrement\" :disabled=\"! canDecrement\">ー</button>
  324.                   {% endif %}
  325.                 </div>
  326.               {% if shop.acceptable %}
  327.                 <button type=\"submit\" name=\"submit\" class=\"button\">[[ amount ]]つカートに入れる &yen;[[ numberFormat(subtotal) ]]</button>
  328.               {% else %}
  329.                 <span class=\"button tel out-of-service\">受付時間外です</span>
  330.               {% endif %}
  331.             </form>
  332.         </div>
  333.       {% endif %}
  334.     </section>
  335.   </main>
  336. {% endblock %}
  337. {% block js %}
  338. <script>
  339.     {{ include('components/common-js.html.twig') }}
  340.     var vApp = new Vue({
  341.         el: '.v-element',
  342.         delimiters: ['[[', ']]'],
  343.         data: function () {
  344.             return {
  345.                 amount: 1,
  346.                 unitPrice: {% if menu.discountedPrice is not same as null %}{{ menu.discountedPrice | default(0) }}{% else %}{{ menu.price | default(0) }}{% endif %},
  347.             };
  348.         },
  349.         computed: {
  350.             canIncrement: function () {
  351.                 return (this.amount < 99);
  352.             },
  353.             canDecrement: function () {
  354.                 return (this.amount > 1);
  355.             },
  356.             subtotal: function () {
  357.                 return this.unitPrice * this.amount;
  358.             },
  359.         },
  360.         methods: {
  361.             numberFormat: function (value) {
  362.                 return _numberFormat(value);
  363.             },
  364.             increment: function () {
  365.                 if (this.canIncrement) {
  366.                     ++this.amount;
  367.                 }
  368.             },
  369.             decrement: function () {
  370.                 if (this.canDecrement) {
  371.                     --this.amount;
  372.                 }
  373.             },
  374.         },
  375.     });
  376. </script>
  377. {% endblock %}
  378. ""index/menu_show.html.twig""/home/webapp/www/test.uchideri.com/templates/index/menu_show.html.twig");
  379.     }
  380. }