Advertisement
themaleem

registrations.html

Jul 14th, 2023 (edited)
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1. {% extends "users/base_student.html" %}
  2.  
  3. {% block student_content %}
  4. {% load static %}
  5. <!-- Main content START -->
  6. <div class="col-xl-9">
  7. <div class="card bg-transparent border border-2 border-purple rounded-3">
  8. <!-- Card header START -->
  9. <div class="card-header bg-purple border-bottom">
  10. <h3 class="mb-0 text-white">Module Registrations</h3>
  11. </div>
  12. <!-- Card header END -->
  13.  
  14. <!-- Card body START -->
  15. <div class="card-body">
  16. {% for registration in paginated_registrations %}
  17. <article class="media content-section">
  18. <div class="media-body">
  19. <h3><a class="article-title" href="{% url 'studentregistration:module_details' registration.module.code %}" >{{ registration.module.name}}
  20. ({{ registration.module.code }})</a></h3>
  21. <p class="article-content">Registration date: {{ registration.registration_date }}</p>
  22. <a class="btn btn-danger btn-sm mt-1 mb-1" href="{% url 'studentregistration:unregister' registration.module.code %}">
  23. Unregister
  24. </a>
  25. </div>
  26. </article>
  27. <hr class="border-purple">
  28. {% endfor %}
  29. <!-- Pagination START -->
  30. <div class="d-sm-flex justify-content-sm-between align-items-sm-center mt-4 mt-sm-3">
  31. <!-- Content -->
  32. <p class="mb-0 text-center text-purple text-sm-start"><b>Page {{ paginated_registrations.number }}
  33. of {{ paginated_registrations.paginator.num_pages }}</b></p>
  34. <!-- Pagination -->
  35. <nav class="d-flex justify-content-center mb-0" aria-label="navigation">
  36. <ul class="pagination pagination-sm pagination-primary-soft d-inline-block d-md-flex rounded mb-0">
  37. {% if paginated_registrations.has_previous %}
  38. <li class="page-item mb-0">
  39. <a class="page-link"
  40. href="{% url 'studentregistration:registrations' %}?page={{ paginated_registrations.previous_page_number }}"
  41. tabindex="-1">
  42. <i class="fas fa-angle-left"></i>
  43. </a>
  44. </li>
  45. {% endif %}
  46. {% for num_page in paginated_registrations.paginator.page_range %}
  47. {% if paginated_registrations.number == num_page %}
  48. <li class="page-item mb-0 active"><a class="page-link"
  49. href="{% url 'studentregistration:registrations' %}?page={{ num_page }}">{{ num_page }}</a>
  50. </li>
  51. {% else %}
  52. <li class="page-item mb-0"><a class="page-link"
  53. href="{% url 'studentregistration:registrations' %}?page={{ num_page }}">{{ num_page }}</a>
  54. </li>
  55. {% endif %}
  56. {% endfor %}
  57. {% if paginated_registrations.has_next %}
  58. <li class="page-item mb-0"><a class="page-link"
  59. href="{% url 'studentregistration:registrations' %}?page={{ paginated_registrations.next_page_number }}"><i
  60. class="fas fa-angle-right"></i></a>
  61. </li>
  62. {% endif %}
  63. </ul>
  64. </nav>
  65. </div>
  66. <!-- Pagination END -->
  67. </div>
  68. <!-- Card body END -->
  69. </div>
  70.  
  71. </div>
  72. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement