mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-08 23:20:07 +01:00
Show active page in sidebar depending on the request path url
This commit is contained in:
parent
e6fddd154e
commit
a2782c07f4
@ -3,13 +3,13 @@
|
|||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<ul class="sidebar navbar-nav">
|
<ul class="sidebar navbar-nav">
|
||||||
{% if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED and user.is_authenticated or user|is_helpdesk_staff %}
|
{% if helpdesk_settings.HELPDESK_NAVIGATION_ENABLED and user.is_authenticated or user|is_helpdesk_staff %}
|
||||||
<li class="nav-item active">
|
<li class="nav-item{% if 'dashboard' in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:dashboard' %}">
|
<a class="nav-link" href="{% url 'helpdesk:dashboard' %}">
|
||||||
<i class="fas fa-fw fa-tachometer-alt"></i>
|
<i class="fas fa-fw fa-tachometer-alt"></i>
|
||||||
<span>{% trans "Dashboard" %}</span>
|
<span>{% trans "Dashboard" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item{% if 'tickets' in request.path and 'submit' not in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:list' %}">
|
<a class="nav-link" href="{% url 'helpdesk:list' %}">
|
||||||
<i class="fas fa-fw fa-tasks"></i>
|
<i class="fas fa-fw fa-tasks"></i>
|
||||||
<span>{% trans "All Tickets" %}</span>
|
<span>{% trans "All Tickets" %}</span>
|
||||||
@ -34,20 +34,20 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item{% if 'submit' in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:submit' %}">
|
<a class="nav-link" href="{% url 'helpdesk:submit' %}">
|
||||||
<i class="fas fa-fw fa-plus-circle"></i>
|
<i class="fas fa-fw fa-plus-circle"></i>
|
||||||
<span>{% trans "New Ticket" %}</span>
|
<span>{% trans "New Ticket" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<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>
|
||||||
<span>{% trans "Reports" %}</span>
|
<span>{% trans "Reports" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}
|
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}
|
||||||
<li class="nav-item">
|
<li class="nav-item{% if 'kb' in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:kb_index' %}">
|
<a class="nav-link" href="{% url 'helpdesk:kb_index' %}">
|
||||||
<i class="fas fa-fw fa-database"></i>
|
<i class="fas fa-fw fa-database"></i>
|
||||||
<span>{% trans "Knowledgebase" %}</span>
|
<span>{% trans "Knowledgebase" %}</span>
|
||||||
@ -56,20 +56,20 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{# Public menu #}
|
{# Public menu #}
|
||||||
<li class="nav-item active">
|
<li class="nav-item{% if request.path == '/' %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:home' %}">
|
<a class="nav-link" href="{% url 'helpdesk:home' %}">
|
||||||
<i class="fas fa-fw fa-home"></i>
|
<i class="fas fa-fw fa-home"></i>
|
||||||
<span>{% trans "Homepage" %}</span>
|
<span>{% trans "Homepage" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item{% if 'submit' in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:submit' %}">
|
<a class="nav-link" href="{% url 'helpdesk:submit' %}">
|
||||||
<i class="fas fa-fw fa-plus-circle"></i>
|
<i class="fas fa-fw fa-plus-circle"></i>
|
||||||
<span>{% trans "New Ticket" %}</span>
|
<span>{% trans "New Ticket" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}
|
{% if helpdesk_settings.HELPDESK_KB_ENABLED %}
|
||||||
<li class="nav-item">
|
<li class="nav-item{% if 'kb' in request.path %} active{% endif %}">
|
||||||
<a class="nav-link" href="{% url 'helpdesk:kb_index' %}">
|
<a class="nav-link" href="{% url 'helpdesk:kb_index' %}">
|
||||||
<i class="fas fa-fw fa-database"></i>
|
<i class="fas fa-fw fa-database"></i>
|
||||||
<span>{% trans "Knowledgebase" %}</span>
|
<span>{% trans "Knowledgebase" %}</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user