mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-01-16 02:48:37 +01:00
commit
d38240e3cb
@ -61,7 +61,6 @@
|
|||||||
<div class="col-md-2">{% include "helpdesk/attribution.html" %}</div>
|
<div class="col-md-2">{% include "helpdesk/attribution.html" %}</div>
|
||||||
<div class="col-md-2"><a href='{% url 'helpdesk_rss_index' %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a></div>
|
<div class="col-md-2"><a href='{% url 'helpdesk_rss_index' %}'><img src='{{ STATIC_URL }}helpdesk/rss_icon.png' width='14' height='14' alt='{% trans "RSS Icon" %}' title='{% trans "RSS Feeds" %}' border='0' />{% trans "RSS Feeds" %}</a></div>
|
||||||
<div class="col-md-2"><a href='{% url 'helpdesk_api_help' %}'>{% trans "API" %}</a></div>
|
<div class="col-md-2"><a href='{% url 'helpdesk_api_help' %}'>{% trans "API" %}</a></div>
|
||||||
<div class="col-md-2"><a href='{% url 'helpdesk_user_settings' %}'>{% trans "User Settings" %}</a></div>
|
|
||||||
{% if user.is_superuser %}<div class="col-md-2"><a href='{% url 'helpdesk_system_settings' %}'>{% trans "System Settings" %}</a></div>{% endif %}
|
{% if user.is_superuser %}<div class="col-md-2"><a href='{% url 'helpdesk_system_settings' %}'>{% trans "System Settings" %}</a></div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,11 +32,19 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li><a href='{% url 'logout' %}'><span class="glyphicon glyphicon-log-out"></span><span class="nav-text">{% trans "Logout" %} ({{ user.username }})</span></a></li>
|
<li class="headerlink dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-user"></span><span class="nav-text"> {{ user.get_full_name|default:user.username }} <b class="caret"></b></span></a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href='{% url 'helpdesk_user_settings' %}'>{% trans "User Settings" %}</a></li>
|
||||||
|
{% if helpdesk_settings.HELPDESK_SHOW_CHANGE_PASSWORD and user.has_usable_password %}
|
||||||
|
<li><a href='{% url 'auth_password_change' %}'>{% trans "Change password" %}</a></li>
|
||||||
|
{% endif %}
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li><a href='{% url 'logout' %}'>{#<span class="glyphicon glyphicon-log-out"></span> #}{% trans "Logout" %}</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% if not query %}
|
{% if not query %}
|
||||||
|
|
||||||
<form class="navbar-form navbar-left" id='searchform' method='get' action="{% url 'helpdesk_list' %}">
|
<form class="navbar-form navbar-left" id='searchform' method='get' action="{% url 'helpdesk_list' %}">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type='text' name='q' size='15' class='input form-control' placeholder='{% trans "Search..." %}' id='search_query' title='{% trans "Enter a keyword, or a ticket number to jump straight to that ticket." %}'/>
|
<input type='text' name='q' size='15' class='input form-control' placeholder='{% trans "Search..." %}' id='search_query' title='{% trans "Enter a keyword, or a ticket number to jump straight to that ticket." %}'/>
|
||||||
@ -48,7 +56,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{# Public menu #}
|
{# Public menu #}
|
||||||
|
@ -1,32 +1,20 @@
|
|||||||
{% extends "helpdesk/base.html" %}{% load i18n %}{% load url from future %}
|
{% extends "helpdesk/base.html" %}{% load i18n bootstrap %}{% load url from future %}
|
||||||
|
|
||||||
{% block helpdesk_title %}{% trans "Change User Settings" %}{% endblock %}
|
{% block helpdesk_title %}{% trans "Change User Settings" %}{% endblock %}
|
||||||
|
|
||||||
{% block helpdesk_body %}
|
{% block helpdesk_body %}
|
||||||
{% if show_password_change_link %}
|
|
||||||
{% url 'auth_password_change' as password_change_url %}
|
|
||||||
<h2>Change Password</h2>
|
|
||||||
<p>
|
|
||||||
Change your password <a href="{{ password_change_url }}" title="change your password">here</a>.
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% blocktrans %}
|
{% blocktrans %}
|
||||||
<h2>User Settings</h2>
|
<h2>User Settings</h2>
|
||||||
|
|
||||||
<p>Use the following options to change the way your helpdesk system works for you. These settings do not impact any other user.</p>
|
<p>Use the following options to change the way your helpdesk system works for you. These settings do not impact any other user.</p>
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
|
||||||
<form method='post' action='./'>
|
<form role="form" method='post' action='./'>
|
||||||
<fieldset>
|
{% csrf_token %}
|
||||||
<dl>{% for field in form %}
|
{{ form|bootstrap }}
|
||||||
<dt><label for='id_{{ field.name }}'>{{ field.label }}</label></dt>
|
<div class="form-group">
|
||||||
<dd>{{ field }}</dd>
|
<input class="btn btn-primary" type='submit' value='{% trans "Save Options" %}' />
|
||||||
{% if field.errors %}<dd class='error'>{{ field.errors }}</dd>{% endif %}
|
</div>
|
||||||
{% if field.help_text %}<dd class='form_help_text'>{{ field.help_text }}</dd>{% endif %}
|
</form>
|
||||||
{% endfor %}</dl>
|
|
||||||
</fieldset>
|
|
||||||
<input class="btn btn-primary" type='submit' value='{% trans "Save Options" %}' />
|
|
||||||
{% csrf_token %}</form>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1163,16 +1163,9 @@ def user_settings(request):
|
|||||||
else:
|
else:
|
||||||
form = UserSettingsForm(s.settings)
|
form = UserSettingsForm(s.settings)
|
||||||
|
|
||||||
user = User.objects.get(id = request.user.id)
|
|
||||||
show_password_change_link = 0
|
|
||||||
# we don't want non-local users to see the 'change password' link.
|
|
||||||
if helpdesk_settings.HELPDESK_SHOW_CHANGE_PASSWORD and user.has_usable_password():
|
|
||||||
show_password_change_link = 1
|
|
||||||
|
|
||||||
return render_to_response('helpdesk/user_settings.html',
|
return render_to_response('helpdesk/user_settings.html',
|
||||||
RequestContext(request, {
|
RequestContext(request, {
|
||||||
'form': form,
|
'form': form,
|
||||||
'show_password_change_link': show_password_change_link,
|
|
||||||
}))
|
}))
|
||||||
user_settings = staff_member_required(user_settings)
|
user_settings = staff_member_required(user_settings)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user