From a561f094582a1792391645c99dfac03b4233af58 Mon Sep 17 00:00:00 2001 From: Grizzly Date: Wed, 10 Jul 2019 14:39:55 +0000 Subject: [PATCH] Meilleur affichage de tout les tickets --- tickets/templates/tickets/aff_tickets.html | 2 +- tickets/templates/tickets/index.html | 34 ++++++++++++++++++++++ tickets/views.py | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 tickets/templates/tickets/index.html diff --git a/tickets/templates/tickets/aff_tickets.html b/tickets/templates/tickets/aff_tickets.html index 54573ace..5c10a4a4 100644 --- a/tickets/templates/tickets/aff_tickets.html +++ b/tickets/templates/tickets/aff_tickets.html @@ -32,7 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc., - + diff --git a/tickets/templates/tickets/index.html b/tickets/templates/tickets/index.html new file mode 100644 index 00000000..4429c4fd --- /dev/null +++ b/tickets/templates/tickets/index.html @@ -0,0 +1,34 @@ +{% extends 'users/sidebar.html' %} +{% comment %} +Re2o est un logiciel d'administration développé initiallement au rezometz. Il +se veut agnostique au réseau considéré, de manière à être installable en +quelques clics. + +Copyright © 2017 Gabriel Détraz +Copyright © 2017 Goulven Kermarec +Copyright © 2017 Augustin Lemesle + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +{% endcomment %} + +{% load bootstrap3 %} +{% load i18n %} + +{% block title%}{% trans "Tickets" %}{% endblock %} + +{% block content %} +

{% trans "Tickets" %}

+ {% include 'tickets/aff_tickets.html' with tickets_list=tickets_list %} +{% endblock %} diff --git a/tickets/views.py b/tickets/views.py index af2ccc83..98a9518d 100644 --- a/tickets/views.py +++ b/tickets/views.py @@ -39,5 +39,5 @@ def aff_ticket(request,ticketid): def aff_tickets(request): """ Vue d'affichage de tout les tickets """ tickets = Ticket.objects.all() - return render(request,'tickets/aff_tickets.html', + return render(request,'tickets/index.html', {'tickets_list':tickets})
id User Titre Date