user-panel #9

Merged
cayop merged 25 commits from user-panel into main 2024-10-11 14:26:36 +00:00
5 changed files with 38 additions and 4 deletions
Showing only changes of commit 0a9596d33b - Show all commits

View File

@ -61,12 +61,12 @@
<header class="navbar navbar-dark sticky-top admin bg-green flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">DEVICEHUB</a>
<div class="navbar-nav navbar-sub-brand">
PANGEA
{{ user.institution.name|upper }}
</div>
<div class="navbar-nav">
<div class="nav-item text-nowrap">
<i id="user-avatar" class="bi bi-person-circle"></i>
<a class="navbar-sub-brand px-3" href="#">{{ user.email }}</a>
<a class="navbar-sub-brand px-3" href="{% url 'user:panel' %}">{{ user.email }}</a>
<a class="logout" href="{% url 'login:logout' %}">
<i class="fa-solid fa-arrow-right-from-bracket"></i>
</a>

View File

@ -24,5 +24,6 @@ urlpatterns = [
path("evidence/", include("evidence.urls")),
path("device/", include("device.urls")),
path("admin/", include("admin.urls")),
path("user/", include("user.urls")),
path("lot/", include("lot.urls")),
]

18
user/templates/panel.html Normal file
View File

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<div class="row mb-3">
<div class="col">
<h3>{{ subtitle }}</h3>
</div>
<div class="col text-center">
{{ user.email }}
</div>
</div>
<div class="row">
</div>
{% endblock %}

8
user/urls.py Normal file
View File

@ -0,0 +1,8 @@
from django.urls import path
from user import views
app_name = 'user'
urlpatterns = [
path("panel/", views.PanelView.as_view(), name="panel"),
]

View File

@ -1,3 +1,10 @@
from django.shortcuts import render
from django.utils.translation import gettext_lazy as _
from django.views.generic.base import TemplateView
from dashboard.mixins import DashboardView
# Create your views here.
class PanelView(DashboardView, TemplateView):
template_name = "panel.html"
title = _("User")
breadcrumb = "User / Panel"
subtitle = "User panel"