Commit fdfd8013 authored by Борис Ким's avatar Борис Ким

Добавил пагинацию

parent 7a0e6b0e
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
<title>{% block title %} University {% endblock %}</title> <title>{% block title %} University {% endblock %}</title>
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="{% url 'webapp:courses_list' %}">Navbar</a> <a class="navbar-brand" href="{% url 'webapp:courses_list' %}" style="color: #9C4854;">B-University</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
...@@ -57,12 +57,14 @@ ...@@ -57,12 +57,14 @@
</div> </div>
{% endif %} {% endif %}
</nav> </nav>
<div class="row d-flex"> <div class="row d-flex" style="margin-top: 50px;">
<div class="sidebar col-2"> <div class="sidebar col-2">
{% if perms.webapp.add_course %}
<a href="{% url 'webapp:course_create' %}">Create new Course </a> <a href="{% url 'webapp:course_create' %}">Create new Course </a>
<a href="#services">Button 1</a> {% endif %}
<a href="#clients">Button 2</a> <a href="#services">News of University</a>
<a href="#contact">Button 3</a> <a href="#">Stats</a>
<a href="#">Dashboard</a>
</div> </div>
<div class="content-wrapper col-9"> <div class="content-wrapper col-9">
......
...@@ -24,5 +24,10 @@ ...@@ -24,5 +24,10 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
<div> </div>
<div class="d-flex pagination justify-content-center">
{% if is_paginated %}
{% include "partial/pagination.html" %}
{% endif %}
</div>
{% endblock %} {% endblock %}
\ No newline at end of file
<div class="pagination">
<span class="step_links">
<a class="btn btn-sm btn-info" href="?page=1"> To start </a>
{% if page_obj.has_previous %}
<a class="btn btn-sm btn-light" href="?page={{ page_obj.previous_page_number }}"> <<-- </a>
{% endif %}
{% if page_obj.has_next %}
<a class="btn btn-sm btn-light" href="?page={{ page_obj.next_page_number }}"> -->> </a>
{% endif %}
<a class="btn btn-sm btn-info" href="?page={{ page_obj.paginator.num_pages }}"> To end </a>
</span>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment