From 32f354b4631eeec5dd2ba56b3a055306f7a18d68 Mon Sep 17 00:00:00 2001 From: Horilla Date: Fri, 9 May 2025 13:59:55 +0530 Subject: [PATCH] [UPDT] HELPDESK: Updated helpdesk module by adding latest empty page style --- .../helpdesk/faq/faq_category_list.html | 35 +- .../helpdesk/ticket/ticket_detail.html | 1439 ++++++++--------- 2 files changed, 663 insertions(+), 811 deletions(-) diff --git a/helpdesk/templates/helpdesk/faq/faq_category_list.html b/helpdesk/templates/helpdesk/faq/faq_category_list.html index d97647ca6..c7bcbd259 100644 --- a/helpdesk/templates/helpdesk/faq/faq_category_list.html +++ b/helpdesk/templates/helpdesk/faq/faq_category_list.html @@ -1,5 +1,6 @@ {% load i18n static %} {% include 'filter_tags.html' %} +{% if faq_categories %}
{% for category in faq_categories %}
@@ -71,32 +72,12 @@ >{% trans "View FAQs" %}
- {% empty %} -
-
- -

- {% trans "There are no FAQs at the moment." %} -

-
-
{% endfor %}
+{% else %} +
+ Page not found. 404. +

{% trans "No Records found." %}

+

{% trans "There are no FAQs at the moment." %}

+
+{% endif %} diff --git a/helpdesk/templates/helpdesk/ticket/ticket_detail.html b/helpdesk/templates/helpdesk/ticket/ticket_detail.html index 8d67c6d4b..d04a4aaae 100644 --- a/helpdesk/templates/helpdesk/ticket/ticket_detail.html +++ b/helpdesk/templates/helpdesk/ticket/ticket_detail.html @@ -1,574 +1,299 @@ -{% extends 'index.html' %} {% load static %} {% load i18n %} +{% extends 'index.html' %} {% load static %} {% load i18n %} {% load audit_filters %} {% load basefilters %} {% load helpdeskfilters %} - - - - - - - Helpdesk - - - - - -
- {% comment %} {% endcomment %} - {% block content %} +{% block content %} -
- - -
- -
-
-
-
-
-

{{ticket.title}}

+
- - {% if perms.helpdesk.change_ticket or request.user.employee_get|is_department_manager:ticket or request.user.employee_get in ticket.assigned_to.all or request.user.employee_get == ticket.employee_id %} +
- - {% else %} - - {% endif %} -
-
- -
-
-
-
-
-
-
-
- oh-link--secondary -
-
- {{ticket.employee_id}} -
- {{ticket.created_date}} -
-
-

{{ticket.description|safe}}

+
+
+
+
+

{{ticket.title}}

