Merge branch 'stable' into new-option-fields

This commit is contained in:
Garret Wassermann 2022-04-22 06:32:32 -04:00 committed by GitHub
commit fcab3506b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 2 deletions

View File

@ -114,6 +114,8 @@ HELPDESK_SUBMIT_A_TICKET_PUBLIC = True
# Should the Knowledgebase be enabled? # Should the Knowledgebase be enabled?
HELPDESK_KB_ENABLED = True HELPDESK_KB_ENABLED = True
HELPDESK_TICKETS_TIMELINE_ENABLED = True
# Allow users to change their passwords # Allow users to change their passwords
HELPDESK_SHOW_CHANGE_PASSWORD = True HELPDESK_SHOW_CHANGE_PASSWORD = True

View File

@ -94,14 +94,18 @@ These changes are visible throughout django-helpdesk
**Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = False`` **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = False``
- **HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET** If False, disable the fields on ticket. - **HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET** If False, disable the dependencies fields on ticket.
**Default:** ``HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET = True`` **Default:** ``HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET = True``
- **HELPDESK_ENABLE_TIME_SPENT_ON_TICKET** If False, disable the fields on ticket. - **HELPDESK_ENABLE_TIME_SPENT_ON_TICKET** If False, disable the time spent fields on ticket.
**Default:** ``HELPDESK_ENABLE_TIME_SPENT_ON_TICKET = True`` **Default:** ``HELPDESK_ENABLE_TIME_SPENT_ON_TICKET = True``
- **HELPDESK_TICKETS_TIMELINE_ENABLED** If False, remove from the dashboard the Timeline view for tickets.
**Default:** ``HELPDESK_TICKETS_TIMELINE_ENABLED = True``
Options shown on public pages Options shown on public pages
----------------------------- -----------------------------

View File

@ -59,6 +59,9 @@ HELPDESK_ANON_ACCESS_RAISES_404 = getattr(settings,
# show knowledgebase links? # show knowledgebase links?
HELPDESK_KB_ENABLED = getattr(settings, 'HELPDESK_KB_ENABLED', True) 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? # show extended navigation by default, to all users, irrespective of staff status?
HELPDESK_NAVIGATION_ENABLED = getattr(settings, 'HELPDESK_NAVIGATION_ENABLED', False) HELPDESK_NAVIGATION_ENABLED = getattr(settings, 'HELPDESK_NAVIGATION_ENABLED', False)

View File

@ -33,6 +33,7 @@
{% block helpdesk_body %} {% block helpdesk_body %}
<div class="card"> <div class="card">
{% if helpdesk_settings.HELPDESK_TICKETS_TIMELINE_ENABLED %}
<div class="card-header"> <div class="card-header">
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="nav-item" style="width: 200px;"> <li class="nav-item" style="width: 200px;">
@ -54,6 +55,7 @@
</li> </li>
</ul> </ul>
</div> </div>
{% endif %}
<div class="card-body"> <div class="card-body">
{{ search_message|safe }} {{ search_message|safe }}
<div class="tab-content" id="myTabContent"> <div class="tab-content" id="myTabContent">
@ -125,9 +127,11 @@
</p> </p>
</form> </form>
</div> </div>
{% if helpdesk_settings.HELPDESK_TICKETS_TIMELINE_ENABLED %}
<div class="tab-pane fade" id="timelinetabcontents" role="tabpanel" aria-labelledby="timelinetabcontents-tab"> <div class="tab-pane fade" id="timelinetabcontents" role="tabpanel" aria-labelledby="timelinetabcontents-tab">
<div id='timeline-embed' style="width: 100%; height: 80vh"></div> <div id='timeline-embed' style="width: 100%; height: 80vh"></div>
</div> </div>
{% endif %}
</div> </div>
</div> </div>
<!-- /.panel-body --> <!-- /.panel-body -->

View File

@ -1167,6 +1167,7 @@ def ticket_list(request):
from_saved_query=saved_query is not None, from_saved_query=saved_query is not None,
saved_query=saved_query, saved_query=saved_query,
search_message=search_message, search_message=search_message,
helpdesk_settings=helpdesk_settings,
)) ))