Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
library-app-django
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
Ilham Maulana
library-app-django
Commits
0f47a8ec
Commit
0f47a8ec
authored
Aug 12, 2024
by
impfundev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: new sidebar layout
parent
2d980b2c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
74 deletions
+85
-74
layout.html
dashboard/templates/layout.html
+1
-53
profile.html
dashboard/templates/profile.html
+0
-21
sidebar.html
dashboard/templates/sidebar.html
+84
-0
No files found.
dashboard/templates/layout.html
View file @
0f47a8ec
...
@@ -4,59 +4,7 @@
...
@@ -4,59 +4,7 @@
class=
"w-100 h-100 bg-body-secondary d-flex justify-content-end"
class=
"w-100 h-100 bg-body-secondary d-flex justify-content-end"
>
>
<div
{% include "sidebar.html" %}
class=
"w-100 p-4 d-flex flex-column gap-4 bg-dark"
style=
"max-width: 20vw"
>
{% include "profile.html" %}
<div
class=
"d-flex flex-column gap-2"
>
<a
href=
"/dashboard"
class=
"btn {% if request.path == '/dashboard/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-columns-gap"
></i>
Dashboard
</a
>
<a
href=
"/books"
class=
"btn {% if request.path == '/books/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-book-half"
></i>
Books
</a
>
<a
href=
"/books/categories"
class=
"btn {% if request.path == '/books/categories/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-tags-fill"
></i>
Categories
</a
>
<a
href=
"/users/members"
class=
"btn {% if request.path == '/users/members/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-person-vcard"
></i>
Members
</a
>
<a
href=
"/users/librarians"
class=
"btn {% if request.path == '/users/librarians/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-person-fill-lock"
></i>
Librarian
</a
>
<a
href=
"/book-loans"
class=
"btn {% if request.path == '/book-loans/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-calendar-week"
></i>
Book Loans
</a
>
<a
href=
"/upcoming-loans/"
class=
"btn {% if request.path == '/upcoming-loans/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-calendar2-event"
></i>
Near Outstanding Loans
</a
>
<a
href=
"/overdued-loans/"
class=
"btn {% if request.path == '/overdued-loans/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-calendar2-x"
></i>
Overdued Loans
</a
>
<a
href=
"/users/librarians/login-history/"
class=
"btn {% if request.path == '/users/librarians/login-history/' %}btn-primary{% else %}btn-outline-primary border-white text-white{% endif %} text-start w-100"
><i
class=
"bi bi-clock-history"
></i>
Login History
</a
>
</div>
</div>
<div
style=
"max-height: 100vh"
class=
"w-100 overflow-y-auto"
>
<div
style=
"max-height: 100vh"
class=
"w-100 overflow-y-auto"
>
{% block dashboard %}{% endblock dashboard %}
{% block dashboard %}{% endblock dashboard %}
...
...
dashboard/templates/profile.html
deleted
100644 → 0
View file @
2d980b2c
<div
class=
"d-flex flex-column gap-2"
>
<button
class=
"w-100 btn btn-primary text-start d-flex justify-content-center gap-2"
type=
"button"
data-bs-toggle=
"dropdown"
>
<i
class=
"bi bi-person-circle"
></i>
{% if user %}
<span
class=
"text-truncate"
>
{{ user.username }}
</span>
{% endif %}
</button>
<a
class=
"w-100 btn btn-outline-primary border-white text-white text-start"
href=
"/users/librarians/{{ librarian_id }}/"
><i
class=
"bi bi-person-fill-gear"
></i>
profile
</a
>
<a
class=
"w-100 btn btn-outline-primary border-white text-white text-start"
href=
"/users/auth/logout/"
><i
class=
"bi bi-box-arrow-left"
></i>
logout
</a
>
<hr
class=
"border-white"
/>
</div>
dashboard/templates/sidebar.html
0 → 100644
View file @
0f47a8ec
<div
class=
"d-flex flex-column flex-shrink-0 p-3 bg-light"
style=
"width: 280px;"
>
<div
class=
"d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none"
>
<svg
class=
"bi me-2"
width=
"40"
height=
"32"
><use
xlink:href=
"#bootstrap"
/></svg>
<span
class=
"fs-4"
>
Library App Backoffice
</span>
</div>
<hr>
<ul
class=
"nav nav-pills flex-column mb-auto"
>
<li>
<a
href=
"/dashboard"
class=
"nav-link {% if request.path == '/dashboard/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-speedometer"
></i>
Dashboard
</a>
</li>
<li>
<a
href=
"/books"
class=
"nav-link {% if request.path == '/books/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-book-half"
></i>
Books
</a
>
</li>
<li>
<a
href=
"/books/categories"
class=
"nav-link {% if request.path == '/books/categories/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-tags-fill"
></i>
Categories
</a
>
</li>
<li>
<a
href=
"/users/members"
class=
"nav-link {% if request.path == '/users/members/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-person-vcard"
></i>
Members
</a
>
</li>
<li>
<a
href=
"/users/librarians"
class=
"nav-link {% if request.path == '/users/librarians/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-person-fill-lock"
></i>
Librarian
</a
>
</li>
<li>
<a
href=
"/book-loans"
class=
"nav-link {% if request.path == '/book-loans/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-calendar-week"
></i>
Book Loans
</a
>
</li>
<li>
<a
href=
"/upcoming-loans/"
class=
"nav-link {% if request.path == '/upcoming-loans/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-calendar2-event"
></i>
Near Outstanding Loans
</a
>
</li>
<li>
<a
href=
"/overdued-loans/"
class=
"nav-link {% if request.path == '/overdued-loans/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-calendar2-x"
></i>
Overdued Loans
</a
>
</li>
<li>
<a
href=
"/users/librarians/login-history/"
class=
"nav-link {% if request.path == '/users/librarians/login-history/' %}active{% else %}link-dark{% endif %} text-start w-100"
><i
class=
"bi bi-clock-history"
></i>
Login History
</a
>
</li>
</ul>
<hr>
<div
class=
"dropdown"
>
{% if user %}
<a
href=
"#"
class=
"d-flex align-items-center link-dark text-decoration-none dropdown-toggle"
id=
"dropdownUser2"
data-bs-toggle=
"dropdown"
aria-expanded=
"false"
>
<strong>
{{ user.username }}
</strong>
</a>
<ul
class=
"dropdown-menu text-small shadow"
aria-labelledby=
"dropdownUser2"
>
<li><a
class=
"dropdown-item"
href=
"/users/librarians/{{ librarian_id }}/"
>
Profile
</a></li>
<li><hr
class=
"dropdown-divider"
></li>
<li><a
class=
"dropdown-item"
href=
"/users/auth/logout/"
>
Sign out
</a></li>
</ul>
{% endif %}
</div>
</div>
\ No newline at end of file
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