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

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

parent 7a0e6b0e
......@@ -15,8 +15,8 @@
<title>{% block title %} University {% endblock %}</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="{% url 'webapp:courses_list' %}">Navbar</a>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<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">
<span class="navbar-toggler-icon"></span>
</button>
......@@ -57,12 +57,14 @@
</div>
{% endif %}
</nav>
<div class="row d-flex">
<div class="row d-flex" style="margin-top: 50px;">
<div class="sidebar col-2">
{% if perms.webapp.add_course %}
<a href="{% url 'webapp:course_create' %}">Create new Course </a>
<a href="#services">Button 1</a>
<a href="#clients">Button 2</a>
<a href="#contact">Button 3</a>
{% endif %}
<a href="#services">News of University</a>
<a href="#">Stats</a>
<a href="#">Dashboard</a>
</div>
<div class="content-wrapper col-9">
......
......@@ -24,5 +24,10 @@
</div>
</div>
{% endfor %}
<div>
</div>
<div class="d-flex pagination justify-content-center">
{% if is_paginated %}
{% include "partial/pagination.html" %}
{% endif %}
</div>
{% 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