templates/questionAnswer/searchResult.html.twig line 1

Open in your IDE?
  1. <section id="sectionQuestionAnswers" class="question-answer col resultats resultats-recherche">
  2.     <h2>Des questions / réponses</h2>
  3.     {% if listWithThumbnails %}
  4.         {% import "common/listWithImages.html.twig" as listWithImages %}
  5.         <div class="row questionAnswers-list with-images">
  6.             {% for questionAnswer in questionAnswers %}
  7.                 <div class="col-sm-6 col-md-4 col-lg-3 article with-image 
  8.                     {% if type is defined %}{{ type }}{% endif %}
  9.                 ">
  10.                     <a style="display:block" href="{{ path('showQuestionAnswerBySlug', {slug:questionAnswer.slug}) }}">
  11.                         <div class="post-medias">
  12.                             {{ listWithImages.showOneImage(questionAnswer) }}
  13.                         </div>
  14.                         <p>
  15.                             {# <span class="date">{{ questionAnswer.createdAt|date("d/m/Y") }}</span>
  16.                             <span class="tags">{{ questionAnswer.tags|join(', ') }}</span>
  17.                             <br/> #}
  18.                             <span class="title">
  19.                                 {{ questionAnswer.title }}
  20.                                 {# {{ questionAnswer.title|raw|striptags|slice(0,30) }}
  21.                                 {% if questionAnswer.title|raw|striptags|length > 30 %}...{% endif %} #}
  22.                             </span>
  23.                         </p>
  24.                     </a>
  25.                 </div>
  26.             {% endfor %}
  27.         </div>            
  28.     {% else %}
  29.         <ul class="questionAnswersList">
  30.             {% for key, questionAnswer in questionAnswers %}
  31.                 <li>
  32.                     <a href="{{ path('showQuestionAnswerBySlug', { 'slug':questionAnswer.slug }) }}">
  33.                         {{ questionAnswer.title}} {% if is_granted('ROLE_EDITOR') %}(priorité : {{ questionAnswer.priority }}){% endif %} 
  34.                     </a>
  35.                 </li>
  36.             {% endfor %}
  37.         </ul>
  38.     {% endif %}
  39. </section>