2019-07-08 10:21:51 +00:00
{% 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
2019-09-29 16:02:28 +02:00
Copyright © 2017 Lara Kermarec
2019-07-08 10:21:51 +00:00
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 %}
2019-07-10 12:24:06 +00:00
{% load humanize %}
2020-04-23 02:42:18 +02:00
{% load logs_extra %}
2020-04-22 21:37:21 +02:00
{% load acl %}
2019-07-08 10:21:51 +00:00
{% block title %}{% trans "Tickets" %}{% endblock %}
{% block content %}
2019-11-20 00:49:36 +00:00
< h2 > {% blocktrans with id=ticket.id %}Ticket #{{id}}{% endblocktrans %}
2019-08-06 16:06:53 +00:00
{% if ticket.solved %}
< span class = "badge badge-success" > {% trans "Solved" %}< / span >
{% else %}
2019-11-20 00:49:36 +00:00
< span class = "badge badge-danger" > {% trans "Not solved" %}< / span >
2019-08-06 16:06:53 +00:00
{% endif %}
< / h2 >
2019-07-10 12:24:06 +00:00
< div class = "panel panel-default" >
< div class = "panel-heading" >
2019-07-12 12:00:56 +00:00
{% trans "Opened by" %}
{% if ticket.user %}
< a href = "{% url 'users:profil' ticket.user.id%}" >
{{ ticket.user.get_full_name }}
< / a >
{% else %}
2019-11-20 00:49:36 +00:00
{% trans "Anonymous user" %}
2019-07-12 12:00:56 +00:00
{% endif %}
2019-07-10 12:24:06 +00:00
{{ ticket.date | naturalday}}.
2019-07-12 12:00:56 +00:00
{% if not ticket.user %}
2019-08-14 17:48:58 +00:00
{% trans "Response address: " %}< A HREF = "mailto:{{ticket.email}}?subject={% trans " Response to your ticket " % } " > {{ticket.email}}< / A >
2019-07-12 12:00:56 +00:00
{% endif %}
2019-07-10 12:24:06 +00:00
2019-07-11 08:27:58 +00:00
< div class = "text-right" >
2020-04-23 02:42:18 +02:00
{% can_view ticket %}
< a class = "btn btn-info btn-sm" role = "button" href = "{% url 'tickets:add-comment' ticket.id %}" > < i class = "fa fa-plus" > < / i > {% trans "Add a comment " %}< / a >
{% acl_end %}
2020-04-22 21:37:21 +02:00
{% can_edit ticket %}
2020-04-23 02:42:18 +02:00
< a class = "btn btn-info btn-sm" role = "button" href = "{% url 'tickets:edit-ticket' ticket.id %}" > < i class = "fa fa-edit" > < / i > {% trans "Edit" %}< / a >
2019-08-06 07:41:27 +00:00
{% if not ticket.solved %}
2020-04-23 02:42:18 +02:00
< a class = "btn btn-success btn-sm" role = "button" href = "{% url 'tickets:change-ticket-status' ticket.id %}" > < i class = "fa fa-check" > < / i > {% trans "Mark as solved" %}< / a >
2019-08-06 07:41:27 +00:00
{% else %}
2020-04-23 02:42:18 +02:00
< a class = "btn btn-warning btn-sm" role = "button" href = "{% url 'tickets:change-ticket-status' ticket.id %}" > < i class = "fa fa-close" > < / i > {% trans "Mark as unsolved" %}< / a >
2019-08-06 07:41:27 +00:00
{% endif %}
2020-04-22 21:37:21 +02:00
{% acl_end %}
2020-04-23 02:42:18 +02:00
{% history_button ticket text=True %}
2019-07-11 08:27:58 +00:00
< / div >
2019-07-10 12:24:06 +00:00
< / div >
2020-04-23 02:42:18 +02:00
< div class = "panel-body" >
< p > < b > {% trans "Title:" %}< / b > {{ticket.title}}< / p >
< b > {% trans "Description:" %}< / b > {{ ticket.description | linebreaks }}
2019-07-10 12:24:06 +00:00
< / div >
2019-07-08 10:21:51 +00:00
2020-04-23 02:42:18 +02:00
{% for comment in comments %}
< div class = "panel-footer" >
< p > < span class = "badge" > {% trans "Comment " %}< b > #{{comment.comment_id}}< / b > < / span > {% trans " added by " %}{{ comment.created_by.get_full_name }}{% trans " on " %} {{comment.created_at}}< / p >
< b > {% trans "Description:" %}< / b > {{ comment.comment | linebreaks }}
< div class = "text-right" >
{% can_edit comment %}
< a class = "btn btn-info btn-sm" role = "button" href = "{% url 'tickets:edit-comment' comment.id %}" > < i class = "fa fa-edit" > < / i > {% trans "Edit this comment " %}< / a >
{% acl_end %}
{% can_delete comment %}
< a class = "btn btn-danger btn-sm" role = "button" href = "{% url 'tickets:del-comment' comment.id %}" > < i class = "fa fa-close" > < / i > {% trans "Delete this comment " %}< / a >
{% acl_end %}
{% history_button comment text=True %}
< / div >
< / div >
{% endfor %}
< / div >
2019-08-06 16:06:53 +00:00
< div class = "text-right" >
2020-04-23 02:42:18 +02:00
< a class = "btn btn-primary" role = "button" href = "{% url 'tickets:aff-tickets' %}" > < i class = "fa fa-reorder" > < / i > {% trans "All tickets" %}< / a >
2019-08-06 16:06:53 +00:00
< / div >
2019-07-08 10:21:51 +00:00
{% endblock %}