Version 1.0

This commit is contained in:
2024-10-09 21:10:49 +02:00
commit 03efc31923
620 changed files with 67495 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai aggiungendo gli accessori al bundle</h3>
<form action="/add/accessory" method="post" class="pure-form pure-form-2 pure-form-stacked width-100">
{% csrf_token %}
<div class="form-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Aggiungi</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,30 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!<p>
</div>
{% endif %}
<h3>Stai aggiungendo un bundle</h3>
<form action="/add/bundle" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100">
{{ form }}
</div>
<br>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Aggiungi</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
<script src="{% static 'js/toggleFields.js' %}"></script>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,28 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
L'inserimento è incompleto o errato!
</div>
{% endif %}
<h3>Stai aggiungendo un corso</h3>
<form action="/add/course" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Aggiungi</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,30 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>{{ err_str }}</p>
</div>
{% endif %}
<div class="benvenuto">
<h3>Stai aggiungendo un seriale al bundle</h3>
</div>
<form action="/add/serial" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100">
{{ form_serial }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Aggiungi</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
<script src="{% static 'js/stopForm.js' %}"></script>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,29 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai aggiungendo un fornitore</h3>
<form action="/add/supplier" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Aggiungi</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai aggiungendo un ticket</h3>
<form action="/add/ticket" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100 textarea-no-resize">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Aggiungi</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,44 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div>
<div>
<div class="margin-tb-2rem">
<h3>Cosa vuoi assegnare?</h3>
</div>
<div class="flex jc-space-evenly-center">
<a href="/assignment/computer">
<div class="link-card">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-laptop"
viewBox="0 0 16 16">
<path d="M13.5 3a.5.5 0 0 1 .5.5V11H2V3.5a.5.5 0 0 1 .5-.5zm-11-1A1.5 1.5 0 0 0 1 3.5V12h14V3.5A1.5 1.5 0 0 0 13.5 2zM0 12.5h16a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 0 12.5"/>
</svg>
Computer
</div>
</a>
<a href="/assignment/accessory">
<div class="link-card">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-mouse3"
viewBox="0 0 16 16">
<path d="M7 0q-.891.002-1.527.463c-.418.302-.717.726-.93 1.208C4.123 2.619 4 3.879 4 5.187v.504L3.382 6A2.5 2.5 0 0 0 2 8.236v2.576C2 13.659 4.22 16 7 16h2c2.78 0 5-2.342 5-5.188V5.186c0-1.13-.272-2.044-.748-2.772-.474-.726-1.13-1.235-1.849-1.59C9.981.123 8.26 0 7 0m2.5 6.099V1.232c.51.11 1.008.267 1.46.49.596.293 1.099.694 1.455 1.24.355.543.585 1.262.585 2.225v1.69zm-1-5.025v4.803L5 5.099c.006-1.242.134-2.293.457-3.024.162-.366.363-.63.602-.801C6.292 1.105 6.593 1 7 1c.468 0 .98.018 1.5.074M5 6.124 13 7.9v2.912C13 13.145 11.19 15 9 15H7c-2.19 0-4-1.855-4-4.188V8.236a1.5 1.5 0 0 1 .83-1.342l.187-.093c.01.265.024.58.047.92.062.938.19 2.12.462 2.937a.5.5 0 1 0 .948-.316c-.227-.683-.35-1.75-.413-2.688a29 29 0 0 1-.06-1.528v-.002z"/>
</svg>
Accessorio
</div>
</a>
</div>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,31 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if success == True %}
<div>
<p>Accessorio assegnato con successo!</p>
</div>
{% endif %}
{% if err == True %}
<div>
<p>{{ err_str }}</p>
</div>
{% endif %}
<form action="/assignment/accessory" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Assegna</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,31 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if success == True %}
<div>
<p>Computer assegnato con successo!</p>
</div>
{% endif %}
{% if err == True %}
<div>
<p>{{ err_str }}</p>
</div>
{% endif %}
<form action="/assignment/computer" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Assegna</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,59 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
{% if user.is_authenticated %}
<nav>
<div class="pure-menu pure-menu-horizontal">
<a href="/" class="pure-menu-heading pure-menu-link"><img src="{% static 'images/xlogo-itsaltoadriatico.svg' %}" width="150px"></a>
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="/storage" class="pure-menu-link">Magazzino</a>
</li>
<li class="pure-menu-item">
<a href="/suppliers" class="pure-menu-link">Fornitori</a>
</li>
<li class="pure-menu-item">
<a href="/courses" class="pure-menu-link">Corsi</a>
</li>
<li class="pure-menu-item">
<a href="/students" class="pure-menu-link">Studenti</a>
</li>
<li class="pure-menu-item">
<a href="/assignment" class="pure-menu-link">Assegnazione</a>
</li>
<li class="pure-menu-item">
<a href="/tickets" class="pure-menu-link">Tickets</a>
</li>
<li class="pure-menu-item">
<a href="/accounts/logout" class="pure-menu-link">Log Out</a>
</ul>
</div>
</nav>
{% else %}
<div>
<h1>You are not authenticated</h1>
<a href="{% url 'login' %}" class="button-xlarge pure-button">Log In</a>
</div>
{% endif %}
<div class="content">
{% block content %}
{% endblock %}
</div>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<h3>Sei sicuro di cancellare l'accessorio {{ id }}?</h3>
<form method="post" action="/delete/accessory/{{ id }}">
{% csrf_token %}
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/details/bundle/{{ id_bundle }}" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,26 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<h3>Sei sicuro di cancellare il bundle {{ id }}?</h3>
<form method="post" action="/delete/bundle/{{ id }}">
{% csrf_token %}
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,23 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<h3>Sei sicuro di cancellare il computer {{ id }}?</h3>
<form method="post" action="/delete/computer/{{ id }}">
{% csrf_token %}
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/details/bundle/{{ id_bundle }}" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,25 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<h3>Sei sicuro di cancellare il corso {{ id }}?</h3>
<form method="post" action="/delete/corso/{{ id }}">
{% csrf_token %}
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/details/bundle/{{ id_bundle }}" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,29 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<p>Stai dimettendo: {{ student }}</p>
<form method="post" action="/delete/student/{{ id }}" class="pure-form pure-form-stacked">
{% csrf_token %}
<div class="form-content delete-card-w100-ai-center">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Accetta</button>
<a href="/details/course/{{ course.id }}" class="pure-button pure-button-primary">Rifiuta</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,25 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<h3>Sei sicuro di cancellare il fornitore {{ id }}?</h3>
<form method="post" action="/delete/supplier/{{ id }}">
{% csrf_token %}
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/suppliers" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,26 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<h3>Sei sicuro di chiudere il ticket {{ id }}?</h3>
<form method="post" action="/delete/ticket/{{ id }}">
{% csrf_token %}
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/tickets" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,181 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="detail-content">
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<th>Id Prodotto</th>
<th>Tipo Prodotto</th>
<th>Nome Prodotto</th>
<th>Qt. Prodotto</th>
<th>Qt. Disponibile</th>
<th>Note</th>
<th>Brand</th>
<th>Linea</th>
<th>Cpu</th>
<th>Ram</th>
<th>Storage</th>
<th>Prezzo</th>
<th>Data di Consegna</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ bundle.id }}</td>
<td>{{ bundle.product_type }}</td>
<td>{{ bundle.product_name }}</td>
<td>{{ bundle.qt }}</td>
<td>{{ bundle.qt_available }}</td>
<td>{{ bundle.notes }}</td>
<td>{{ bundle.brand }}</td>
<td>{{ bundle.line }}</td>
<td>{{ bundle.cpu }}</td>
<td>{{ bundle.ram }}</td>
<td>{{ bundle.storage_size }}</td>
<td>{{ bundle.price }}</td>
<td>{{ bundle.delivery_date }}</td>
</tr>
</tbody>
</table>
<ul class="margin-tb-2rem">
<li>
Fornitore: {{ supplier }}
</li>
</ul>
{% if bundle_type == "Computer" %}
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Computer</td>
<td>Nome Studente</td>
<td>Status</td>
<td>Data di Assegnazione</td>
<td>Motivazione di Assegnazione</td>
<td>Data di Restituzione</td>
<td>Motivazione di Restituzione</td>
<td>Eol</td>
<td>Data Eol</td>
<td>Note</td>
<td>Cespite</td>
<td>Seriale</td>
<td>Azioni</td>
</tr>
</thead>
<tbody>
{% for computer in computers %}
<tr>
<td> {{ computer.id }}</td>
<td> {{ computer.id_student.first_name }} {{ computer.id_student.last_name }}</td>
<td> {{ computer.status }}</td>
<td> {{ computer.assignment_date }}</td>
<td> {{ computer.assignment_motivation }}</td>
<td> {{ computer.return_date }}</td>
<td> {{ computer.return_motivation }}</td>
<td> {{ computer.eol }}</td>
<td> {{ computer.eol_date }}</td>
<td> {{ computer.notes }}</td>
<td> {{ computer.cespite }}</td>
<td> {{ computer.serial }}</td>
<td>
<a href="/edit/computer/{{ computer.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/computer/{{ computer.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
{% if computer.status != "in_stock" %}
<a href="/reset/computer/{{ computer.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z"/>
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466"/>
</svg>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% elif bundle_type == "Accessory" %}
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Accessorio</td>
<td>Descrizione</td>
<td>Nome Studente</td>
<td>Status</td>
<td>Data di Assegnazione</td>
<td>Motivazione di Assegnazione</td>
<td>Data di Restituzione</td>
<td>Motivazione di Restituzione</td>
<td>Note</td>
<td>Azioni</td>
</tr>
</thead>
<tbody>
{% for accessory in accessories %}
<tr>
<td> {{ accessory.id }}</td>
<td> {{ accessory.description }}</td>
<td> {{ accessory.id_student.first_name }} {{ accessory.id_student.last_name }}</td>
<td> {{ accessory.status }}</td>
<td> {{ accessory.assignment_date }}</td>
<td> {{ accessory.assignment_motivation }}</td>
<td> {{ accessory.return_date }}</td>
<td> {{ accessory.return_motivation }}</td>
<td> {{ accessory.notes }}</td>
<td>
<a href="/edit/accessory/{{ accessory.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/accessory/{{ accessory.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
{% if accessory.status != "in_stock" %}
<a href="/reset/accessory/{{ accessory.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z"/>
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466"/>
</svg>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,103 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="detail-content">
<table class="pure-table pure-table-horizontal width-100 margin-tb-2rem">
<thead>
<tr>
<td>Id Corso</td>
<td>Nome Corso</td>
<td>Nome Corso esteso</td>
<td>Anno Corso</td>
<td>Numero Studenti</td>
<td>Posizione Corso</td>
<td>Status Corso</td>
</tr>
</thead>
<tbody>
<tr>
<td>{{ course.id }}</td>
<td>{{ course.course_name }}</td>
<td>{{ course.course_name_extended }}</td>
<td>{{ course.course_year }}</td>
<td>{{ course.student_number }}</td>
<td>{{ course.course_location }}</td>
<td>{{ course.course_status }}</td>
</tr>
</tbody>
</table>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Studente</td>
<td>Immagine Profilo</td>
<td>Nome</td>
<td>Cognome</td>
<td>Data di Nascita</td>
<td>Codice Fiscale</td>
<td>Sesso</td>
<td>Numero di Telefono</td>
<td>Comune di Residenza</td>
<td>Provincia di Residenza</td>
<td>Data di Dimissioni</td>
<td>Status Studente</td>
<td>Azioni</td>
</tr>
</thead>
<tbody>
{% for student in students %}
{% if student.resignation_date == None %}
<tr>
<td>{{ student.id }}</td>
<td><img src="/media/{{ student.profile_image }}" alt="profile_image"></td>
<td>{{ student.first_name }}</td>
<td>{{ student.last_name }}</td>
<td>{{ student.birth_date }}</td>
<td>{{ student.codice_fiscale }}</td>
<td>{{ student.gender }}</td>
<td>{{ student.phone_number }}</td>
<td>{{ student.municipality_residence }}</td>
<td>{{ student.province_residence }}</td>
<td>{{ student.resignation_date }}</td>
<td>{{ student.student_status }}</td>
<td>
<a href="/details/student/{{ student.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>
</a>
<a href="/edit/student/{{ student.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/student/{{ student.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,169 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="detail-content">
<div class="flex jc-space-evenly-center">
<div>
<ul class="pure-ul">
<li>Immagine Profilo: <img src="/media/{{ student.profile_image }}" alt="profile_image"></li>
</ul>
</div>
<div>
<ul class="pure-ul">
<li>Id Student: {{ student.id }}</li>
<li>Nome: {{ student.first_name }}</li>
<li>Cognome: {{ student.last_name }}</li>
<li>Data di Nascita: {{ student.birth_date }}</li>
<li>Codice Fiscale: {{ student.codice_fiscale }}</li>
<li>Sesso: {{ student.gender }}</li>
<li>Id Studente Corso: {{ student.id_student_course }}</li>
<li>Sigla Corso: {{ student.course_acronym }}</li>
</ul>
</div>
<div>
<ul class="pure-ul">
<li>Email Studente: {{ student.email_user }}</li>
<li>Numero di Telefono: {{ student.phone_number }}</li>
<li>Comune di Residenza: {{ student.municipality_residence }}</li>
<li>Provincia di Residenza: {{ student.province_residence }}</li>
<li>Comune di Nascita: {{ student.municipality_birth }}</li>
<li>Provincia di Nascita: {{ student.province_birth }}</li>
<li>Nazione di Nascita: {{ student.nation_birth }}</li>
<li>Data di Dimissioni: {{ student.resignation_date }}</li>
<li>Status Studente: {{ student.student_status }}</li>
<li>Corso: {{ student.course_id }}</li>
</ul>
</div>
</div>
<div class="margin-tb-2rem">
<h3>Computer assegnati</h3>
</div>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Computer</td>
<td>Status</td>
<td>Data di Assegnazione</td>
<td>Motivazione di Assegnazione</td>
<td>Data di Restituzione</td>
<td>Motivazione di Restituzione</td>
<td>Eol</td>
<td>Data Eol</td>
<td>Note</td>
<td>Cespite</td>
<td>Seriale</td>
<td>Azioni</td>
</tr>
</thead>
<tbody>
{% for computer in computers %}
<tr>
<td> {{ computer.id }}</td>
<td> {{ computer.status }}</td>
<td> {{ computer.assignment_date }}</td>
<td> {{ computer.assignment_motivation }}</td>
<td> {{ computer.return_date }}</td>
<td> {{ computer.return_motivation }}</td>
<td> {{ computer.eol }}</td>
<td> {{ computer.eol_date }}</td>
<td> {{ computer.notes }}</td>
<td> {{ computer.cespite }}</td>
<td> {{ computer.serial }}</td>
<td>
<a href="/edit/computer/{{ computer.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/computer/{{ computer.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
<a href="/reset/computer/{{ computer.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z"/>
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466"/>
</svg>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="margin-tb-2rem">
<h3>Accessori assegnati</h3>
</div>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Accessorio</td>
<td>Descrizione</td>
<td>Status</td>
<td>Data di Assegnazione</td>
<td>Motivazione di Assegnazione</td>
<td>Data di Restituzione</td>
<td>Motivazione di Restituzione</td>
<td>Note</td>
<td>Azioni</td>
</tr>
</thead>
<tbody>
{% for accessory in accessories %}
<tr>
<td> {{ accessory.id }}</td>
<td> {{ accessory.description }}</td>
<td> {{ accessory.status }}</td>
<td> {{ accessory.assignment_date }}</td>
<td> {{ accessory.assignment_motivation }}</td>
<td> {{ accessory.return_date }}</td>
<td> {{ accessory.return_motivation }}</td>
<td> {{ accessory.notes }}</td>
<td>
<a href="/edit/accessory/{{ accessory.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/accessory/{{ accessory.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
<a href="/reset/accessory/{{ accessory.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2z"/>
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466"/>
</svg>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,43 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="flex-col">
<div class="ticket-card margin-tb-2rem">
<ul class="pure-ul">
<h3>Titolo: {{ ticket.title }}</h3>
<li>Id Ticket: {{ ticket.id }}</li>
<li>Studente: {{ ticket.id_student.first_name }} {{ ticket.id_student.last_name }}</li>
</br>
<li>Contenuto: {{ ticket.content }}</li>
</br>
<li>Data del Ticket: {{ ticket.submit_date }}</li>
<li>Data di Chiusura: {{ ticket.closing_date }}</li>
<li>Utente Staff assegnato: {{ ticket.id_user_in_charge }}</li>
</ul>
</div>
<div>
<div class="flex">
{% if not ticket.is_closed %}
<a href="/tickets" class="pure-button pure-button-primary margin-lr-1rem">Ritorna ai Ticket</a>
<a href="/delete/ticket/{{ ticket.id }}" class="pure-button button-warning margin-lr-1rem">Chiudi Ticket</a>
{% else %}
<a href="/tickets/closed" class="pure-button pure-button-primary margin-lr-1rem">Ritorna ai Ticket</a>
{% endif %}
{% if not ticket.is_closed or ticket.closing_date == None %}
<form action="/take/ticket/{{ ticket.id }}" , method="POST">
{% csrf_token %}
<button type="submit" class="pure-button pure-button-primary margin-lr-1rem">Prendi in carico</a>
{% endif %}
</from>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai modificando l'accessorio {{ id }}</h3>
<form action="/edit/accessory/{{ id }}" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="from-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,28 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai modificando il bundle {{ id }}</h3>
<form action="/edit/bundle/{{ id }}" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="from-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
<script src="{% static 'js/toggleFields.js'%}"></script>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai modificando il computer {{ id }}</h3>
<form action="/edit/computer/{{ id }}" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="from-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai modificando il corso {{ id }}</h3>
<form action="/edit/course/{{ id }}" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="from-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>{{ err_str }}</p>
</div>
{% endif %}
<h3>Stai modificando: </h3>
<form action="/edit/student/{{ id }}" method="post" enctype="multipart/form-data" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="from-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai modificando il fornitore {{ id }}</h3>
<form action="/edit/supplier/{{ id }}" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="from-content width-100">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<h3>Stai modificando il ticket {{ id }}</h3>
<form action="/edit/ticket/{{ id }}" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content width-100"
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,28 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
{{ e }}
</div>
{% endif %}
<div class="import-card">
<div>
<form action="/import/students" method="post" enctype="multipart/form-data" class="pure-form pure-form-stacked">
{% csrf_token %}
<div class="form-content">
{{ form }}
</div>
<button type="submit" class="pure-button pure-button-primary">Carica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,26 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="benvenuto">
<h1>Benvenuto, {{ user.first_name }} {{ user.last_name }}</h1>
</div>
<div class="pure-g">
<div class="pure-u-1-2 card">
<div class="card-body">
<h4>Numero Computer Disponibili: {{ computers_available_count }}</h4>
</div>
</div>
<div class="pure-u-1-2 card">
<div>
<h4>Numero Accessori Disponibili: {{ accessories_available_count }}</h4>
</div>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,79 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<a href="/add/course" class="pure-button pure-button-primary add-button">Aggiungi Corso</a>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Corso</td>
<td>Nome Corso</td>
<td>Nome Corso esteso</td>
<td>Codice Corso</td>
<td>Anno Corso</td>
<td>Numero Studenti</td>
<td>Posizione Corso</td>
<td>Status Corso</td>
<td>Azioni</td>
</tr>
</thead>
<tbody>
{% for course in courses %}
<tr>
<td>{{ course.id }}</td>
<td>{{ course.course_name }}</td>
<td>{{ course.course_name_extended }}</td>
<td>{{ course.course_code }}</td>
<td>{{ course.course_year }}</td>
<td>{{ course.student_number }}</td>
<td>{{ course.course_location }}</td>
<td>{{ course.course_status }}</td>
<td>
<a href="/details/course/{{ course.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>
</a>
<a href="/edit/course/{{ course.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/course/{{ course.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
<form method="post" action="/toggle/course/{{ course.id }}">
{% csrf_token %}
<button type="submit" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-toggles"
viewBox="0 0 16 16">
<path d="M4.5 9a3.5 3.5 0 1 0 0 7h7a3.5 3.5 0 1 0 0-7zm7 6a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5m-7-14a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m2.45 0A3.5 3.5 0 0 1 8 3.5 3.5 3.5 0 0 1 6.95 6h4.55a2.5 2.5 0 0 0 0-5zM4.5 0h7a3.5 3.5 0 1 1 0 7h-7a3.5 3.5 0 1 1 0-7"/>
</svg>
</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,80 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<a href="add/bundle" class="pure-button pure-button-primary add-button">Aggiungi Bundle</a>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<th>Id Prodotto</th>
<th>Tipo Prodotto</th>
<th>Nome Prodotto</th>
<th>Qt. Prodotto</th>
<th>Qt. Disponibile</th>
<th>Note</th>
<th>Brand</th>
<th>Linea</th>
<th>Cpu</th>
<th>Ram</th>
<th>Storage</th>
<th>Prezzo</th>
<th>Data di Consegna</th>
<th>Azioni</th>
</tr>
</thead>
<tbody>
{% for bundle in bundles %}
{% if bundle.is_deleted is not True %}
<tr>
<td>{{ bundle.id }}</td>
<td>{{ bundle.product_type }}</td>
<td>{{ bundle.product_name }}</td>
<td>{{ bundle.qt }}</td>
<td>{{ bundle.qt_available }}</td>
<td>{{ bundle.notes }}</td>
<td>{{ bundle.brand }}</td>
<td>{{ bundle.line }}</td>
<td>{{ bundle.cpu }}</td>
<td>{{ bundle.ram }}</td>
<td>{{ bundle.storage_size }}</td>
<td>{{ bundle.price }}</td>
<td>{{ bundle.delivery_date }}</td>
<td>
<a href="/details/bundle/{{ bundle.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>
</a>
<a href="/edit/bundle/{{ bundle.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/bundle/{{ bundle.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,72 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<a href="/import/students" class="pure-button pure-button-primary add-button">Importa Studenti</a>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Studente</td>
<td>Nome</td>
<td>Cognome</td>
<td>Sesso</td>
<td>Data di Nascita</td>
<td>Corso</td>
<td>Anno Corso</td>
<td>Status Studente</td>
<td>Note</td>
<td>Azioni</td>
</tr>
</thead>
<tbody>
{% for student in students %}
<tr>
<td>{{ student.id }}</td>
<td>{{ student.first_name }}</td>
<td>{{ student.last_name }}</td>
<td>{{ student.gender }}</td>
<td>{{ student.birth_date }}</td>
<td>{{ student.course_id.course_name }}</td>
<td>{{ student.course_id.course_year }}</td>
<td>{{ student.student_status }}</td>
<td>{{ student.notes }}</td>
<td>
<a href="/details/student/{{ student.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
</svg>
</a>
<a href="/edit/student/{{ student.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
{% if student.student_status != "resigned" %}
<a href="/delete/student/{{ student.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,58 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<a href="add/supplier" class="pure-button pure-button-primary add-button">Aggiungi Fornitore</a>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<th>Nome</th>
<th>Indirizzo</th>
<th>Telefono</th>
<th>Email</th>
<th>Partita IVA</th>
<th>Codice Società</th>
<th>Azioni</th>
</tr>
</thead>
<tbody>
{% for supplier in suppliers %}
<tr>
<td>{{ supplier.supplier_name }}</td>
<td>{{ supplier.supplier_address }}</td>
<td>{{ supplier.supplier_phone }}</td>
<td>{{ supplier.supplier_email }}</td>
<td>{{ supplier.partita_iva }}</td>
<td>{{ supplier.codice_societa }}</td>
<td>
<a href="/edit/supplier/{{ supplier.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-pencil-square" viewBox="0 0 16 16">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z"/>
</svg>
</a>
<a href="/delete/supplier/{{ supplier.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
<path
d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/>
<path
d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/>
</svg>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,91 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<a href="add/ticket" class="pure-button pure-button-primary add-button">Aggiungi Ticket</a>
<a href="tickets/closed" class="pure-button pure-button-primary">Ticket Chiusi</a>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<th>Id Ticket</th>
<th>Titolo</th>
<th>Studente</th>
<th>Corso</th>
<th>É chiuso?</th>
<th>Staff associato</th>
<th>Azioni</th>
</tr>
</thead>
<tbody>
{% for ticket in tickets %}
<tr>
<td>{{ ticket.id }}</td>
<td>{{ ticket.title }}</td>
<td>{{ ticket.id_student.first_name }} {{ ticket.id_student.last_name }}</td>
<td>{{ ticket.id_student.course_id.course_name }}</td>
<td>
{% if ticket.is_closed %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square"
viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
<path
d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z" />
</svg>
{% else %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-square"
viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
</svg>
{% endif %}
</td>
<td>
{{ ticket.id_user_in_charge.username }}
</td>
<td>
<a href="/details/ticket/{{ ticket.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5" />
</svg>
</a>
<a href="/edit/ticket/{{ ticket.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-square"
viewBox="0 0 16 16">
<path
d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z" />
</svg>
</a>
{% if not ticket.is_closed %}
<a href="/delete/ticket/{{ ticket.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-clipboard2-check" viewBox="0 0 16 16">
<path
d="M9.5 0a.5.5 0 0 1 .5.5.5.5 0 0 0 .5.5.5.5 0 0 1 .5.5V2a.5.5 0 0 1-.5.5h-5A.5.5 0 0 1 5 2v-.5a.5.5 0 0 1 .5-.5.5.5 0 0 0 .5-.5.5.5 0 0 1 .5-.5z" />
<path
d="M3 2.5a.5.5 0 0 1 .5-.5H4a.5.5 0 0 0 0-1h-.5A1.5 1.5 0 0 0 2 2.5v12A1.5 1.5 0 0 0 3.5 16h9a1.5 1.5 0 0 0 1.5-1.5v-12A1.5 1.5 0 0 0 12.5 1H12a.5.5 0 0 0 0 1h.5a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5z" />
<path
d="M10.854 7.854a.5.5 0 0 0-.708-.708L7.5 9.793 6.354 8.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0z" />
</svg>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,91 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<a href="/add/ticket" class="pure-button pure-button-primary add-button">Aggiungi Ticket</a>
<a href="/tickets" class="pure-button pure-button-primary">Ticket Aperti</a>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<th>Id Ticket</th>
<th>Titolo</th>
<th>Studente</th>
<th>Corso</th>
<th>É chiuso?</th>
<th>Staff associato</th>
<th>Azioni</th>
</tr>
</thead>
<tbody>
{% for ticket in tickets %}
<tr>
<td>{{ ticket.id }}</td>
<td>{{ ticket.title }}</td>
<td>{{ ticket.id_student.first_name }} {{ ticket.id_student.last_name }}</td>
<td>{{ ticket.id_student.course_id.course_name }}</td>
<td>
{% if ticket.is_closed %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square"
viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
<path
d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z" />
</svg>
{% else %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-square"
viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
</svg>
{% endif %}
</td>
<td>
{{ ticket.id_user_in_charge.username }}
</td>
<td>
<a href="/details/ticket/{{ ticket.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5" />
</svg>
</a>
<a href="/edit/ticket/{{ ticket.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil-square"
viewBox="0 0 16 16">
<path
d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z" />
<path fill-rule="evenodd"
d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5z" />
</svg>
</a>
{% if not ticket.is_closed %}
<a href="/delete/ticket/{{ ticket.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-clipboard2-check" viewBox="0 0 16 16">
<path
d="M9.5 0a.5.5 0 0 1 .5.5.5.5 0 0 0 .5.5.5.5 0 0 1 .5.5V2a.5.5 0 0 1-.5.5h-5A.5.5 0 0 1 5 2v-.5a.5.5 0 0 1 .5-.5.5.5 0 0 0 .5-.5.5.5 0 0 1 .5-.5z" />
<path
d="M3 2.5a.5.5 0 0 1 .5-.5H4a.5.5 0 0 0 0-1h-.5A1.5 1.5 0 0 0 2 2.5v12A1.5 1.5 0 0 0 3.5 16h9a1.5 1.5 0 0 0 1.5-1.5v-12A1.5 1.5 0 0 0 12.5 1H12a.5.5 0 0 0 0 1h.5a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5z" />
<path
d="M10.854 7.854a.5.5 0 0 0-.708-.708L7.5 9.793 6.354 8.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0z" />
</svg>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,26 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<p>Sei sicuro di resettare l'assegnazione dell'accessorio {{ id }}?</p>
<form method="post" action="/reset/accessory/{{ accessory.id }}" class="pure-form pure-form-stacked">
{% csrf_token %}
<div class="form-content delete-card-w100-ai-center">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/details/bundle/{{ bundle.id }}" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,26 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/base.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<p>Sei sicuro di resettare l'assegnazione del computer {{ computer.id }}?</p>
<form method="post" action="/reset/computer/{{ computer.id }}" class="pure-form pure-form-stacked">
{% csrf_token %}
<div class="form-content delete-card-w100-ai-center">
{{ form }}
</div>
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/details/bundle/{{ bundle.id }}" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,94 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/studentviewbase.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<h2>Benvenuto, {{ user.first_name }} {{ user.last_name }}</h2>
</div>
<div class="flex jc-space-evenly-center">
<div>
<ul class="pure-ul">
<li>Immagine Profilo: <img src="/media/{{ student.profile_image }}" alt="profile_image"></li>
</ul>
</div>
<div>
<ul class="pure-ul">
<li>Id Student: {{ student.id }}</li>
<li>Nome: {{ student.first_name }}</li>
<li>Cognome: {{ student.last_name }}</li>
<li>Data di Nascita: {{ student.birth_date }}</li>
<li>Codice Fiscale: {{ student.codice_fiscale }}</li>
<li>Sesso: {{ student.gender }}</li>
<li>Id Studente Corso: {{ student.id_student_course }}</li>
<li>Sigla Corso: {{ student.course_acronym }}</li>
</ul>
</div>
<div>
<ul class="pure-ul">
<li>Email Studente: {{ student.email_user }}</li>
<li>Numero di Telefono: {{ student.phone_number }}</li>
<li>Comune di Residenza: {{ student.municipality_residence }}</li>
<li>Provincia di Residenza: {{ student.province_residence }}</li>
<li>Comune di Nascita: {{ student.municipality_birth }}</li>
<li>Provincia di Nascita: {{ student.province_birth }}</li>
<li>Nazione di Nascita: {{ student.nation_birth }}</li>
<li>Data di Dimissioni: {{ student.resignation_date }}</li>
<li>Status Studente: {{ student.student_status }}</li>
<li>Corso: {{ student.course_id }}</li>
</ul>
</div>
</div>
<div class="margin-tb-2rem">
<h3>Computer assegnati</h3>
</div>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Computer</td>
<td>Status</td>
<td>Data di Assegnazione</td>
<td>Cespite</td>
<td>Seriale</td>
</tr>
</thead>
<tbody>
{% for computer in computers %}
<tr>
<td> {{ computer.id }}</td>
<td> {{ computer.status }}</td>
<td> {{ computer.assignment_date }}</td>
<td> {{ computer.cespite }}</td>
<td> {{ computer.serial }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="margin-tb-2rem">
<h3>Accessori assegnati</h3>
</div>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<td>Id Accessorio</td>
<td>Descrizione</td>
<td>Status</td>
<td>Data di Assegnazione</td>
</tr>
</thead>
<tbody>
{% for accessory in accessories %}
<tr>
<td> {{ accessory.id }}</td>
<td> {{ accessory.description }}</td>
<td> {{ accessory.status }}</td>
<td> {{ accessory.assignment_date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,25 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/studentviewbase.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="delete-reset-card">
<div>
<h3>Sei sicuro di chiudere il ticket {{ ticket.id }}?</h3>
<form method="post" action="/studentview/close/ticket/{{ ticket.id }}">
{% csrf_token %}
<div class="form-buttons">
<button type="submit" class="pure-button button-warning">Si</button>
<a href="/studentview/tickets" class="pure-button pure-button-primary">No</a>
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,32 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/studentviewbase.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<div class="flex-col">
<div class="ticket-card margin-tb-2rem">
<ul class="pure-ul">
<h3>Titolo: {{ ticket.title }}</h3>
<li>Id Ticket: {{ ticket.id }}</li>
<li>Studente: {{ ticket.id_student.first_name }} {{ ticket.id_student.last_name }} {{ ticket.id_student.course_id.name }}</li>
</br>
<li>Contenuto: {{ ticket.content }}</li>
</br>
<li>Data del Ticket: {{ ticket.submit_date }}</li>
<li>Data di Chiusura: {{ ticket.closing_date }}</li>
<li>Utente Staff assegnato: {{ ticket.id_user_in_charge }}</li>
</ul>
</div>
<div>
<a href="/studentview/tickets" class="pure-button pure-button-primary">Ritorna ai Ticket</a>
{% if not ticket.is_closed %}
<a href="/studentview/close/ticket/{{ ticket.id }}" class="pure-button button-warning">Chiudi Ticket</a>
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,31 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/studentviewbase.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>{{ err_str }}</p>
</div>
{% endif %}
<div class="margin-tb-2rem">
<h3>Stai modificando il tuo profilo: </h3>
</div>
<div class="edit-card">
<form action="/studentview/edit" method="post" enctype="multipart/form-data" class="pure-form">
{% csrf_token %}
<div class="form-content-studview">
{{ form }}
</div>
<div class="form-button">
<button type="submit" class="pure-button pure-button-primary">Modifica</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,32 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/studentviewbase.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
{% if err == True %}
<div>
<p>L'inserimento è incompleto o errato!</p>
</div>
{% endif %}
<div class="margin-tb-2rem">
<h3>Stai creando un nuovo ticket</h3>
</div>
<div class="edit-card">
<form action="/studentview/submit/ticket" method="post" class="pure-form pure-form-2 pure-form-stacked">
{% csrf_token %}
<div class="form-content-studview-ticket"
{{ form }}
</div>
<div class="form-button">
<button type="submit" class="pure-button pure-button-primary">Aggiungi</button>
<button type="reset" class="pure-button button-warning">Reset</button>
</div>
</form>
</div>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,74 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
{% extends "gestionale/studentviewbase.html" %}
{% load static %}
{% block content %}
{% if user.is_authenticated %}
<a href="submit/ticket" class="pure-button pure-button-primary add-button">Aggiungi Ticket</a>
<table class="pure-table pure-table-horizontal width-100">
<thead>
<tr>
<th>Id Ticket</th>
<th>Titolo</th>
<th>É Chiuso?</th>
<th>Staff associato</th>
<th>Azioni</th>
</tr>
</thead>
<tbody>
{% for ticket in tickets %}
<tr>
<td>{{ ticket.id }}</td>
<td>{{ ticket.title }}</td>
<td>
{% if ticket.is_closed %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check-square"
viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
<path
d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425z" />
</svg>
{% else %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-square"
viewBox="0 0 16 16">
<path
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z" />
</svg>
{% endif %}
</td>
<td>
{{ ticket.id_user_in_charge.username }}
</td>
<td>
<a href="/studentview/ticket/{{ ticket.id }}" class="pure-button dp-ilbk">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-list"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5" />
</svg>
</a>
{% if not ticket.is_closed %}
<a href="close/ticket/{{ ticket.id }}" class="pure-button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-clipboard2-check" viewBox="0 0 16 16">
<path
d="M9.5 0a.5.5 0 0 1 .5.5.5.5 0 0 0 .5.5.5.5 0 0 1 .5.5V2a.5.5 0 0 1-.5.5h-5A.5.5 0 0 1 5 2v-.5a.5.5 0 0 1 .5-.5.5.5 0 0 0 .5-.5.5.5 0 0 1 .5-.5z" />
<path
d="M3 2.5a.5.5 0 0 1 .5-.5H4a.5.5 0 0 0 0-1h-.5A1.5 1.5 0 0 0 2 2.5v12A1.5 1.5 0 0 0 3.5 16h9a1.5 1.5 0 0 0 1.5-1.5v-12A1.5 1.5 0 0 0 12.5 1H12a.5.5 0 0 0 0 1h.5a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5h-9a.5.5 0 0 1-.5-.5z" />
<path
d="M10.854 7.854a.5.5 0 0 0-.708-.708L7.5 9.793 6.354 8.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0z" />
</svg>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,37 @@
<!-- Copyright (C) 2024 Nastro_ -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
{% if user.is_authenticated %}
<nav>
<div class="pure-menu pure-menu-horizontal">
<a href="/studentview"><img src="{% static 'images/xlogo-itsaltoadriatico.svg' %}" width="150px" class="pure-menu-heading pure-menu-link"></a>
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="/studentview/edit" class="pure-menu-link">Modifica Profilo</a>
</li>
<li class="pure-menu-item">
<a href="/studentview/tickets" class="pure-menu-link">Tickets</a>
</li>
<li class="pure-menu-item">
<a href="/accounts/logout" class="pure-menu-link">Log Out</a>
</li>
</ul>
</div>
</nav>
{% endif %}
{% block content %}
{% endblock %}
</body>
</html>