From 5792587e3eeacb7dd5a60dc56794df762182a77e Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Apr 2022 18:48:21 +0200 Subject: [PATCH 1/4] feat(ticket): disable timeline --- demo/demodesk/config/settings.py | 2 ++ helpdesk/settings.py | 3 +++ helpdesk/templates/helpdesk/ticket_list.html | 2 ++ helpdesk/views/staff.py | 1 + 4 files changed, 8 insertions(+) diff --git a/demo/demodesk/config/settings.py b/demo/demodesk/config/settings.py index e4ac94f1..ec301a91 100644 --- a/demo/demodesk/config/settings.py +++ b/demo/demodesk/config/settings.py @@ -114,6 +114,8 @@ HELPDESK_SUBMIT_A_TICKET_PUBLIC = True # Should the Knowledgebase be enabled? HELPDESK_KB_ENABLED = True +HELPDESK_TICKETS_TIMELINE_ENABLED = True + # Allow users to change their passwords HELPDESK_SHOW_CHANGE_PASSWORD = True diff --git a/helpdesk/settings.py b/helpdesk/settings.py index a46af953..31a1f742 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -49,6 +49,9 @@ HELPDESK_ANON_ACCESS_RAISES_404 = getattr(settings, # show knowledgebase links? HELPDESK_KB_ENABLED = getattr(settings, 'HELPDESK_KB_ENABLED', True) +# Disable Timeline on ticket list +HELPDESK_TICKETS_TIMELINE_ENABLED = getattr(settings, 'HELPDESK_TICKETS_TIMELINE_ENABLED', True) + # show extended navigation by default, to all users, irrespective of staff status? HELPDESK_NAVIGATION_ENABLED = getattr(settings, 'HELPDESK_NAVIGATION_ENABLED', False) diff --git a/helpdesk/templates/helpdesk/ticket_list.html b/helpdesk/templates/helpdesk/ticket_list.html index 2894349b..56402486 100644 --- a/helpdesk/templates/helpdesk/ticket_list.html +++ b/helpdesk/templates/helpdesk/ticket_list.html @@ -33,6 +33,7 @@ {% block helpdesk_body %}
+ {% if helpdesk_settings.HELPDESK_TICKETS_TIMELINE_ENABLED %}
+ {% endif %}
{{ search_message|safe }}
diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index d8cd1f5d..82cddfa6 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -1167,6 +1167,7 @@ def ticket_list(request): from_saved_query=saved_query is not None, saved_query=saved_query, search_message=search_message, + helpdesk_settings=helpdesk_settings, )) From 26c6a778ec25654686f2281dc8e48683293c27ac Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Fri, 15 Apr 2022 18:51:02 +0200 Subject: [PATCH 2/4] feat(ticket): disable timeline --- helpdesk/templates/helpdesk/ticket_list.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpdesk/templates/helpdesk/ticket_list.html b/helpdesk/templates/helpdesk/ticket_list.html index 56402486..fad94e25 100644 --- a/helpdesk/templates/helpdesk/ticket_list.html +++ b/helpdesk/templates/helpdesk/ticket_list.html @@ -127,9 +127,11 @@

+ {% if helpdesk_settings.HELPDESK_TICKETS_TIMELINE_ENABLED %}
+ {% endif %}
From 479451ccac99b3b2d413101128f0185cc3af8337 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 20 Apr 2022 15:39:27 +0200 Subject: [PATCH 3/4] feat(docs): updated --- docs/settings.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/settings.rst b/docs/settings.rst index 246ce4b6..32fc1d00 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -94,6 +94,10 @@ These changes are visible throughout django-helpdesk **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = False`` +- **HELPDESK_TICKETS_TIMELINE_ENABLED** If True, redirects user to a 404 page when attempting to reach ticket pages while not logged in, rather than redirecting to a login screen. + + **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = True`` + Options shown on public pages ----------------------------- From 041308d0748d1e3ca039ce7d5ed6017b9d46f1c2 Mon Sep 17 00:00:00 2001 From: Daniele Scasciafratte Date: Wed, 20 Apr 2022 15:47:36 +0200 Subject: [PATCH 4/4] feat(docs): updated --- docs/settings.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 32fc1d00..362241ad 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -94,9 +94,9 @@ These changes are visible throughout django-helpdesk **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = False`` -- **HELPDESK_TICKETS_TIMELINE_ENABLED** If True, redirects user to a 404 page when attempting to reach ticket pages while not logged in, rather than redirecting to a login screen. +- **HELPDESK_TICKETS_TIMELINE_ENABLED** If False, remove from the dashboard the Timeline view for tickets. - **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = True`` + **Default:** ``HELPDESK_TICKETS_TIMELINE_ENABLED = True`` Options shown on public pages -----------------------------