<?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;
/* Review/index.twig */
class __TwigTemplate_c307a64956ebdf94d5768bda3a1c722a extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'javascript' => [$this, 'block_javascript'],
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 11
return "default_frame.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Review/index.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Review/index.twig"));
// line 13
$context["body_class"] = "review_page";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "Review/index.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 15
public function block_stylesheet($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 16
echo " <link rel=\"stylesheet\" href=\"/stylesheets/review.css?20220924\">
<link rel=\"stylesheet\" href=\"/stylesheets/pagination.css?20211225\">
<style>
nav {
min-height: auto;
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 25
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 28
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 29
echo "
";
// line 31
if ( !twig_test_empty((isset($context["kataban"]) || array_key_exists("kataban", $context) ? $context["kataban"] : (function () { throw new RuntimeError('Variable "kataban" does not exist.', 31, $this->source); })()))) {
// line 32
echo " <div id=\"navigation\" class=\"nav-float\"></div>
<div>
<img src=\"";
// line 34
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["mainUrl"]) || array_key_exists("mainUrl", $context) ? $context["mainUrl"] : (function () { throw new RuntimeError('Variable "mainUrl" does not exist.', 34, $this->source); })()), 34, $this->source), "html", null, true);
echo "\" height=\"100\" alt=\"商品\" class=\"item-thumb\">
</div>
<div id=\"rcontents\" class=\"review-page\">
<p>
<a href=\"/item/";
// line 38
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["kataban"]) || array_key_exists("kataban", $context) ? $context["kataban"] : (function () { throw new RuntimeError('Variable "kataban" does not exist.', 38, $this->source); })()), "goods_id", [], "any", false, false, true, 38), 38, $this->source), "html", null, true);
echo ".html\"><b>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["kataban"]) || array_key_exists("kataban", $context) ? $context["kataban"] : (function () { throw new RuntimeError('Variable "kataban" does not exist.', 38, $this->source); })()), "name", [], "any", false, false, true, 38), 38, $this->source), "html", null, true);
echo "</b></a>
</p>
</div>
<br class=\"clear\" />
";
}
// line 43
echo "
";
// line 44
if ( !twig_test_empty((isset($context["review"]) || array_key_exists("review", $context) ? $context["review"] : (function () { throw new RuntimeError('Variable "review" does not exist.', 44, $this->source); })()))) {
// line 45
echo " ";
$context["count"] = 0;
// line 46
echo " <br>
<div id=\"wrap\" class=\"review-page\">
<div id=\"voice\" class=\"voice-box\">
<div class=\"title\">
<h2>この商品を買ったお客様のレビュー(評価)</h2>
<p class=\"star\">
<img alt=\"お客様からの口コミレビュー評価の星の数";
// line 52
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["average"]) || array_key_exists("average", $context) ? $context["average"] : (function () { throw new RuntimeError('Variable "average" does not exist.', 52, $this->source); })()), 52, $this->source), "html", null, true);
echo "\" src=\"/images/review/star_m";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["star"]) || array_key_exists("star", $context) ? $context["star"] : (function () { throw new RuntimeError('Variable "star" does not exist.', 52, $this->source); })()), 52, $this->source), "html", null, true);
echo ".gif\">
<span>";
// line 53
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["average"]) || array_key_exists("average", $context) ? $context["average"] : (function () { throw new RuntimeError('Variable "average" does not exist.', 53, $this->source); })()), 53, $this->source), "html", null, true);
echo "</span>
<span>(";
// line 54
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["total_count"]) || array_key_exists("total_count", $context) ? $context["total_count"] : (function () { throw new RuntimeError('Variable "total_count" does not exist.', 54, $this->source); })()), 54, $this->source)), "html", null, true);
echo "件)</span>
</p>
</div>
<ul>
";
// line 59
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["review"]) || array_key_exists("review", $context) ? $context["review"] : (function () { throw new RuntimeError('Variable "review" does not exist.', 59, $this->source); })()));
foreach ($context['_seq'] as $context["key"] => $context["rv"]) {
// line 60
echo " ";
if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 60, $this->source); })()) < 5)) {
// line 61
echo " <li>
<dl>
<dt>評価:
";
// line 64
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(0, 4));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 65
echo " ";
if (($context["i"] < twig_get_attribute($this->env, $this->source, $context["rv"], "cr_points", [], "any", false, false, true, 65))) {
// line 66
echo " ";
echo "★";
echo "
";
} else {
// line 68
echo " ";
echo "☆";
echo "
";
}
// line 70
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 71
echo " <span> 投稿日: ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["rv"], "app_datetime", [], "any", false, false, true, 71), 71, $this->source), "Y/m/d"), "html", null, true);
echo "</span>
</dt>
<dd>
<p class=\"txt\">
";
// line 75
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["rv"], "cr_staff_comment", [], "any", false, false, true, 75))) {
// line 76
echo " ";
echo twig_nl2br(twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["rv"], "cr_staff_comment", [], "any", false, false, true, 76), 76, $this->source), "html", null, true));
echo "
";
} else {
// line 78
echo " ";
echo twig_nl2br(twig_escape_filter($this->env, twig_trim_filter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["rv"], "cr_comment", [], "any", false, false, true, 78), 78, $this->source), null, "right"), "html", null, true));
echo "
";
}
// line 80
echo " </p>
</dd>
</dl>
</li>
";
}
// line 85
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['rv'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 86
echo " </ul>
</div><!-- /#voice -->
</div><!-- /#wrap -->
";
}
// line 90
echo "
<!-- ページネーション -->
";
// line 92
if ((twig_get_attribute($this->env, $this->source, ($context["pager"] ?? null), "pages", [], "any", true, true, true, 92) && (twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 92, $this->source); })()), "pages", [], "any", false, false, true, 92) > 1))) {
// line 93
echo " <nav data-pagination>
<ul>
<li>
";
// line 96
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 96, $this->source); })()), "prev", [], "any", false, false, true, 96))) {
// line 97
echo " <a href=\"/review?";
echo $this->extensions['Customize\Twig\Extension\ServiceExtension']->PageWithGetParams($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 97, $this->source); })()), "prev", [], "any", false, false, true, 97), 97, $this->source));
echo "\">
<i class=\"ion-chevron-left\"><</i>
</a>
";
} else {
// line 101
echo " <a disabled>
<i class=\"ion-chevron-left\"></i>
</a>
";
}
// line 105
echo " </li>
";
// line 106
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 106, $this->source); })()), "page_list", [], "any", false, false, true, 106));
foreach ($context['_seq'] as $context["key"] => $context["pg"]) {
// line 107
echo " ";
if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 107, $this->source); })()) == $context["pg"])) {
// line 108
echo " <li class=\"current\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["pg"], 108, $this->source), "html", null, true);
echo "</li>
";
} elseif (( // line 109
$context["pg"] == null)) {
// line 110
echo " <li>...</li>
";
} else {
// line 112
echo " <li><a href=\"/review?";
echo $this->extensions['Customize\Twig\Extension\ServiceExtension']->PageWithGetParams($this->sandbox->ensureToStringAllowed($context["pg"], 112, $this->source));
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["pg"], 112, $this->source), "html", null, true);
echo "</a></li>
";
}
// line 114
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['pg'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 115
echo " <li>
";
// line 116
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 116, $this->source); })()), "next", [], "any", false, false, true, 116))) {
// line 117
echo " <a href=\"/review?";
echo $this->extensions['Customize\Twig\Extension\ServiceExtension']->PageWithGetParams($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 117, $this->source); })()), "next", [], "any", false, false, true, 117), 117, $this->source));
echo "\">
<i class=\"ion-chevron-right\">></i>
</a>
";
} else {
// line 121
echo " <a disabled>
<i class=\"ion-chevron-right\"></i>
</a>
";
}
// line 125
echo " </li>
</ul>
</nav>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Review/index.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 340 => 125, 334 => 121, 326 => 117, 324 => 116, 321 => 115, 315 => 114, 307 => 112, 303 => 110, 301 => 109, 296 => 108, 293 => 107, 289 => 106, 286 => 105, 280 => 101, 272 => 97, 270 => 96, 265 => 93, 263 => 92, 259 => 90, 253 => 86, 247 => 85, 240 => 80, 234 => 78, 228 => 76, 226 => 75, 218 => 71, 212 => 70, 206 => 68, 200 => 66, 197 => 65, 193 => 64, 188 => 61, 185 => 60, 181 => 59, 173 => 54, 169 => 53, 163 => 52, 155 => 46, 152 => 45, 150 => 44, 147 => 43, 137 => 38, 130 => 34, 126 => 32, 124 => 31, 120 => 29, 110 => 28, 92 => 25, 75 => 16, 65 => 15, 54 => 11, 52 => 13, 39 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'default_frame.twig' %}
{% set body_class = 'review_page' %}
{% block stylesheet %}
<link rel=\"stylesheet\" href=\"/stylesheets/review.css?20220924\">
<link rel=\"stylesheet\" href=\"/stylesheets/pagination.css?20211225\">
<style>
nav {
min-height: auto;
}
</style>
{% endblock %}
{% block javascript %}
{% endblock %}
{% block main %}
{% if kataban is not empty %}
<div id=\"navigation\" class=\"nav-float\"></div>
<div>
<img src=\"{{ mainUrl }}\" height=\"100\" alt=\"商品\" class=\"item-thumb\">
</div>
<div id=\"rcontents\" class=\"review-page\">
<p>
<a href=\"/item/{{ kataban.goods_id }}.html\"><b>{{ kataban.name }}</b></a>
</p>
</div>
<br class=\"clear\" />
{% endif %}
{% if review is not empty %}
{% set count = 0 %}
<br>
<div id=\"wrap\" class=\"review-page\">
<div id=\"voice\" class=\"voice-box\">
<div class=\"title\">
<h2>この商品を買ったお客様のレビュー(評価)</h2>
<p class=\"star\">
<img alt=\"お客様からの口コミレビュー評価の星の数{{ average }}\" src=\"/images/review/star_m{{ star }}.gif\">
<span>{{ average }}</span>
<span>({{ total_count | number_format }}件)</span>
</p>
</div>
<ul>
{% for key,rv in review %}
{% if count < 5 %}
<li>
<dl>
<dt>評価:
{% for i in 0..4 %}
{% if i < rv.cr_points %}
{{ \"★\" }}
{% else %}
{{ \"☆\" }}
{% endif %}
{% endfor %}
<span> 投稿日: {{ rv.app_datetime | date('Y/m/d') }}</span>
</dt>
<dd>
<p class=\"txt\">
{% if rv.cr_staff_comment is not empty %}
{{ rv.cr_staff_comment | nl2br }}
{% else %}
{{ (rv.cr_comment | trim(side='right')) | nl2br }}
{% endif %}
</p>
</dd>
</dl>
</li>
{% endif %}
{% endfor %}
</ul>
</div><!-- /#voice -->
</div><!-- /#wrap -->
{% endif %}
<!-- ページネーション -->
{% if pager.pages is defined and pager.pages > 1 %}
<nav data-pagination>
<ul>
<li>
{% if pager.prev is not empty %}
<a href=\"/review?{{ PageWithGetParams(pager.prev) | raw }}\">
<i class=\"ion-chevron-left\"><</i>
</a>
{% else %}
<a disabled>
<i class=\"ion-chevron-left\"></i>
</a>
{% endif %}
</li>
{% for key, pg in pager.page_list %}
{% if page == pg %}
<li class=\"current\">{{ pg }}</li>
{% elseif pg==null %}
<li>...</li>
{% else %}
<li><a href=\"/review?{{ PageWithGetParams(pg) | raw }}\">{{ pg }}</a></li>
{% endif %}
{% endfor %}
<li>
{% if pager.next is not empty %}
<a href=\"/review?{{ PageWithGetParams(pager.next) | raw }}\">
<i class=\"ion-chevron-right\">></i>
</a>
{% else %}
<a disabled>
<i class=\"ion-chevron-right\"></i>
</a>
{% endif %}
</li>
</ul>
</nav>
{% endif %}
{% endblock %}
", "Review/index.twig", "/var/www/html/app/template/default/Review/index.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "if" => 31, "for" => 59);
static $filters = array("escape" => 34, "number_format" => 54, "date" => 71, "nl2br" => 76, "trim" => 78, "raw" => 97);
static $functions = array("range" => 64, "PageWithGetParams" => 97);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['escape', 'number_format', 'date', 'nl2br', 'trim', 'raw'],
['range', 'PageWithGetParams']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}