app/template/default/News/index.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% extends 'default_frame.twig' %}
  9. {% block main %}
  10. <div class="ec-searchnavRole">
  11.   <div class="ec-searchnavRole__topicpath">
  12.     <ol class="ec-topicpath">
  13.       <li class="ec-topicpath__item"><a href="{{ url('news_index') }}">{{ 'ニュース一覧'|trans }}</a>
  14.     </ol>
  15.   </div>
  16.   <div class="ec-searchnavRole__infos">
  17.     <div class="ec-searchnavRole__counter">
  18.       {% if pagination.totalItemCount > 0 %}
  19.         {{ '<span class="ec-font-bold">%count%件</span><span>のニュースが見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  20.       {% else %}
  21.         <span>{{ 'まだニュースがありません'|trans }}</span>
  22.       {% endif %}
  23.     </div>
  24.   </div>
  25. </div>
  26. <div class="ec-role">
  27.   {% if pagination.totalItemCount > 0 %}
  28.     {% for News in pagination %}
  29.     <div style="border-bottom: 1px solid #ddd;padding: 30px 0;">
  30.       <small style="float:right;">{{ News.publish_date|date("Y/m/d") }}</small><br>
  31.         {% if News.url %}
  32.           <a href="{{ News.url }}" {% if News.link_method == '1' %}target="_blank"{% endif %}>
  33.         {% else %}
  34.           <a href="{{ url('news_detail', {'id': News.id}) }}">
  35.         {% endif %}
  36.             <h2 style="margin:0;">{{ News.title }}</h2>
  37.           </a>
  38.     </div>
  39.     {% endfor %}
  40.   {% else %}
  41.     <div>{{ 'まだニュースはありません。'|trans }}</div>
  42.   {% endif %}
  43.   
  44.   <div class="ec-pagerRole">
  45.       {% include "pager.twig" with {'pages': pagination.paginationData} %}
  46.   </div>
  47. </div>
  48. {% endblock %}