<?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.twig */
class __TwigTemplate_ca180ef53184bb1b7d17509e8ff62755 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'main' => [$this, 'block_main'],
];
}
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", "index.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "index.twig"));
// line 13
$context["body_class"] = "front_page brand-top ";
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "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_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 16
echo " <div class=\"top_main_contents\">
</div>
";
// line 20
echo "<div class=\"ec-layoutRole__mainBottom\" id=\"top-review\">
<div class=\"top-review ec-role_cosme\">
<div class=\"ec-secHeading\">
<span class=\"ec-secHeading__en\">NEW REVIEW</span>
<span class=\"ec-secHeading__ja\">新着順20レビュー</span>
</div>
<ul class=\"ec-reviewList\">
";
// line 27
if ( !twig_test_empty((isset($context["Reviews"]) || array_key_exists("Reviews", $context) ? $context["Reviews"] : (function () { throw new RuntimeError('Variable "Reviews" does not exist.', 27, $this->source); })()))) {
// line 28
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["Reviews"]) || array_key_exists("Reviews", $context) ? $context["Reviews"] : (function () { throw new RuntimeError('Variable "Reviews" does not exist.', 28, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Review"]) {
// line 29
echo " <li class=\"ec-reviewList__item\">
<a href=\"";
// line 30
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Review"], "Product", [], "any", false, false, false, 30), "id", [], "any", false, false, false, 30)]), "html", null, true);
echo "\">
<div class=\"ec-reviewList__header\">
<h3 class=\"ec-reviewList__productName\">";
// line 32
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Review"], "Product", [], "any", false, false, false, 32), "name", [], "any", false, false, false, 32), "html", null, true);
echo "</h3>
<p class=\"ec-reviewList__name\">";
// line 33
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Review"], "reviewer_name", [], "any", false, false, false, 33), "html", null, true);
echo " 様 <span class=\"ec-reviewList__date\">";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Review"], "create_date", [], "any", false, false, false, 33), "Y/m/d"), "html", null, true);
echo "</span><span class=\"ec-reviewList__star\">";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(1, twig_get_attribute($this->env, $this->source, $context["Review"], "recommend_level", [], "any", false, false, false, 33)));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
echo "★";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
echo "</span>
</p>
</div>
<p class=\"ec-reviewList__comment\">";
// line 36
echo twig_nl2br(twig_escape_filter($this->env, (((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Review"], "comment", [], "any", false, false, false, 36)) > 150)) ? ((twig_slice($this->env, twig_get_attribute($this->env, $this->source, $context["Review"], "comment", [], "any", false, false, false, 36), 0, 150) . "...")) : (twig_get_attribute($this->env, $this->source, $context["Review"], "comment", [], "any", false, false, false, 36))), "html", null, true));
echo "</p>
<p class=\"right s80\">商品ページへ ></p>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Review'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 41
echo " ";
} else {
// line 42
echo " <li class=\"ec-reviewList__item--none\">レビューはまだありません。</li>
";
}
// line 44
echo " </ul>
<div class=\"accordion\">
<details>
<summary>\教えてください!/<br>
<span class=\"small\">あなたの声が「ステキの道しるべ」になります</span></summary>
<p>私たちは、一つひとつの商品がまっすぐ伝わるよう、心を込めて商品紹介をしています。<br>
ですが、実際に商品を手にしてくださった「リアルな声」に勝るものはありません。<br><br>
「この使い心地が好き」<br>
「こんな使い方もおすすめです」<br>
「リピートしている決め手は」<br><br>
そんな、あなただけの素直な声が、お気に入りアイテムと出会うための、何より大切な「道しるべ」となります。<br><br>
もしよろしければ、ほんのひとことでも構いません。<br>
あなたが感じた商品とのストーリーを、ぜひお聞かせいただけないでしょうか。<br>
温かいお声が集まることで、この場所がさらにお役に立てることを願っております。</p>
</details>
<P class=\"orange bold\">レビュー投稿で300ポイント贈呈!詳しくは各商品ページ「レビューを投稿」ボタンから</P>
</div>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "index.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 139 => 44, 135 => 42, 132 => 41, 121 => 36, 104 => 33, 100 => 32, 95 => 30, 92 => 29, 87 => 28, 85 => 27, 76 => 20, 71 => 16, 61 => 15, 50 => 11, 48 => 13, 35 => 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 = 'front_page brand-top ' %}
{% block main %}
<div class=\"top_main_contents\">
</div>
{# index.twig の好きな場所にこのコードを貼り付ける #}
<div class=\"ec-layoutRole__mainBottom\" id=\"top-review\">
<div class=\"top-review ec-role_cosme\">
<div class=\"ec-secHeading\">
<span class=\"ec-secHeading__en\">NEW REVIEW</span>
<span class=\"ec-secHeading__ja\">新着順20レビュー</span>
</div>
<ul class=\"ec-reviewList\">
{% if Reviews is not empty %}
{% for Review in Reviews %}
<li class=\"ec-reviewList__item\">
<a href=\"{{ url('product_detail', {id: Review.Product.id}) }}\">
<div class=\"ec-reviewList__header\">
<h3 class=\"ec-reviewList__productName\">{{ Review.Product.name }}</h3>
<p class=\"ec-reviewList__name\">{{ Review.reviewer_name }} 様 <span class=\"ec-reviewList__date\">{{ Review.create_date|date(\"Y/m/d\") }}</span><span class=\"ec-reviewList__star\">{% for i in 1..Review.recommend_level %}★{% endfor %}</span>
</p>
</div>
<p class=\"ec-reviewList__comment\">{{ (Review.comment|length > 150 ? Review.comment|slice(0, 150) ~ '...' : Review.comment)|nl2br }}</p>
<p class=\"right s80\">商品ページへ ></p>
</a>
</li>
{% endfor %}
{% else %}
<li class=\"ec-reviewList__item--none\">レビューはまだありません。</li>
{% endif %}
</ul>
<div class=\"accordion\">
<details>
<summary>\教えてください!/<br>
<span class=\"small\">あなたの声が「ステキの道しるべ」になります</span></summary>
<p>私たちは、一つひとつの商品がまっすぐ伝わるよう、心を込めて商品紹介をしています。<br>
ですが、実際に商品を手にしてくださった「リアルな声」に勝るものはありません。<br><br>
「この使い心地が好き」<br>
「こんな使い方もおすすめです」<br>
「リピートしている決め手は」<br><br>
そんな、あなただけの素直な声が、お気に入りアイテムと出会うための、何より大切な「道しるべ」となります。<br><br>
もしよろしければ、ほんのひとことでも構いません。<br>
あなたが感じた商品とのストーリーを、ぜひお聞かせいただけないでしょうか。<br>
温かいお声が集まることで、この場所がさらにお役に立てることを願っております。</p>
</details>
<P class=\"orange bold\">レビュー投稿で300ポイント贈呈!詳しくは各商品ページ「レビューを投稿」ボタンから</P>
</div>
</div>
</div>
{% endblock %}", "index.twig", "/home/owl/owl-horie.com/public_html/test-eccube.owl-horie.com/app/template/cosme41/index.twig");
}
}