listing.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. <h4> <i class="fas fa-tags"></i> Les Catégories </h4>
  69. <p class="card-text">
  70. {% for cat in page.wiki_cat %}
  71. <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>
  72. {% endfor %}
  73. {% if page.wiki_filter == True %}
  74. <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>
  75. {% else %}
  76. <a href="{% url 'wiki_tag' 'all' %}" class="btn btn-dark mb-2" tabindex="-1" role="button" aria-disabled="true">Tous les pages</a>
  77. {% endif %}
  78. </p>
  79. <h4> <i class="fas fa-bomb"></i> Les pages les plus consulté </h4>
  80. <p class="card-text">
  81. {% for item in page.wiki_top10 %}
  82. <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>
  83. {% endfor %}
  84. </p>
  85. {% if page.retour %}
  86. <p class="card-text">
  87. <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>
  88. </p>
  89. {% endif %}
  90. </div>
  91. </div>
  92. {% endif %}
  93. {% endblock %}