mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +00:00
Dummy bouton, order des date, et affichage dans l'admin
This commit is contained in:
parent
609904c279
commit
13afc5aaeb
4 changed files with 15 additions and 2 deletions
|
@ -33,3 +33,6 @@ class Ticket(models.Model):
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Ticket")
|
verbose_name = _("Ticket")
|
||||||
verbose_name_plural = _("Tickets")
|
verbose_name_plural = _("Tickets")
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "Ticket de {} date: {}".format(self.user.surname,self.date)
|
||||||
|
|
|
@ -46,6 +46,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<p><b>{% trans "Title:" %}</b> {{ticket.title}}</p>
|
<p><b>{% trans "Title:" %}</b> {{ticket.title}}</p>
|
||||||
<p><b>{% trans "Description" %}</b> {{ ticket.description }}</p>
|
<p><b>{% trans "Description" %}</b> {{ ticket.description }}</p>
|
||||||
|
|
||||||
|
<div class="text-right">
|
||||||
|
{% if not ticket.solved %}
|
||||||
|
<a class="btn btn-success" role="button">
|
||||||
|
<i class="fa fa-check"></i>{% trans "Mark as Solved" %}
|
||||||
|
{% else %}
|
||||||
|
<a class="btn btn-warning" role="button">
|
||||||
|
<i class="fa fa-cross"></i>{% trans "Mark as Not Solved" %}
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,6 @@ def aff_ticket(request,ticketid):
|
||||||
|
|
||||||
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().order_by('date')
|
tickets = Ticket.objects.all().order_by('-date')
|
||||||
return render(request,'tickets/index.html',
|
return render(request,'tickets/index.html',
|
||||||
{'tickets_list':tickets})
|
{'tickets_list':tickets})
|
||||||
|
|
|
@ -978,7 +978,7 @@ def profil(request, users, **_kwargs):
|
||||||
request.GET.get('order'),
|
request.GET.get('order'),
|
||||||
SortTable.MACHINES_INDEX
|
SortTable.MACHINES_INDEX
|
||||||
)
|
)
|
||||||
tickets = Ticket.objects.filter(user=users).all().order_by('date')
|
tickets = Ticket.objects.filter(user=users).all().order_by('-date')
|
||||||
nb_tickets = tickets.count()
|
nb_tickets = tickets.count()
|
||||||
pagination_large_number = GeneralOption.get_cached_value(
|
pagination_large_number = GeneralOption.get_cached_value(
|
||||||
'pagination_large_number'
|
'pagination_large_number'
|
||||||
|
|
Loading…
Reference in a new issue