-
-
- - {% for item in sorted_activity_list %} - {% if item.type == 'comment' %} - {% if item.comment.employee_id == ticket.employee_id %} -
-
-
-
-
-
- {{item.comment.employee_id}} -
-
- {{item.comment.employee_id}} - -
- {{item.comment.date}} - -
-
- - {{item.comment.comment|safe}} - -
-
- {% if item.comment.comment_attachment.all %} - {% for attachment in item.comment.comment_attachment.all %} - {% with extension=attachment.file.name|lower|slice:"-4:" %} - -
- - -
-
- {% endwith %} - {% endfor %} - {% endif %} -
-
-
-
-
- {% else %} -
-
-
-
-
- {{item.comment.employee_id}} -
-
- {{item.comment.employee_id}} -
- {{item.comment.date}} -
-
-
-
- - {{item.comment.comment|safe}} -
-
- {% if request.user.employee_get|is_department_manager:ticket or perms.helpdesk.change_comment or request.user.employee_get == item.comment.employee_id %} - - - - {% endif %} - {% if perms.helpdesk.delete_comment %} - - - - {% endif %} -
-
-
-
- {% if item.comment.comment_attachment.all %} - {% for attachment in item.comment.comment_attachment.all %} - {% with extension=attachment.file.name|lower|slice:"-4:" %} - -
- - -
-
- {% endwith %} - {% endfor %} - {% endif %} -
-
-
-
- {% endif %} - {% elif item.type == 'history' %} - {% if item.history.type == 'Ticket created' %} -
- - {{item.history.updated_by}} {% trans "Created the ticket " %} - -
- {% elif item.history.changes.0.is_fk == True %} -
- {{item.history.updated_by}} {% trans "changed the ticket " %}{{item.history.changes.0.field|safe}} {% trans " from" %} - {{item.history.pair.0|fk_history:item.history.changes.0|safe}} {% trans "to" %} {{item.history.pair.1|fk_history:item.history.changes.0|safe}} - {{ item.history.pair.0.history_date}} -
- {% else %} -
- {{item.history.updated_by}} {% trans "changed the ticket " %}{{item.history.changes.0.field|safe}} {% trans " from" %} - {{item.history.changes.0.old|safe}} {% trans "to" %} {{item.history.changes.0.new|safe}} - {{ item.history.pair.0.history_date}} -
- {% endif %} - {% endif %} - {% endfor %} - -
-
- - {% if perms.helpdesk.add_comment or request.user.employee_get == ticket.employee_id or request.user.employee_get in ticket.assigned_to.all %} -
-
- {% csrf_token %} - - - - - -
- -
- {% endif %} - -
- -
-
{% trans "Ticket Details" %}
-
- -
-
- {% trans "Ticket Info" %} -
-
-
    -
  • - {% trans "Ticket ID:" %} - {{ticket.ticket_type.prefix}}{{ ticket.id|stringformat:"03d" }} -
  • -
  • - {% trans "Owner" %} - {{ticket.employee_id}} -
  • -
  • - {% trans "Created:" %} - {{ticket.created_date}} -
  • -
  • + {% if perms.helpdesk.change_ticket or request.user.employee_get|is_department_manager:ticket or request.user.employee_get in ticket.assigned_to.all or request.user.employee_get == ticket.employee_id %} -
    - {% csrf_token %} -
    - {% trans "Priority" %} : -
    - {% for i in "321" %} - - + {% else %} -
    - {% trans "Priority" %} : -
    - {% for i in "321" %} - - - {% endfor %} -
    + {% endif %} -
  • -
  • - {% trans "Last activity:" %} - - {% with sorted_activity_list|last as last %} - {{ last.date }} - {% endwith %} - -
  • -
- -
+
- - -
-
- {% trans "Responsibility" %} - {{remaining}} -
-
-
-
- {% trans "Forward to" %} - {% if perms.helpdesk.change_ticket or request.user.employee_get == ticket.employee_id %} -
- -
- {% endif %} -
-
-
    -
  • {{ticket.get_raised_on_object}}
  • -
-
-
- -
- {% if perms.helpdesk.view_claimrequest or perms.helpdesk.change_ticket or request.user.employee_get|is_department_manager:ticket or perms.helpdesk.change_claimrequest %} -
- {% trans "Assigned to" %} - {% if perms.helpdesk.change_ticket or request.user.employee_get|is_department_manager:ticket or perms.helpdesk.change_claimrequest %} -
- - - -
- {% endif %} + +
+
+
+
+
+
+
+
+ oh-link--secondary +
+
+ {{ticket.employee_id}} +
+ {{ticket.created_date}} +
+
+

{{ticket.description|safe}}

