From 9bd4eb19bcfbe5d6ecb4521659766d74dd4c7ac2 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 20 Apr 2022 16:44:48 +0200 Subject: [PATCH] feat(fields): no dependencies --- .../templates/helpdesk/ticket_desc_table.html | 7 +++++++ helpdesk/urls.py | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html index 07fadee4..4a09a58b 100644 --- a/helpdesk/templates/helpdesk/ticket_desc_table.html +++ b/helpdesk/templates/helpdesk/ticket_desc_table.html @@ -70,7 +70,9 @@ {{ ticketcc_string }} {% if SHOW_SUBSCRIBE %} {% endif %} + {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET != False and helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET != False %} + {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET %} {% trans "Dependencies" %} @@ -82,6 +84,10 @@ {% trans "This ticket has no dependencies." %} {% endfor %} + {% else %} + + + {% endif %} {% if helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET %} {% trans "Total time spent" %} {{ ticket.time_spent_formated }} @@ -90,6 +96,7 @@ {% endif %} + {% endif %} {% if ticket.kbitem %} {% trans "Knowlegebase item" %} diff --git a/helpdesk/urls.py b/helpdesk/urls.py index fc185cc9..711ffa00 100644 --- a/helpdesk/urls.py +++ b/helpdesk/urls.py @@ -108,14 +108,6 @@ urlpatterns = [ staff.ticket_cc_del, name='ticket_cc_del'), - url(r'^tickets/(?P[0-9]+)/dependency/add/$', - staff.ticket_dependency_add, - name='ticket_dependency_add'), - - url(r'^tickets/(?P[0-9]+)/dependency/delete/(?P[0-9]+)/$', - staff.ticket_dependency_del, - name='ticket_dependency_del'), - url(r'^tickets/(?P[0-9]+)/attachment_delete/(?P[0-9]+)/$', staff.attachment_del, name='attachment_del'), @@ -170,6 +162,17 @@ urlpatterns = [ ] +if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET: + urlpatterns += [ + url(r'^tickets/(?P[0-9]+)/dependency/add/$', + staff.ticket_dependency_add, + name='ticket_dependency_add'), + + url(r'^tickets/(?P[0-9]+)/dependency/delete/(?P[0-9]+)/$', + staff.ticket_dependency_del, + name='ticket_dependency_del'), + ] + urlpatterns += [ url(r'^$', protect_view(public.Homepage.as_view()),