Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coursework
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Борис Ким
coursework
Commits
fdfd8013
Commit
fdfd8013
authored
Nov 04, 2021
by
Борис Ким
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил пагинацию
parent
7a0e6b0e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
7 deletions
+26
-7
base.html
source/webapp/templates/base.html
+8
-6
courses_list.html
source/webapp/templates/courses/courses_list.html
+6
-1
pagination.html
source/webapp/templates/partial/pagination.html
+12
-0
No files found.
source/webapp/templates/base.html
View file @
fdfd8013
...
@@ -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"
>
...
...
source/webapp/templates/courses/courses_list.html
View file @
fdfd8013
...
@@ -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
source/webapp/templates/partial/pagination.html
0 → 100644
View file @
fdfd8013
<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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment