<?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;
/* category_detail.twig */
class __TwigTemplate_bbad01e4004e9a0456a0826f87234d2998f08479988c2727f605aa6bbdb67b16 extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascript' => [$this, 'block_javascript'],
'stylesheet' => [$this, 'block_stylesheet'],
'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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "category_detail.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "category_detail.twig"));
// line 13
$context["body_class"] = "category_detail";
// line 14
$context["childCategories"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('repository')->getCallable(), ["Eccube\\Entity\\Category"]), "find", [0 => twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 14, $this->source); })()), "id", [], "any", false, false, false, 14)], "method", false, false, false, 14), "getDescendants", [], "method", false, false, false, 14);
// line 11
$this->parent = $this->loadTemplate("default_frame.twig", "category_detail.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 16
public function block_javascript($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", "javascript"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 17
echo "<script type=\"text/javascript\">
\$(function(){
\$('.mod_movie-btn-favorite').on('click', function(){
let loginStatus = ";
// line 20
echo (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) ? ("true") : ("false"));
echo ";
if(loginStatus){
let pid = \$(this).data('pid');
let tmpbtn = \$(this);
// tmpbtn.children(\"input\").prop('disabled', true);
tmpbtn.children(\"input\").attr('disabled', true);
if(tmpbtn.hasClass('favorite__del')){
\$.ajax({
url: \"";
// line 30
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "refine_delete_favorite\",
type: 'GET',
dataType: 'text',
data: {id: pid}
})
.then(
function (data) {
tmpbtn.removeClass('favorite__del');
tmpbtn.addClass('favorite__add');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
} else {
\$.ajax({
url: \"";
// line 47
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/add_favorite/\"+pid,
type: 'POST',
})
.then(
function (data) {
tmpbtn.removeClass('favorite__add');
tmpbtn.addClass('favorite__del');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
}
// tmpbtn.children(\"input\").prop('disabled', false);
tmpbtn.children(\"input\").attr('disabled', false);
} else {
location.href= \"";
// line 64
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("mypage_delivery");
echo "\";
}
});
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 88
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 89
echo "<style>
.ec-searchnavRole {
margin-top: 30px;
}
</style>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 96
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 97
echo "<div class=\"content__inner\">
<div class=\"mod_breadcrumb\">
<ul>
<li>
<a href=\"";
// line 101
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ホーム"), "html", null, true);
echo "</a>
</li>
<li>
<a href=\"";
// line 104
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category_list");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カテゴリ一覧"), "html", null, true);
echo "</a>
</li>
";
// line 107
echo " ";
$context["parentCategory"] = twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 107, $this->source); })()), "getParent", [], "any", false, false, false, 107);
// line 108
echo " ";
if ( !twig_test_empty((isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 108, $this->source); })()))) {
// line 109
echo " <li><a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("categories/{category_id}", ["category_id" => twig_get_attribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 109, $this->source); })()), "id", [], "any", false, false, false, 109)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 109, $this->source); })()), "name", [], "any", false, false, false, 109)), "html", null, true);
echo "</a></li>
";
}
// line 111
echo " <li>
<span>";
// line 112
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 112, $this->source); })()), "name", [], "any", false, false, false, 112)), "html", null, true);
echo "</span>
</li>
</ul>
</div>
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
";
// line 117
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 117, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 118
echo " <input type=\"hidden\" id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 118), "id", [], "any", false, false, false, 118), "html", null, true);
echo "\"
name=\"";
// line 119
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 119), "full_name", [], "any", false, false, false, 119), "html", null, true);
echo "\"
";
// line 120
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 120), "value", [], "any", false, false, false, 120))) {
echo "value=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "vars", [], "any", false, false, false, 120), "value", [], "any", false, false, false, 120), "html", null, true);
echo "\" ";
}
echo "/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 122
echo " </form>
<div class=\"page__content\">
<h1>";
// line 124
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 124, $this->source); })()), "name", [], "any", false, false, false, 124)), "html", null, true);
echo "</h1>
<div class=\"page__inner\">
<div class=\"ec-searchnavRole\" style=\"padding: 0;margin-top:0;\">
<div class=\"ec-searchnavRole__infos\" style=\"border: none;padding-top:0;\">
<div class=\"ec-searchnavRole__counter\">
";
// line 130
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 130, $this->source); })()), "totalItemCount", [], "any", false, false, false, 130) > 0)) {
// line 131
echo " ";
echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("<span class=\"ec-font-bold\">%count%件</span><span>の動画が見つかりました</span>", ["%count%" => twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 131, $this->source); })()), "totalItemCount", [], "any", false, false, false, 131)]);
echo "
";
} else {
// line 133
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お探しの動画は見つかりませんでした"), "html", null, true);
echo "</span>
";
}
// line 135
echo " </div>
";
// line 136
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 136, $this->source); })()), "totalItemCount", [], "any", false, false, false, 136) > 0)) {
// line 137
echo " <div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
";
// line 139
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["disp_number_form"]) || array_key_exists("disp_number_form", $context) ? $context["disp_number_form"] : (function () { throw new RuntimeError('Variable "disp_number_form" does not exist.', 139, $this->source); })()), 'widget', ["id" => "", "attr" => ["class" => "disp-number"]]);
echo "
";
// line 140
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["order_by_form"]) || array_key_exists("order_by_form", $context) ? $context["order_by_form"] : (function () { throw new RuntimeError('Variable "order_by_form" does not exist.', 140, $this->source); })()), 'widget', ["id" => "", "attr" => ["class" => "order-by"]]);
echo "
</div>
</div>
";
}
// line 144
echo " </div>
</div>
";
// line 147
if ((array_key_exists("childCategories", $context) && (twig_length_filter($this->env, (isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 147, $this->source); })())) > 0))) {
// line 148
echo "
";
// line 150
echo " ";
$context["cntTotalPublished"] = 0;
// line 151
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 151, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["childCategory"]) {
// line 152
echo " ";
// line 153
echo " ";
if ((((twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 153) != 7) && (twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 153) != 2)) && (twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 153) != 64))) {
// line 154
echo " ";
// line 155
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["childCategory"], "ProductCategories", [], "any", false, false, false, 155))) {
// line 156
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["childCategory"], "ProductCategories", [], "any", false, false, false, 156));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 157
echo " ";
$context["cntTotalPublished"] = ((isset($context["cntTotalPublished"]) || array_key_exists("cntTotalPublished", $context) ? $context["cntTotalPublished"] : (function () { throw new RuntimeError('Variable "cntTotalPublished" does not exist.', 157, $this->source); })()) + ((( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Product", [], "any", false, false, false, 157)) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Product", [], "any", false, false, false, 157), "Status", [], "any", false, false, false, 157), "id", [], "any", false, false, false, 157) == 1))) ? (1) : (0)));
// line 158
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 159
echo " ";
}
// line 160
echo " ";
}
// line 161
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['childCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 162
echo "
";
// line 164
echo " ";
if (((isset($context["cntTotalPublished"]) || array_key_exists("cntTotalPublished", $context) ? $context["cntTotalPublished"] : (function () { throw new RuntimeError('Variable "cntTotalPublished" does not exist.', 164, $this->source); })()) > 0)) {
// line 165
echo " <div class=\"mod_inpage-link\">
<h5>";
// line 166
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("さらに絞り込んで表示する"), "html", null, true);
echo "</h5>
<ul>
";
// line 168
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 168, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["childCategory"]) {
// line 169
echo "
";
// line 171
echo " ";
if ((((twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 171) != 7) && (twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 171) != 2)) && (twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 171) != 64))) {
// line 172
echo " ";
$context["cntPublished"] = 0;
// line 173
echo " ";
// line 174
echo " ";
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["childCategory"], "ProductCategories", [], "any", false, false, false, 174))) {
// line 175
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["childCategory"], "ProductCategories", [], "any", false, false, false, 175));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
// line 176
echo " ";
$context["cntPublished"] = ((isset($context["cntPublished"]) || array_key_exists("cntPublished", $context) ? $context["cntPublished"] : (function () { throw new RuntimeError('Variable "cntPublished" does not exist.', 176, $this->source); })()) + ((( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Product", [], "any", false, false, false, 176)) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Product", [], "any", false, false, false, 176), "Status", [], "any", false, false, false, 176), "id", [], "any", false, false, false, 176) == 1))) ? (1) : (0)));
// line 177
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 178
echo " ";
}
// line 179
echo "
";
// line 180
if (((isset($context["cntPublished"]) || array_key_exists("cntPublished", $context) ? $context["cntPublished"] : (function () { throw new RuntimeError('Variable "cntPublished" does not exist.', 180, $this->source); })()) > 0)) {
// line 181
echo " <li>
<a href=\"";
// line 182
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("categories/{category_id}", ["category_id" => twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 182)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["childCategory"], "name", [], "any", false, false, false, 182)), "html", null, true);
echo "</a>
</li>
";
}
// line 185
echo " ";
}
// line 186
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['childCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 187
echo " </ul>
</div>
";
}
// line 190
echo "
";
}
// line 192
echo " ";
if ((array_key_exists("pagination", $context) && (twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 192, $this->source); })()), "totalItemCount", [], "any", false, false, false, 192) > 0))) {
// line 193
echo " <ul class=\"mod_movie-list\">
";
// line 194
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 194, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 195
echo " ";
$context["productClass"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "ProductClasses", [], "any", false, false, false, 195), "get", [0 => 0], "method", false, false, false, 195);
// line 196
echo " ";
$context["videoContent"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["productClass"]) || array_key_exists("productClass", $context) ? $context["productClass"] : (function () { throw new RuntimeError('Variable "productClass" does not exist.', 196, $this->source); })()), "ProductClassContent", [], "any", false, false, false, 196), "get", [0 => 0], "method", false, false, false, 196);
// line 197
echo " ";
// line 198
echo " ";
if ( !twig_test_empty((isset($context["videoContent"]) || array_key_exists("videoContent", $context) ? $context["videoContent"] : (function () { throw new RuntimeError('Variable "videoContent" does not exist.', 198, $this->source); })()))) {
// line 199
echo " ";
$context["anker"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("video/{product_id}/content/{content_id}", ["product_id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 199), "content_id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["videoContent"]) || array_key_exists("videoContent", $context) ? $context["videoContent"] : (function () { throw new RuntimeError('Variable "videoContent" does not exist.', 199, $this->source); })()), "Content", [], "any", false, false, false, 199), "id", [], "any", false, false, false, 199)]);
// line 200
echo " ";
} else {
// line 201
echo " ";
$context["anker"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 201)]);
// line 202
echo " ";
}
// line 203
echo " ";
$context["isFavorite"] = ( !twig_test_empty((isset($context["customer"]) || array_key_exists("customer", $context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.', 203, $this->source); })())) && twig_get_attribute($this->env, $this->source, call_user_func_array($this->env->getFunction('repository')->getCallable(), ["Eccube\\Entity\\CustomerFavoriteProduct"]), "isFavorite", [0 => (isset($context["customer"]) || array_key_exists("customer", $context) ? $context["customer"] : (function () { throw new RuntimeError('Variable "customer" does not exist.', 203, $this->source); })()), 1 => $context["item"]], "method", false, false, false, 203));
// line 204
echo "
<li class=\"mod_movie-item\">
<div class=\"mod_movie-item-inner\">
<div class=\"mod_movie-img-wrapper\">
<a href=\"";
// line 208
echo twig_escape_filter($this->env, (isset($context["anker"]) || array_key_exists("anker", $context) ? $context["anker"] : (function () { throw new RuntimeError('Variable "anker" does not exist.', 208, $this->source); })()), "html", null, true);
echo "\">
";
// line 209
if ((twig_get_attribute($this->env, $this->source, $context["item"], "ProductImage", [], "any", true, true, false, 209) && !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["item"], "ProductImage", [], "any", false, false, false, 209)))) {
// line 210
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "ProductImage", [], "any", false, false, false, 210), "get", [0 => 0], "method", false, false, false, 210), "save_image"), "html", null, true);
echo "\" alt=\"Product.name\" />
";
} else {
// line 212
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html", null, true);
echo "\" alt=\"\" />
";
}
// line 214
echo " </a>
</div>
<div class=\"mod_movie-text-wrapper\">
<a href=\"";
// line 217
echo twig_escape_filter($this->env, (isset($context["anker"]) || array_key_exists("anker", $context) ? $context["anker"] : (function () { throw new RuntimeError('Variable "anker" does not exist.', 217, $this->source); })()), "html", null, true);
echo "\" class=\"mod_movie-title\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 217)), "html", null, true);
echo "</a>
";
// line 218
$context["searchWords"] = twig_split_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "search_word", [], "any", false, false, false, 218), ",");
// line 219
echo " <ul class=\"mod_movie-keyword-list\">
";
// line 220
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["searchWords"]) || array_key_exists("searchWords", $context) ? $context["searchWords"] : (function () { throw new RuntimeError('Variable "searchWords" does not exist.', 220, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["word"]) {
// line 221
echo " ";
if ( !twig_test_empty($context["word"])) {
// line 222
echo " <li class=\"mod_movie-keyword-item\">
<span>";
// line 223
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["word"]), "html", null, true);
echo "</span>
</li>
";
}
// line 226
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['word'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 227
echo " </ul>
<div class=\"mod_movie-btn-wrapper\">
<div class=\"mod_movie-btn-favorite ";
// line 229
echo ((((isset($context["isFavorite"]) || array_key_exists("isFavorite", $context) ? $context["isFavorite"] : (function () { throw new RuntimeError('Variable "isFavorite" does not exist.', 229, $this->source); })()) == 1)) ? ("favorite__del") : ("favorite__add"));
echo "\" data-pid=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "id", [], "any", false, false, false, 229), "html", null, true);
echo "\">
";
// line 231
echo " ";
// line 240
echo "
";
// line 242
echo " <input type=\"button\" class=\"favorite-btn\" value=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("見たい授業"), "html", null, true);
echo "\" />
";
// line 246
echo " </div>
<a href=\"";
// line 247
echo twig_escape_filter($this->env, (isset($context["anker"]) || array_key_exists("anker", $context) ? $context["anker"] : (function () { throw new RuntimeError('Variable "anker" does not exist.', 247, $this->source); })()), "html", null, true);
echo "\" class=\"mod_movie-btn-watch\">
<span>";
// line 248
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("見る"), "html", null, true);
echo "</span>
</a>
</div>
</div>
</div>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 255
echo " </ul>
";
}
// line 257
echo " </div>
";
// line 259
$this->loadTemplate("category_pager.twig", "category_detail.twig", 259)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 259, $this->source); })()), "paginationData", [], "any", false, false, false, 259)]));
// line 260
echo "
<div class=\"page__inner\">
<h2 class=\"mod_movie-h2\">
";
// line 263
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カテゴリ一覧"), "html", null, true);
echo "
</h2>
<div class=\"mod_movie-btn-more\">
<a href=\"";
// line 266
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category_list");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("カテゴリ一覧に戻る"), "html", null, true);
echo "</a>
</div>
</div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "category_detail.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 615 => 266, 609 => 263, 604 => 260, 602 => 259, 598 => 257, 594 => 255, 581 => 248, 577 => 247, 574 => 246, 569 => 242, 566 => 240, 564 => 231, 558 => 229, 554 => 227, 548 => 226, 542 => 223, 539 => 222, 536 => 221, 532 => 220, 529 => 219, 527 => 218, 521 => 217, 516 => 214, 510 => 212, 504 => 210, 502 => 209, 498 => 208, 492 => 204, 489 => 203, 486 => 202, 483 => 201, 480 => 200, 477 => 199, 474 => 198, 472 => 197, 469 => 196, 466 => 195, 462 => 194, 459 => 193, 456 => 192, 452 => 190, 447 => 187, 441 => 186, 438 => 185, 430 => 182, 427 => 181, 425 => 180, 422 => 179, 419 => 178, 413 => 177, 410 => 176, 405 => 175, 402 => 174, 400 => 173, 397 => 172, 394 => 171, 391 => 169, 387 => 168, 382 => 166, 379 => 165, 376 => 164, 373 => 162, 367 => 161, 364 => 160, 361 => 159, 355 => 158, 352 => 157, 347 => 156, 344 => 155, 342 => 154, 339 => 153, 337 => 152, 332 => 151, 329 => 150, 326 => 148, 324 => 147, 319 => 144, 312 => 140, 308 => 139, 304 => 137, 302 => 136, 299 => 135, 293 => 133, 287 => 131, 285 => 130, 276 => 124, 272 => 122, 260 => 120, 256 => 119, 251 => 118, 247 => 117, 239 => 112, 236 => 111, 228 => 109, 225 => 108, 222 => 107, 215 => 104, 207 => 101, 201 => 97, 191 => 96, 176 => 89, 166 => 88, 133 => 64, 113 => 47, 93 => 30, 80 => 20, 75 => 17, 65 => 16, 54 => 11, 52 => 14, 50 => 13, 37 => 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 = 'category_detail' %}
{% set childCategories = repository('Eccube\\\\Entity\\\\Category').find(category.id).getDescendants() %}
{% block javascript %}
<script type=\"text/javascript\">
\$(function(){
\$('.mod_movie-btn-favorite').on('click', function(){
let loginStatus = {{ is_granted('ROLE_USER') ? 'true' : 'false' }};
if(loginStatus){
let pid = \$(this).data('pid');
let tmpbtn = \$(this);
// tmpbtn.children(\"input\").prop('disabled', true);
tmpbtn.children(\"input\").attr('disabled', true);
if(tmpbtn.hasClass('favorite__del')){
\$.ajax({
url: \"{{ url('homepage') }}refine_delete_favorite\",
type: 'GET',
dataType: 'text',
data: {id: pid}
})
.then(
function (data) {
tmpbtn.removeClass('favorite__del');
tmpbtn.addClass('favorite__add');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
} else {
\$.ajax({
url: \"{{ url('homepage') }}products/add_favorite/\"+pid,
type: 'POST',
})
.then(
function (data) {
tmpbtn.removeClass('favorite__add');
tmpbtn.addClass('favorite__del');
},
function () {
alert(\"処理に失敗しました。お手数ですが再度実行してください\");
});
}
// tmpbtn.children(\"input\").prop('disabled', false);
tmpbtn.children(\"input\").attr('disabled', false);
} else {
location.href= \"{{ url('mypage_delivery') }}\";
}
});
// 表示件数を変更
\$('.disp-number').change(function() {
var dispNumber = \$(this).val();
\$('#disp_number').val(dispNumber);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
// 並び順を変更
\$('.order-by').change(function() {
var orderBy = \$(this).val();
\$('#orderby').val(orderBy);
\$('#pageno').val(1);
\$(\"#form1\").submit();
});
});
</script>
{% endblock %}
{% block stylesheet %}
<style>
.ec-searchnavRole {
margin-top: 30px;
}
</style>
{% endblock %}
{% block main %}
<div class=\"content__inner\">
<div class=\"mod_breadcrumb\">
<ul>
<li>
<a href=\"{{ url('homepage') }}\">{{ 'ホーム'|trans }}</a>
</li>
<li>
<a href=\"{{ url('category_list') }}\">{{ 'カテゴリ一覧'|trans }}</a>
</li>
{# 親カテゴリの設定 #}
{% set parentCategory = category.getParent %}
{% if parentCategory is not empty %}
<li><a href=\"{{ url('categories/{category_id}', { 'category_id': parentCategory.id }) }}\">{{ parentCategory.name|trans }}</a></li>
{% endif %}
<li>
<span>{{ category.name|trans }}</span>
</li>
</ul>
</div>
<form name=\"form1\" id=\"form1\" method=\"get\" action=\"?\">
{% for item in search_form %}
<input type=\"hidden\" id=\"{{ item.vars.id }}\"
name=\"{{ item.vars.full_name }}\"
{% if item.vars.value is not empty %}value=\"{{ item.vars.value }}\" {% endif %}/>
{% endfor %}
</form>
<div class=\"page__content\">
<h1>{{ category.name|trans }}</h1>
<div class=\"page__inner\">
<div class=\"ec-searchnavRole\" style=\"padding: 0;margin-top:0;\">
<div class=\"ec-searchnavRole__infos\" style=\"border: none;padding-top:0;\">
<div class=\"ec-searchnavRole__counter\">
{% if pagination.totalItemCount > 0 %}
{{ '<span class=\"ec-font-bold\">%count%件</span><span>の動画が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
{% else %}
<span>{{ 'お探しの動画は見つかりませんでした'|trans }}</span>
{% endif %}
</div>
{% if pagination.totalItemCount > 0 %}
<div class=\"ec-searchnavRole__actions\">
<div class=\"ec-select\">
{{ form_widget(disp_number_form, {'id': '', 'attr': {'class': 'disp-number'}}) }}
{{ form_widget(order_by_form, {'id': '', 'attr': {'class': 'order-by'}}) }}
</div>
</div>
{% endif %}
</div>
</div>
{% if childCategories is defined and childCategories|length > 0 %}
{# 表示用計算 #}
{% set cntTotalPublished = 0 %}
{% for childCategory in childCategories %}
{# サブスクリプション, 新入荷, 講師は除く #}
{% if childCategory.id != 7 and childCategory.id != 2 and childCategory.id != 64 %}
{# 公開のみカウント #}
{% if childCategory.ProductCategories is not empty %}
{% for ProductCategory in childCategory.ProductCategories %}
{% set cntTotalPublished = cntTotalPublished + (ProductCategory.Product is not empty and ProductCategory.Product.Status.id == 1 ? 1 : 0) %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{# カテゴリに紐付いた記事があれば表示 #}
{% if (cntTotalPublished > 0) %}
<div class=\"mod_inpage-link\">
<h5>{{ 'さらに絞り込んで表示する'|trans }}</h5>
<ul>
{% for childCategory in childCategories %}
{# サブスクリプション, 新入荷, 講師は除く #}
{% if childCategory.id != 7 and childCategory.id != 2 and childCategory.id != 64 %}
{% set cntPublished = 0 %}
{# 公開のみカウント #}
{% if childCategory.ProductCategories is not empty %}
{% for ProductCategory in childCategory.ProductCategories %}
{% set cntPublished = cntPublished + (ProductCategory.Product is not empty and ProductCategory.Product.Status.id == 1 ? 1 : 0) %}
{% endfor %}
{% endif %}
{% if (cntPublished > 0) %}
<li>
<a href=\"{{ url('categories/{category_id}', { 'category_id': childCategory.id }) }}\">{{ childCategory.name|trans }}</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}
{% if pagination is defined and pagination.totalItemCount > 0 %}
<ul class=\"mod_movie-list\">
{% for item in pagination %}
{% set productClass = item.ProductClasses.get(0) %}
{% set videoContent = productClass.ProductClassContent.get(0) %}
{# 通常は動画閲覧画面、コンテンツがない場合は商品詳細へ #}
{% if videoContent is not empty %}
{% set anker = url('video/{product_id}/content/{content_id}', {'product_id': item.id, 'content_id': videoContent.Content.id}) %}
{% else %}
{% set anker = url('product_detail', {id: item.id}) %}
{% endif %}
{% set isFavorite = customer is not empty and repository('Eccube\\\\Entity\\\\CustomerFavoriteProduct').isFavorite(customer, item) %}
<li class=\"mod_movie-item\">
<div class=\"mod_movie-item-inner\">
<div class=\"mod_movie-img-wrapper\">
<a href=\"{{ anker }}\">
{% if item.ProductImage is defined and item.ProductImage is not empty %}
<img src=\"{{ asset(item.ProductImage.get(0), 'save_image') }}\" alt=\"Product.name\" />
{% else %}
<img src=\"{{ asset(''|no_image_product, 'save_image') }}\" alt=\"\" />
{% endif %}
</a>
</div>
<div class=\"mod_movie-text-wrapper\">
<a href=\"{{ anker }}\" class=\"mod_movie-title\">{{ item.name|trans }}</a>
{% set searchWords = item.search_word|split(',') %}
<ul class=\"mod_movie-keyword-list\">
{% for word in searchWords %}
{% if word is not empty %}
<li class=\"mod_movie-keyword-item\">
<span>{{ word|trans }}</span>
</li>
{% endif %}
{% endfor %}
</ul>
<div class=\"mod_movie-btn-wrapper\">
<div class=\"mod_movie-btn-favorite {{ (isFavorite == 1) ? 'favorite__del': 'favorite__add' }}\" data-pid=\"{{ item.id }}\">
{# 一旦全部見たい授業とする #}
{# {% if isFavorite and false %}
<form action=\"{{ url('refine_delete_favorite', {id:item.id}) }}\" method=\"post\">
<input type=\"submit\" value=\"{{ '見たい授業'|trans }}\" />
</form>
{% else %}
<form action=\"{{ url('product_add_favorite', {id:item.id}) }}\" method=\"post\">
<input type=\"submit\" value=\"{{ '見たい授業'|trans }}\" />
</form>
{% endif %} #}
{# {% if isFavorite == 1 %} #}
<input type=\"button\" class=\"favorite-btn\" value=\"{{ '見たい授業'|trans }}\" />
{# {% else %}
<input type=\"button\" class=\"favorite-btn\" value=\"{{ '見たい授業'|trans }}\" />
{% endif %} #}
</div>
<a href=\"{{ anker }}\" class=\"mod_movie-btn-watch\">
<span>{{ '見る'|trans }}</span>
</a>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% include \"category_pager.twig\" with {'pages': pagination.paginationData} %}
<div class=\"page__inner\">
<h2 class=\"mod_movie-h2\">
{{ 'カテゴリ一覧'|trans }}
</h2>
<div class=\"mod_movie-btn-more\">
<a href=\"{{ url('category_list') }}\">{{ 'カテゴリ一覧に戻る'|trans }}</a>
</div>
</div>
</div>
</div>
{% endblock %}
", "category_detail.twig", "/home/mahjontv1326/kmj-tv.jp/public_html/dev.kmj-tv.jp/app/template/default/category_detail.twig");
}
}