user-panel #9
|
@ -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>
|
||||
|
|
|
@ -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
18
user/templates/panel.html
Normal 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
8
user/urls.py
Normal 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"),
|
||||
]
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue