templates/search/keyword.html.twig line 1

  1. {% extends 'layout.html.twig' %}
  2. {% block layout %}
  3. <div class="row">
  4. <!-- NAVBAR LATERALE -->
  5. <div class="d-lg-block col-lg-3">
  6. <div class="list-group" style="position:sticky;top:25px;">
  7. <a href="{{ path('keyword', {keyword: keyword.id, categorie: null}) }}" class="list-group-item list-group-item-action {% if null == categoryRequest %} active {% endif %}">
  8. Toutes les catégories
  9. </a>
  10. <a href="{{ path('keyword', {keyword: keyword.id, categorie: 'jurisprudences'}) }}" class="list-group-item list-group-item-action {% if 'jurisprudences' == categoryRequest %} active {% endif %}">
  11. Les jurisprudences
  12. </a>
  13. <a href="{{ path('keyword', {keyword: keyword.id, categorie: 'infos'}) }}" class="list-group-item list-group-item-action {% if 'infos' == categoryRequest %} active {% endif %}">
  14. Les actualités
  15. </a>
  16. <a href="{{ path('keyword', {keyword: keyword.id, categorie: 'tutos'}) }}" class="list-group-item list-group-item-action {% if 'tutos' == categoryRequest %} active {% endif %}">
  17. La Base
  18. </a>
  19. </div>
  20. </div>
  21. <div class="col-lg-9 col-12">
  22. <h2>Mot clé : {{keyword.keyword}}</h2>
  23. <div class="row">
  24. {% for data in dataContent %}
  25. <div class="col-sm-12 col-lg-6" style="padding-bottom: 30px;">
  26. <div class="card" style="border: 1px solid black; height: 100%; min-height: 215px;">
  27. <h5 class="card-header">
  28. <strong>
  29. {{ data.title }}
  30. </strong>
  31. </h5>
  32. <div class="card-body">
  33. <p class="card-text">
  34. <i>
  35. {{ data.content|length > 200 ? data.content|slice(0,200)|raw : data.content|raw }}
  36. {{ data.content|length > 200 ? '...' : ''}}
  37. </i>
  38. </p>
  39. </div>
  40. <div class="card-footer">
  41. {% if data.type == 'tuto' %}
  42. <a href="{{ path('tuto_read', {tutoId: data.id}) }}" style="float:right" class="btn btn-primary">
  43. Lire le tuto
  44. </a>
  45. {% elseif data.type == 'news' %}
  46. <a href="{{ path('news_read', {actuId: data.id}) }}" style="float:right" class="btn btn-primary">
  47. Lire l'actu
  48. </a>
  49. {% else %}
  50. <a href="{{ path('jurisprudence_show', {jurisprudenceId: data.id}) }}" style="float:right" class="btn btn-primary">
  51. Consulter la jurisprudence
  52. </a>
  53. {% endif %}
  54. </div>
  55. </div>
  56. </div>
  57. {% endfor %}
  58. </div>
  59. </div>
  60. </div>
  61. {% endblock %}