<?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;
/* index/menu_show.html.twig */
class __TwigTemplate_95f4f6c6fc75b7ea226a2b0ff751ada99406234e68dfe26a09f617fc142cc930 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'page_name' => [$this, 'block_page_name'],
'title' => [$this, 'block_title'],
'header_title' => [$this, 'block_header_title'],
'stylesheet' => [$this, 'block_stylesheet'],
'main' => [$this, 'block_main'],
'js' => [$this, 'block_js'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "index/layout.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", "index/menu_show.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "index/menu_show.html.twig"));
$this->parent = $this->loadTemplate("index/layout.html.twig", "index/menu_show.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_page_name($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", "page_name"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_name"));
echo "menu_detail";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_title($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", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo twig_escape_filter($this->env, 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.', 5, $this->source); })()), "name", [], "any", false, false, false, 5), "html", null, true);
echo "|";
echo twig_escape_filter($this->env, 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.', 5, $this->source); })()), "name", [], "any", false, false, false, 5), "html", null, true);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 6
public function block_header_title($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", "header_title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "header_title"));
echo twig_escape_filter($this->env, 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.', 6, $this->source); })()), "name", [], "any", false, false, false, 6), "html", null, true);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 8
public function block_stylesheet($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", "stylesheet"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 9
echo " <link rel=\"stylesheet\" href=\"/css/detail.css\">
<style>
[v-cloak] {
display: none;
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 17
public function block_main($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", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 18
echo " <main class=\"pd0 v-element\">
";
// line 35
echo "
<section class=\"add_cart_wr\">
<img src=\"";
// line 37
echo twig_escape_filter($this->env, 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.', 37, $this->source); })()), "image", [], "any", false, false, false, 37), "html", null, true);
echo "\" class=\"shop_img\" alt=\"";
echo twig_escape_filter($this->env, 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.', 37, $this->source); })()), "name", [], "any", false, false, false, 37), "html", null, true);
echo "\">
<h2 class=\"title\">";
// line 38
echo twig_escape_filter($this->env, 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.', 38, $this->source); })()), "name", [], "any", false, false, false, 38), "html", null, true);
echo "</h2>
<p class=\"text\">";
// line 39
echo twig_escape_filter($this->env, 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.', 39, $this->source); })()), "description", [], "any", false, false, false, 39), "html", null, true);
echo "</p>
<p class=\"indication\">提供目安時間 : <span>";
// line 40
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["menu"] ?? null), "minutes", [], "any", true, true, false, 40)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["menu"] ?? null), "minutes", [], "any", false, false, false, 40), "-")) : ("-")), "html", null, true);
echo "分</span></p>
";
// line 42
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, 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.', 42, $this->source); })()), "shop", [], "any", false, false, false, 42), "shopPlan", [], "any", false, false, false, 42), "slug", [], "any", false, false, false, 42), twig_constant("App\\Entity\\ShopPlan::SLUG_PAID")))) {
// line 43
echo " <div class=\"add_cart_area\">
<form action=\"";
// line 44
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", false, false, false, 44)]), "html", null, true);
echo "\" method=\"post\" v-cloak>
<input type=\"hidden\" name=\"token\" value=\"";
// line 45
echo twig_escape_filter($this->env, $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderCsrfToken("add-item"), "html", null, true);
echo "\"/>
";
// line 47
echo " <input type=\"hidden\" name=\"cart_add_item[quantity]\" :value=\"amount\">
<div class=\"add_control\">
";
// line 49
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", false, false, false, 49)) {
// line 50
echo " <button class=\"add_button\" type=\"button\" @click=\"increment\" :disabled=\"! canIncrement\">+</button>
<div class=\"num\">[[ amount ]]</div>
<button class=\"delete_button\" type=\"button\" @click=\"decrement\" :disabled=\"! canDecrement\">ー</button>
";
}
// line 54
echo " </div>
";
// line 55
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", false, false, false, 55)) {
// line 56
echo " <button type=\"submit\" name=\"submit\" class=\"button\">[[ amount ]]つカートに入れる ¥[[ numberFormat(subtotal) ]]</button>
";
} else {
// line 58
echo " <span class=\"button tel out-of-service\">受付時間外です</span>
";
}
// line 60
echo " </form>
</div>
";
}
// line 63
echo " </section>
</main>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 67
public function block_js($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", "js"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));
// line 68
echo "<script>
";
// line 69
echo twig_include($this->env, $context, "components/common-js.html.twig");
echo "
var vApp = new Vue({
el: '.v-element',
delimiters: ['[[', ']]'],
data: function () {
return {
amount: 1,
unitPrice: ";
// line 77
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", false, false, false, 77) === null)) {
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["menu"] ?? null), "discountedPrice", [], "any", true, true, false, 77)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["menu"] ?? null), "discountedPrice", [], "any", false, false, false, 77), 0)) : (0)), "html", null, true);
} else {
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["menu"] ?? null), "price", [], "any", true, true, false, 77)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["menu"] ?? null), "price", [], "any", false, false, false, 77), 0)) : (0)), "html", null, true);
}
echo ",
};
},
computed: {
canIncrement: function () {
return (this.amount < 99);
},
canDecrement: function () {
return (this.amount > 1);
},
subtotal: function () {
return this.unitPrice * this.amount;
},
},
methods: {
numberFormat: function (value) {
return _numberFormat(value);
},
increment: function () {
if (this.canIncrement) {
++this.amount;
}
},
decrement: function () {
if (this.canDecrement) {
--this.amount;
}
},
},
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "index/menu_show.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'index/layout.html.twig' %}
{% block page_name %}menu_detail{% endblock %}
{% block title %}{{ menu.name }}|{{ shop.name }}{% endblock %}
{% block header_title %}{{ menu.name }}{% endblock %}
{% block stylesheet %}
<link rel=\"stylesheet\" href=\"/css/detail.css\">
<style>
[v-cloak] {
display: none;
}
</style>
{% endblock %}
{% block main %}
<main class=\"pd0 v-element\">
{# <section class=\"details_wr\">#}
{# <h1>{{ shop.name }}</h1>#}
{# <h2>{{ shop.categories|join(' / ') }}</h2>#}
{# <ul class=\"provide\">#}
{# {% if shop.toGo %}<li>テイクアウト</li>{% endif %}#}
{# {% if shop.delivery %}<li>デリバリー</li>{% endif %}#}
{# </ul>#}
{# <ul class=\"time\">#}
{# <li class=\"indication\">提供時間目安 <span>{{ shop.estimatedMinutes|default('-') }}分</span></li>#}
{# <li class=\"start\">{{ shop.hourFrom|date('H:i') }}〜{{ shop.hourTo|date('H:i') }}受付可</li>#}
{# </ul>#}
{# <div class=\"add\">〒{{ shop.zipcode }} {{ shop.address }}</div>#}
{# #}{#<div class=\"map\">#}
{# #}{#<div id=\"map-container\" style=\"height: 150px;width: 100%;\"></div>#}
{# #}{#</div>#}
{# </section>#}
<section class=\"add_cart_wr\">
<img src=\"{{ menu.image }}\" class=\"shop_img\" alt=\"{{ menu.name }}\">
<h2 class=\"title\">{{ menu.name }}</h2>
<p class=\"text\">{{ menu.description }}</p>
<p class=\"indication\">提供目安時間 : <span>{{ menu.minutes|default('-') }}分</span></p>
{% if menu.shop.shopPlan.slug == constant('App\\\\Entity\\\\ShopPlan::SLUG_PAID') %}
<div class=\"add_cart_area\">
<form action=\"{{ path('cart_add', {menu: menu.id}) }}\" method=\"post\" v-cloak>
<input type=\"hidden\" name=\"token\" value=\"{{ csrf_token('add-item') }}\"/>
{# <input type=\"hidden\" name=\"form[cart][menu]\" :value=\"{{ menu.id }}\">#}
<input type=\"hidden\" name=\"cart_add_item[quantity]\" :value=\"amount\">
<div class=\"add_control\">
{% if shop.acceptable %}
<button class=\"add_button\" type=\"button\" @click=\"increment\" :disabled=\"! canIncrement\">+</button>
<div class=\"num\">[[ amount ]]</div>
<button class=\"delete_button\" type=\"button\" @click=\"decrement\" :disabled=\"! canDecrement\">ー</button>
{% endif %}
</div>
{% if shop.acceptable %}
<button type=\"submit\" name=\"submit\" class=\"button\">[[ amount ]]つカートに入れる ¥[[ numberFormat(subtotal) ]]</button>
{% else %}
<span class=\"button tel out-of-service\">受付時間外です</span>
{% endif %}
</form>
</div>
{% endif %}
</section>
</main>
{% endblock %}
{% block js %}
<script>
{{ include('components/common-js.html.twig') }}
var vApp = new Vue({
el: '.v-element',
delimiters: ['[[', ']]'],
data: function () {
return {
amount: 1,
unitPrice: {% if menu.discountedPrice is not same as null %}{{ menu.discountedPrice | default(0) }}{% else %}{{ menu.price | default(0) }}{% endif %},
};
},
computed: {
canIncrement: function () {
return (this.amount < 99);
},
canDecrement: function () {
return (this.amount > 1);
},
subtotal: function () {
return this.unitPrice * this.amount;
},
},
methods: {
numberFormat: function (value) {
return _numberFormat(value);
},
increment: function () {
if (this.canIncrement) {
++this.amount;
}
},
decrement: function () {
if (this.canDecrement) {
--this.amount;
}
},
},
});
</script>
{% endblock %}
", "index/menu_show.html.twig", "/home/webapp/www/test.uchideri.com/templates/index/menu_show.html.twig");
}
}