user panel
This commit is contained in:
parent
355355dcfc
commit
36fe3310a3
|
@ -61,12 +61,12 @@
|
||||||
<header class="navbar navbar-dark sticky-top admin bg-green flex-md-nowrap p-0 shadow">
|
<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>
|
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">DEVICEHUB</a>
|
||||||
<div class="navbar-nav navbar-sub-brand">
|
<div class="navbar-nav navbar-sub-brand">
|
||||||
PANGEA
|
{{ user.institution.name|upper }}
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-nav">
|
<div class="navbar-nav">
|
||||||
<div class="nav-item text-nowrap">
|
<div class="nav-item text-nowrap">
|
||||||
<i id="user-avatar" class="bi bi-person-circle"></i>
|
<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' %}">
|
<a class="logout" href="{% url 'login:logout' %}">
|
||||||
<i class="fa-solid fa-arrow-right-from-bracket"></i>
|
<i class="fa-solid fa-arrow-right-from-bracket"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -24,5 +24,6 @@ urlpatterns = [
|
||||||
path("evidence/", include("evidence.urls")),
|
path("evidence/", include("evidence.urls")),
|
||||||
path("device/", include("device.urls")),
|
path("device/", include("device.urls")),
|
||||||
path("admin/", include("admin.urls")),
|
path("admin/", include("admin.urls")),
|
||||||
|
path("user/", include("user.urls")),
|
||||||
path("lot/", include("lot.urls")),
|
path("lot/", include("lot.urls")),
|
||||||
]
|
]
|
||||||
|
|
|
@ -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 %}
|
|
@ -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 New Issue