mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-30 08:32:26 +00:00
Affichage d'un ticket individuel
This commit is contained in:
parent
c11cc35ffc
commit
1381433501
4 changed files with 49 additions and 5 deletions
35
tickets/templates/tickets/aff_ticket.html
Normal file
35
tickets/templates/tickets/aff_ticket.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{% 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 %}
|
||||||
|
|
||||||
|
{{ ticket.title }}
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<table class="table" id="machines_table">
|
<table class="table" id="machines_table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"></th>
|
<th scope="col">id</th>
|
||||||
<th scope="col">User</th>
|
<th scope="col">User</th>
|
||||||
<th scope="col">Titre</th>
|
<th scope="col">Titre</th>
|
||||||
<th scope="col">Date</th>
|
<th scope="col">Date</th>
|
||||||
|
@ -41,7 +41,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
</tr>
|
</tr>
|
||||||
{% for ticket in tickets_list %}
|
{% for ticket in tickets_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td> Lien </td>
|
<td>
|
||||||
|
<a href="{% url 'tickets:aff-ticket' ticket.id%}" class="btn btn-primary btn-sm" role="button">
|
||||||
|
<i class="fa fa-ticket"></i>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>{{ ticket.user }}</td>
|
<td>{{ ticket.user }}</td>
|
||||||
<td>{{ ticket.title }}</td>
|
<td>{{ ticket.title }}</td>
|
||||||
<td>{{ ticket.date }}</td>
|
<td>{{ ticket.date }}</td>
|
||||||
|
|
|
@ -4,7 +4,6 @@ from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', views.aff_tickets, name='aff-tickets'),
|
url(r'^$', views.aff_tickets, name='aff-tickets'),
|
||||||
url(r'^new_ticket/(?P<userid>[0-9]+)$',
|
url(r'^ticket/(?P<ticketid>[0-9]+)$', views.aff_ticket, name='aff-ticket'),
|
||||||
views.new_ticket,
|
url(r'^new_ticket/(?P<userid>[0-9]+)$',views.new_ticket,name='new-ticket'),
|
||||||
name='new-ticket'),
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -19,6 +19,12 @@ def new_ticket(request,user):
|
||||||
'ticket/ticket.html',
|
'ticket/ticket.html',
|
||||||
request
|
request
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def aff_ticket(request,ticketid):
|
||||||
|
"""Vue d'affichage d'un ticket"""
|
||||||
|
ticket = Ticket.objects.filter(id=ticketid).get()
|
||||||
|
return render(request,'tickets/aff_ticket.html',{'ticket':ticket})
|
||||||
|
|
||||||
def aff_tickets(request):
|
def aff_tickets(request):
|
||||||
""" Vue d'affichage de tout les tickets """
|
""" Vue d'affichage de tout les tickets """
|
||||||
tickets = Ticket.objects.all()
|
tickets = Ticket.objects.all()
|
||||||
|
|
Loading…
Reference in a new issue