mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-20 17:47:58 +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
|
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
|
A REST API (built with ``djangorestframework``) is available in order to list, create, update and delete tickets from
|
||||||
other tools thanks to HTTP requests.
|
other tools thanks to HTTP requests.
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
Installation/integration into an existing Django application
|
Installation/integration into an existing Django application
|
||||||
============
|
============================================================
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
For standalone installation, refer to the :doc:`standalone installation docs <standalone>`.
|
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
|
``django-helpdesk`` installation isn't difficult, but it requires you have a bit
|
||||||
of existing know-how about Django.
|
of existing know-how about Django.
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
Settings
|
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::
|
First, django-helpdesk needs ``django.core.context_processors.request`` activated, so you must add it to the ``settings.py``. Add the following::
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
@ -87,6 +90,10 @@ These changes are visible throughout django-helpdesk
|
|||||||
|
|
||||||
**Default:** ``HELPDESK_NAVIGATION_ENABLED = False``
|
**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?
|
- **HELPDESK_TRANSLATE_TICKET_COMMENTS** Show dropdown list of languages that ticket comments can be translated into via Google Translate?
|
||||||
|
|
||||||
**Default:** ``HELPDESK_TRANSLATE_TICKET_COMMENTS = False``
|
**Default:** ``HELPDESK_TRANSLATE_TICKET_COMMENTS = False``
|
||||||
|
@ -91,6 +91,12 @@ HELPDESK_TICKETS_TIMELINE_ENABLED = getattr(
|
|||||||
# status?
|
# status?
|
||||||
HELPDESK_NAVIGATION_ENABLED = getattr(settings, "HELPDESK_NAVIGATION_ENABLED", False)
|
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?
|
# use public CDNs to serve jquery and other javascript by default?
|
||||||
# otherwise, use built-in static copy
|
# otherwise, use built-in static copy
|
||||||
HELPDESK_USE_CDN = getattr(settings, "HELPDESK_USE_CDN", False)
|
HELPDESK_USE_CDN = getattr(settings, "HELPDESK_USE_CDN", False)
|
||||||
|
@ -40,12 +40,14 @@
|
|||||||
<span>{% trans "New Ticket" %}</span>
|
<span>{% trans "New Ticket" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% if helpdesk_settings.HELPDESK_SHOW_MY_TICKETS_IN_NAV_FOR_STAFF %}
|
||||||
<li class="nav-item{% if 'my-tickets' in request.path %} active{% endif %}">
|
<li class="nav-item{% if 'my-tickets' in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:my-tickets' %}">
|
<a class="nav-link" href="{% url 'helpdesk:my-tickets' %}">
|
||||||
<i class="fas fa-fw fa-tasks"></i>
|
<i class="fas fa-fw fa-tasks"></i>
|
||||||
<span>{% trans "My Tickets" %}</span>
|
<span>{% trans "My Tickets" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
<li class="nav-item{% if 'reports' in request.path %} active{% endif %}">
|
<li class="nav-item{% if 'reports' in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:report_index' %}">
|
<a class="nav-link" href="{% url 'helpdesk:report_index' %}">
|
||||||
<i class="fas fa-fw fa-chart-area"></i>
|
<i class="fas fa-fw fa-chart-area"></i>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user