app/template/kinkodo/Blogs42/list.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% block stylesheet %}
  3. <link rel="stylesheet" href="{{ asset('Blogs42/assets/css/blogs.css', 'plugin') }}">
  4. {% endblock %}
  5. {% block javascript %}
  6. <script>
  7.     $(function () {
  8.         // 表示件数を変更
  9.         $('.disp-number').change(function () {
  10.             var dispNumber = $(this).val();
  11.             $('#disp_number').val(dispNumber);
  12.             $('#pageno').val(1);
  13.             $("#form1").submit();
  14.         });
  15.     });
  16. </script>
  17. {% endblock %}
  18. {% block main %}
  19. <div
  20.         class="main-top">
  21.         {# ページタイトル #}
  22.         <div id="pagetitle">
  23.             <h2>
  24.                 STAFF BLOG
  25.                 <small>スタッフブログ</small>
  26.             </h2>
  27.             <div class="image">
  28.                 <img src="{{ asset('assets/assets/images/pagetitle-image-news.jpg') }}">
  29.             </div>
  30.         </div>
  31.         
  32.     </div>
  33.     <div
  34.         class="maincontents">
  35. <div class="ec-role">
  36.     {% if search_form.blogs_category_id.vars.errors|length > 0 %}
  37.     <div class="ec-searchnavRole">
  38.         <p class="errormsg text-danger">{{ 'ご指定のカテゴリは存在しません'|trans }}</p>
  39.     </div>
  40.     {% else %}
  41.     <div class="ec-searchnavRole">
  42.         <form name="form1" id="form1" method="get" action="?">
  43.             {% for item in search_form %}
  44.             <input type="hidden" id="{{ item.vars.id }}" name="{{ item.vars.full_name }}"
  45.                 {% if item.vars.value is not empty %}value="{{ item.vars.value }}" {% endif %} />
  46.             {% endfor %}
  47.         </form>
  48.         <div class="ec-searchnavRole__topicpath">
  49.             <ol class="ec-topicpath">
  50.                 <li class="ec-topicpath__item"><a href="{{ url('blogs42_list') }}">{{ '全て'|trans }}</a>
  51.                 </li>
  52.                 {% if Category is not null %}
  53.                 {% for Path in Category.path %}
  54.                 <li class="ec-topicpath__divider">|</li>
  55.                 <li class="ec-topicpath__item{% if loop.last %}--active{% endif %}"><a
  56.                         href="{{ url('blogs42_list') }}?blogs_category_id={{ Path.id }}">{{ Path.name }}</a>
  57.                 </li>
  58.                 {% endfor %}
  59.                 {% endif %}
  60.             </ol>
  61.         </div>
  62.         <div class="ec-searchnavRole__infos">
  63.             <div class="ec-searchnavRole__counter">
  64.                 {% if pagination.totalItemCount > 0 %}
  65.                 {{ '<span class="ec-font-bold">%count%件</span><span>の記事が見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  66.                 {% else %}
  67.                 <span>{{ 'お探しの記事は見つかりませんでした'|trans }}</span>
  68.                 {% endif %}
  69.             </div>
  70.             {% if pagination.totalItemCount > 0 %}
  71.             <div class="ec-searchnavRole__actions">
  72.                 <div class="ec-select">
  73.                     {{ form_widget(search_form.disp_number, {'id': '', 'attr': {'class': 'disp-number'}}) }}
  74.                 </div>
  75.             </div>
  76.             {% endif %}
  77.         </div>
  78.     </div>
  79.     {% if pagination.totalItemCount > 0 %}
  80.     <section id="news">
  81.                         <div class="contents">
  82.             {% for Blogs in pagination %}
  83.             <article>
  84.                             <a href="{{ url('blogs42_detail', {'id': Blogs.id}) }}">
  85. {# ご利用ガイドじゃない時のみ日付表示 #}
  86. {% if Blogs.BlogsCategories is not empty %}
  87. {% if Blogs.BlogsCategories[0].Category.path[0].name == 'ご利用ガイド' %}
  88. {% else %}
  89. <time>{{ Blogs.publish_date|date_format('', 'Y.m.d') }}</time>
  90. {% endif %}
  91. {% endif %}
  92. {# ご利用ガイドじゃない時のみ日付表示 ここまで #}
  93.                                     {% if Blogs.BlogsCategories is not empty %}
  94.                         <div class="cates">
  95.                             {% for BlogsCategories in Blogs.BlogsCategories %}
  96.                                 <p class="cate">
  97.                                         {% for Category in BlogsCategories.Category.path %}
  98.                                             {%- if loop.last == true %}
  99.                                             {{ Category.name }}
  100.                                             {% endif -%}
  101.                                         {% endfor %}
  102.                                     </p>
  103.                             {% endfor %}
  104.                     </div>
  105.                     {% endif %}
  106.                                     <p class="title">{{ Blogs.title|raw|nl2br }}</p>
  107.                                 </a>
  108.                             </article>
  109.            
  110.             {% endfor %}
  111.        </div>
  112.                     </section>
  113.     {% if pagination.paginationData.pageCount > 1 %}
  114.     <div class="ec-pagerRole">
  115.         {% include "pager.twig" with {'pages': pagination.paginationData} %}
  116.     </div>
  117.     {% endif %}
  118.     {% endif %}
  119.     {% endif %}
  120.     
  121. </div>
  122. </div>
  123. {% endblock %}