mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-19 17:18:23 +02:00
Merge pull request #1268 from django-helpdesk/fix_my_tickets_showing_for_staff
Allow "My Tickets" visibility for staff users to be controlled by a setting
This commit is contained in:
commit
185dc48232
@ -1,6 +1,9 @@
|
||||
API
|
||||
===
|
||||
|
||||
.. contents:: In this document...
|
||||
:depth: 2
|
||||
|
||||
A REST API (built with ``djangorestframework``) is available in order to list, create, update and delete tickets from
|
||||
other tools thanks to HTTP requests.
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
Installation/integration into an existing Django application
|
||||
============
|
||||
============================================================
|
||||
|
||||
.. note::
|
||||
|
||||
For standalone installation, refer to the :doc:`standalone installation docs <standalone>`.
|
||||
|
||||
.. contents:: In this document...
|
||||
:depth: 2
|
||||
|
||||
``django-helpdesk`` installation isn't difficult, but it requires you have a bit
|
||||
of existing know-how about Django.
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
Settings
|
||||
========
|
||||
|
||||
.. contents:: In this document...
|
||||
:depth: 2
|
||||
|
||||
First, django-helpdesk needs ``django.core.context_processors.request`` activated, so you must add it to the ``settings.py``. Add the following::
|
||||
|
||||
TEMPLATES = [
|
||||
@ -86,6 +89,10 @@ These changes are visible throughout django-helpdesk
|
||||
- **HELPDESK_NAVIGATION_ENABLED** Show extended navigation by default, to all users, irrespective of staff status?
|
||||
|
||||
**Default:** ``HELPDESK_NAVIGATION_ENABLED = False``
|
||||
|
||||
- **HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF** Show "My tickets" for staff. Typically used for help desk deployments that allow staff to create tickets to action other staff members.
|
||||
|
||||
**Default:** ``HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF = True``
|
||||
|
||||
- **HELPDESK_TRANSLATE_TICKET_COMMENTS** Show dropdown list of languages that ticket comments can be translated into via Google Translate?
|
||||
|
||||
|
@ -91,6 +91,12 @@ HELPDESK_TICKETS_TIMELINE_ENABLED = getattr(
|
||||
# status?
|
||||
HELPDESK_NAVIGATION_ENABLED = getattr(settings, "HELPDESK_NAVIGATION_ENABLED", False)
|
||||
|
||||
# Show the "My Tickets" navigation option for staff members - typically this is for when
|
||||
# staff can create tickets to action other staff.
|
||||
HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF = getattr(
|
||||
settings, "HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF", True
|
||||
)
|
||||
|
||||
# use public CDNs to serve jquery and other javascript by default?
|
||||
# otherwise, use built-in static copy
|
||||
HELPDESK_USE_CDN = getattr(settings, "HELPDESK_USE_CDN", False)
|
||||
|
@ -40,12 +40,14 @@
|
||||
<span>{% trans "New Ticket" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if helpdesk_settings.HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF %}
|
||||
<li class="nav-item{% if 'my-tickets' in request.path %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'helpdesk:my-tickets' %}">
|
||||
<i class="fas fa-fw fa-tasks"></i>
|
||||
<span>{% trans "My Tickets" %}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item{% if 'reports' in request.path %} active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'helpdesk:report_index' %}">
|
||||
<i class="fas fa-fw fa-chart-area"></i>
|
||||
|
Loading…
x
Reference in New Issue
Block a user