listing.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {% extends 'base_no_card.html' %}
  2. {% load crispy_forms_tags %}
  3. {% load static %}
  4. {% block exted_menu %}
  5. {% for cat in page.wiki_cat %}
  6. <li class="nav-item"><a class="nav-link" href="{% url 'wiki_tag' cat.cw_titre_slgify %}">{{cat.cw_titre}}</a></li>
  7. {% endfor %}
  8. <li class="nav-item"><a class="nav-link" href="{% url 'wiki_tag' 'all' %}">Tous les pages</a></li>
  9. {% endblock %}
  10. {% block main %}
  11. <div class="card-columns p-3">
  12. {% for item in page.wiki_art %}
  13. <p><i class="fas fa-play"></i> <a href="{% url 'wiki_play' item.w_titre_slugify %}">{{item.w_titre|capfirst}}</a></p>
  14. {% empty %}
  15. <p>Pas de page de disponible</p>
  16. {% endfor %}
  17. </div>
  18. {% endblock %}
  19. {% block right_panel %}
  20. {% if page.p_right != "" %}
  21. <div class="card" style="background-color: rgba(250,250,250,0.88);" >
  22. <div class="card-body">
  23. <form action="" method="get">
  24. <div class="row align-items-center">
  25. <div class="col-lg-8 col-sm-12">
  26. {{page.wiki_search|crispy}}
  27. </div>
  28. <div class="col mt-sm-1">
  29. <input type="submit" class="btn btn-success w-100" value="Rechercher">
  30. </div>
  31. </div>
  32. </form>
  33. <hr>
  34. {% if page.wiki_art.paginator.num_pages != 1 %}
  35. <p class="card-text">
  36. <nav aria-label="...">
  37. <ul class="pagination justify-content-center">
  38. {% if page.wiki_art.has_previous %}
  39. <li class="page-item">
  40. <a class="page-link" href="?page={{ page.wiki_art.previous_page_number }}"> << </a>
  41. </li>
  42. {% else %}
  43. <li class="page-item disabled">
  44. <span class="page-link"> << </span>
  45. </li>
  46. {% endif %}
  47. {% for nw_page in page.wiki_art.nbpage %}
  48. {% if page.wiki_art.number == forloop.counter %}
  49. <li class="page-item active" aria-current="page"><span class="page-link">{{forloop.counter}}</span></li>
  50. {% else %}
  51. <li class="page-item"><a class="page-link" href="?page={{forloop.counter}}">{{forloop.counter}}</a></li>
  52. {% endif %}
  53. {% endfor %}
  54. {% if page.wiki_art.has_next %}
  55. <li class="page-item">
  56. <a class="page-link" href="?page={{ page.wiki_art.next_page_number }}"> >> </a>
  57. </li>
  58. {% else %}
  59. <li class="page-item disabled">
  60. <span class="page-link"> >> </span>
  61. </li>
  62. {% endif %}
  63. </ul>
  64. </nav>
  65. <p>
  66. {% endif %}
  67. <p class="card-text">{{page.p_right|safe}}</p>
  68. {% if page.groupe %}
  69. <h4> <i class="fas fa-tags"></i> Les Groupes </h4>
  70. <p class="card-text">
  71. {% for grp in page.groupe %}
  72. <a href="{{request.path}}?grp={{grp.g_nom_slugify}}" class="btn btn-dark mb-2" tabindex="-1" role="button" aria-disabled="true">{{grp.g_nom}}</a>
  73. {% endfor %}
  74. <a href="{{request.path}}" class="btn btn-dark mb-2" tabindex="-1" role="button" aria-disabled="true">Aucun</a>
  75. {% endif %}
  76. <h4> <i class="fas fa-tags"></i> Les Catégories </h4>
  77. <p class="card-text">
  78. {% for cat in page.wiki_cat %}
  79. <a href="{% url 'wiki_tag' cat.cw_titre_slgify %}" class="btn btn-dark mb-2" tabindex="-1" role="button" aria-disabled="true">{{cat.cw_titre}}</a>
  80. {% endfor %}
  81. {% if page.wiki_filter == True %}
  82. <a href="{% url 'wiki_index' %}" class="btn btn-danger mb-2" tabindex="-1" role="button" aria-disabled="true"><i class="fas fa-filter text-white"></i> Retirer les filtres</a>
  83. {% else %}
  84. <a href="{% url 'wiki_tag' 'all' %}" class="btn btn-dark mb-2" tabindex="-1" role="button" aria-disabled="true">Tous les pages</a>
  85. {% endif %}
  86. </p>
  87. <h4> <i class="fas fa-bomb"></i> Les pages les plus consulté </h4>
  88. <p class="card-text">
  89. {% for item in page.wiki_top10 %}
  90. <i class="far fa-play-circle"></i> <a class="text-dark" data-bs-toggle="tooltip" data-bs-placement="top" title="{{item.w_titre}}" href="{% url 'wiki_play' item.w_titre_slugify %}">{{item.w_titre|truncatechars:40}}</a><br>
  91. {% endfor %}
  92. </p>
  93. {% if page.retour %}
  94. <p class="card-text">
  95. <a href="{% url page.retour %}" class="btn btn-dark mb-2" tabindex="-1" role="button" aria-disabled="true"><i class="fas fa-undo-alt"></i> Retour</a>
  96. </p>
  97. {% endif %}
  98. </div>
  99. </div>
  100. {% endif %}
  101. {% endblock %}