<?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;
/* News/index.twig */
class __TwigTemplate_b3c4c7c58ccfb95a2269693fe014cf51b5cb25c463d10f6ed2b1cd8474dc31e2 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "News/index.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "News/index.twig"));
$this->parent = $this->loadTemplate("default_frame.twig", "News/index.twig", 11);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 13
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 14
echo "
<div class=\"ec-searchnavRole\">
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"";
// line 19
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("news_index");
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ニュース一覧"), "html", null, true);
echo "</a>
</ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<div class=\"ec-searchnavRole__counter\">
";
// line 25
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.', 25, $this->source); })()), "totalItemCount", [], "any", false, false, false, 25) > 0)) {
// line 26
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.', 26, $this->source); })()), "totalItemCount", [], "any", false, false, false, 26)]);
echo "
";
} else {
// line 28
echo " <span>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("まだニュースがありません"), "html", null, true);
echo "</span>
";
}
// line 30
echo " </div>
</div>
</div>
<div class=\"ec-role\">
";
// line 37
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.', 37, $this->source); })()), "totalItemCount", [], "any", false, false, false, 37) > 0)) {
// line 38
echo " ";
$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.', 38, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
// line 39
echo " <div style=\"border-bottom: 1px solid #ddd;padding: 30px 0;\">
<small style=\"float:right;\">";
// line 40
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "publish_date", [], "any", false, false, false, 40), "Y/m/d"), "html", null, true);
echo "</small><br>
";
// line 41
if (twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 41)) {
// line 42
echo " <a href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 42), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["News"], "link_method", [], "any", false, false, false, 42) == "1")) {
echo "target=\"_blank\"";
}
echo ">
";
} else {
// line 44
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("news_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["News"], "id", [], "any", false, false, false, 44)]), "html", null, true);
echo "\">
";
}
// line 46
echo " <h2 style=\"margin:0;\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "title", [], "any", false, false, false, 46), "html", null, true);
echo "</h2>
</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 50
echo " ";
} else {
// line 51
echo " <div>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("まだニュースはありません。"), "html", null, true);
echo "</div>
";
}
// line 53
echo "
<div class=\"ec-pagerRole\">
";
// line 55
$this->loadTemplate("pager.twig", "News/index.twig", 55)->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.', 55, $this->source); })()), "paginationData", [], "any", false, false, false, 55)]));
// line 56
echo " </div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "News/index.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 167 => 56, 165 => 55, 161 => 53, 155 => 51, 152 => 50, 141 => 46, 135 => 44, 125 => 42, 123 => 41, 119 => 40, 116 => 39, 111 => 38, 109 => 37, 100 => 30, 94 => 28, 88 => 26, 86 => 25, 75 => 19, 68 => 14, 58 => 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' %}
{% block main %}
<div class=\"ec-searchnavRole\">
<div class=\"ec-searchnavRole__topicpath\">
<ol class=\"ec-topicpath\">
<li class=\"ec-topicpath__item\"><a href=\"{{ url('news_index') }}\">{{ 'ニュース一覧'|trans }}</a>
</ol>
</div>
<div class=\"ec-searchnavRole__infos\">
<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>
</div>
</div>
<div class=\"ec-role\">
{% if pagination.totalItemCount > 0 %}
{% for News in pagination %}
<div style=\"border-bottom: 1px solid #ddd;padding: 30px 0;\">
<small style=\"float:right;\">{{ News.publish_date|date(\"Y/m/d\") }}</small><br>
{% if News.url %}
<a href=\"{{ News.url }}\" {% if News.link_method == '1' %}target=\"_blank\"{% endif %}>
{% else %}
<a href=\"{{ url('news_detail', {'id': News.id}) }}\">
{% endif %}
<h2 style=\"margin:0;\">{{ News.title }}</h2>
</a>
</div>
{% endfor %}
{% else %}
<div>{{ 'まだニュースはありません。'|trans }}</div>
{% endif %}
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData} %}
</div>
</div>
{% endblock %}
", "News/index.twig", "/home/xs538259/exterior-plus.jp/public_html/app/template/default/News/index.twig");
}
}