-
-
-
- {% for employee in ticket.assigned_to.all %} - - {% endfor %} -
-
-
- {% endif %} -
-
-
- - -
-
- {% trans "Documents" %} - {% if perms.helpdesk.add_comment or request.user.employee_get == ticket.employee_id or request.user.employee_get in ticket.assigned_to.all %} - + {% for item in sorted_activity_list %} + {% if item.type == 'comment' %} + {% if item.comment.employee_id == ticket.employee_id %} +
+
+
+
+
+
+ {{item.comment.employee_id}} +
+
+ {{item.comment.employee_id}} + +
+ {{item.comment.date}} + +
+
+ + {{item.comment.comment|safe}} + +
+
+ {% if item.comment.comment_attachment.all %} + {% for attachment in item.comment.comment_attachment.all %} + {% with extension=attachment.file.name|lower|slice:"-4:" %} + +
+ + +
+
+ {% endwith %} + {% endfor %} + {% endif %} +
+
+
+
+
+ {% else %} +
+
+
+
+
+ {{item.comment.employee_id}} +
+
+ {{item.comment.employee_id}} +
+ {{item.comment.date}} +
+
+
+
+ + {{item.comment.comment|safe}} +
+
+ {% if request.user.employee_get|is_department_manager:ticket or perms.helpdesk.change_comment or request.user.employee_get == item.comment.employee_id %} + + + + {% endif %} + {% if perms.helpdesk.delete_comment %} + + + + {% endif %} +
+
+
+
+ {% if item.comment.comment_attachment.all %} + {% for attachment in item.comment.comment_attachment.all %} + {% with extension=attachment.file.name|lower|slice:"-4:" %} + +
+ + +
+
+ {% endwith %} + {% endfor %} + {% endif %} +
+
+
+
+ {% endif %} + {% elif item.type == 'history' %} + {% if item.history.type == 'Ticket created' %} +
+ + {{item.history.updated_by}} {% trans "Created the ticket " %} + +
+ {% elif item.history.changes.0.is_fk == True %} +
+ {{item.history.updated_by}} {% trans "changed the ticket " %}{{item.history.changes.0.field|safe}} {% trans " from" %} + {{item.history.pair.0|fk_history:item.history.changes.0|safe}} {% trans "to" %} + {{item.history.pair.1|fk_history:item.history.changes.0|safe}} + {{ item.history.pair.0.history_date}} +
+ {% else %} +
+ {{item.history.updated_by}} {% trans "changed the ticket " %}{{item.history.changes.0.field|safe}} {% trans " from" %} + {{item.history.changes.0.old|safe}} {% trans "to" %} + {{item.history.changes.0.new|safe}} + {{ item.history.pair.0.history_date}} +
+ {% endif %} + {% endif %} + {% endfor %} +
+
+ + {% if perms.helpdesk.add_comment or request.user.employee_get == ticket.employee_id or request.user.employee_get in ticket.assigned_to.all %} +
+ {% csrf_token %} - - - - - - {% endif %} -
-
-
- {% if attachments %} - {% for attachment in attachments %} - {% with extension=attachment.file.name|lower|slice:"-4:" %} - - -
- - -
- - - - × - -
- - {% endwith %} - {% endfor %} - - {% endif %} + + + + +
+ {% endif %} + +
+ +
+
{% trans "Ticket Details" %}
+
+ +
+
+ {% trans "Ticket Info 123" %} +
+
+
    +
  • + {% trans "Ticket ID:" %} + {{ticket.ticket_type.prefix}}{{ ticket.id|stringformat:"03d" }} +
  • +
  • + {% trans "Owner" %} + {{ticket.employee_id}} +
  • +
  • + {% trans "Created:" %} + {{ticket.created_date}} +
  • +
  • + {% if perms.helpdesk.change_ticket or request.user.employee_get|is_department_manager:ticket or request.user.employee_get in ticket.assigned_to.all or request.user.employee_get == ticket.employee_id %} +
    + {% csrf_token %} +
    + {% trans "Priority" %} : +
    + {% for i in "321" %} + + + {% endfor %} +
    + + +
    +
    + {% else %} +
    + {% trans "Priority" %} : +
    + {% for i in "321" %} + + + {% endfor %} +
    +
    + {% endif %} +
  • +
  • + {% trans "Last activity:" %} + + {% with sorted_activity_list|last as last %} + {{ last.date }} + {% endwith %} + +
  • +
+ +
+
+ + +
+
+ {% trans "Responsibility" %} + {{remaining}} +
+
+
+
+ {% trans "Forward to" %} + {% if perms.helpdesk.change_ticket or request.user.employee_get == ticket.employee_id %} +
+ +
+ {% endif %} +
+
+
    +
  • {{ticket.get_raised_on_object}}
  • +
+
+
+ +
+ {% if perms.helpdesk.view_claimrequest or perms.helpdesk.change_ticket or request.user.employee_get|is_department_manager:ticket or perms.helpdesk.change_claimrequest %} +
+ {% trans "Assigned to" %} + {% if perms.helpdesk.change_ticket or request.user.employee_get|is_department_manager:ticket or perms.helpdesk.change_claimrequest %} +
+ + + +
+ {% endif %} +
+
+
+
+ {% for employee in ticket.assigned_to.all %} + + {% endfor %} +
+
+
+ {% endif %} + +
+
+
+ + +
+
+ {% trans "Documents" %} + + {% if perms.helpdesk.add_comment or request.user.employee_get == ticket.employee_id or request.user.employee_get in ticket.assigned_to.all %} +
+ {% csrf_token %} + + + + + +
+ {% endif %} +
+
+
+ {% if attachments %} + {% for attachment in attachments %} + {% with extension=attachment.file.name|lower|slice:"-4:" %} + + +
+ + +
+ + + + × + +
+ {% endwith %} + {% endfor %} + {% endif %} +
-
-
- +
+ -
-
-
+ + -
-
-
+
+
- -