mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 15:33:09 +01:00
small fixes and translation
This commit is contained in:
parent
e2407151ab
commit
dcec449939
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@ dist
|
||||
django_helpdesk.egg-info
|
||||
docs/html/*
|
||||
docs/doctrees/*
|
||||
.project
|
||||
.pydevproject
|
@ -41,17 +41,17 @@ Usage example::
|
||||
# or you can call api.setAPIKey()
|
||||
#
|
||||
if api.key is None:
|
||||
print "No 'apikey.txt' file."
|
||||
print >> sys.stderr, "No 'apikey.txt' file."
|
||||
elif not api.verify_key():
|
||||
print "The API key is invalid."
|
||||
print >> sys.stderr, "The API key is invalid."
|
||||
else:
|
||||
# data should be a dictionary of values
|
||||
# They can all be filled in with defaults
|
||||
# from a CGI environment
|
||||
if api.comment_check(comment, data):
|
||||
print 'This comment is spam.'
|
||||
print >> sys.stderr, 'This comment is spam.'
|
||||
else:
|
||||
print 'This comment is ham.'
|
||||
print >> sys.stderr, 'This comment is ham.'
|
||||
"""
|
||||
|
||||
|
||||
|
@ -38,12 +38,12 @@ $(document).ready(function() {
|
||||
|
||||
<div id="searchtabs">
|
||||
<ul>
|
||||
<li><a href='#tabfilter'>Query Options</a></li>
|
||||
<li><a href='#tabfilter'>{% trans "Query Options" %}</a></li>
|
||||
{% if not from_saved_query %}
|
||||
<li><a href='#tabsave'>Save This Query</a></li>
|
||||
<li><a href='#tabsave'>{% trans "Save This Query" %}</a></li>
|
||||
{% endif %}
|
||||
{% if user_saved_queries %}
|
||||
<li><a href='#tabload'>Load Saved Query</a></li>
|
||||
<li><a href='#tabload'>{% trans "Load Saved Query" %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@ -66,7 +66,7 @@ $(document).ready(function() {
|
||||
|
||||
<form method='get' action='./'>
|
||||
<div class='filterBox{% if query_params.sorting %} filterBoxShow{% endif %}' id='filterBoxSort'>
|
||||
<label for='id_sort'>Sorting</label>
|
||||
<label for='id_sort'>{% trans "Sorting" %}</label>
|
||||
<select id='id_sort' name='sort'>
|
||||
<option value='created'{% ifequal query_params.sorting "created"%} selected='selected'{% endifequal %}>
|
||||
{% trans "Created" %}
|
||||
@ -87,9 +87,9 @@ $(document).ready(function() {
|
||||
{% trans "Owner" %}
|
||||
</option>
|
||||
</select>
|
||||
<label for='id_sortreverse'>Reverse</label>
|
||||
<label for='id_sortreverse'>{% trans "Reverse" %}</label>
|
||||
<input type='checkbox' name='sortreverse' id='id_sortreverse'{% if query_params.sortreverse %} checked='checked'{% endif %} />
|
||||
<p class='filterHelp'>Ordering applied to tickets</p>
|
||||
<p class='filterHelp'>{% trans "Ordering applied to tickets" %}</p>
|
||||
<input type='button' class='filterBuilderRemove' value='-' />
|
||||
</div>
|
||||
|
||||
@ -98,44 +98,44 @@ $(document).ready(function() {
|
||||
<select id='id_owners' name='assigned_to' multiple='selected' size='5'>
|
||||
{% for u in user_choices %}
|
||||
<option value='{{ u.id }}'{% if u.id|in_list:query_params.filtering.assigned_to__id__in %} selected='selected'{% endif %}>
|
||||
{{ u.username }}{% ifequal u user %} (ME){% endifequal %}
|
||||
{{ u.username }}{% ifequal u user %} {% trans "(ME)" %}{% endifequal %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<p class='filterHelp'>Ctrl-Click to select multiple options</p>
|
||||
<p class='filterHelp'>{% trans "Ctrl-Click to select multiple options" %}</p>
|
||||
<input type='button' class='filterBuilderRemove' value='-' />
|
||||
</div>
|
||||
|
||||
<div class='filterBox{% if query_params.filtering.queue__id__in %} filterBoxShow{% endif %}' id='filterBoxQueue'>
|
||||
<label for='id_queues'>{% trans "Queue(s)" %}</label><select id='id_queues' name='queue' multiple='selected' size='5'>{% for q in queue_choices %}<option value='{{ q.id }}'{% if q.id|in_list:query_params.filtering.queue__id__in %} selected='selected'{% endif %}>{{ q.title }}</option>{% endfor %}</select>
|
||||
<p class='filterHelp'>Ctrl-click to select multiple options</p>
|
||||
<p class='filterHelp'>{% trans "Ctrl-click to select multiple options" %}</p>
|
||||
<input type='button' class='filterBuilderRemove' value='-' />
|
||||
</div>
|
||||
|
||||
<div class='filterBox{% if query_params.filtering.status__in %} filterBoxShow{% endif %}' id='filterBoxStatus'>
|
||||
<label for='id_statuses'>{% trans "Status(es)" %}</label><select id='id_statuses' name='status' multiple='selected' size='5'>{% for s in status_choices %}<option value='{{ s.0 }}'{% if s.0|in_list:query_params.filtering.status__in %} selected='selected'{% endif %}>{{ s.1 }}</option>{% endfor %}</select>
|
||||
<p class='filterHelp'>Ctrl-click to select multiple options</p>
|
||||
<p class='filterHelp'>{% trans "Ctrl-click to select multiple options" %}</p>
|
||||
<input type='button' class='filterBuilderRemove' value='-' />
|
||||
</div>
|
||||
|
||||
<div class='filterBox{% if query_params.filtering.created__gte or query_params.filtering.created__lte %} filterBoxShow{% endif %}' id='filterBoxDates'>
|
||||
<label for='id_date_from'>{% trans "Date (From)" %}</label><input type='text' name='date_from' value='{{ query_params.filtering.created__gte }}' id='id_date_from' />
|
||||
<label for='id_date_to'>{% trans "Date (To)" %}</label><input type='text' name='date_to' value='{{ query_params.filtering.created__lte }}' id='id_date_to' />
|
||||
<p class='filterHelp'>Use YYYY-MM-DD date format, eg 2011-05-29</p>
|
||||
<p class='filterHelp'>{% trans "Use YYYY-MM-DD date format, eg 2011-05-29" %}</p>
|
||||
<input type='button' class='filterBuilderRemove' value='-' />
|
||||
</div>
|
||||
|
||||
{% if tags_enabled %}
|
||||
<div class='filterBox{% if query_params.tags %} filterBoxShow{% endif %}' id='filterBoxTags'>
|
||||
<label for='id_tags'>{% trans "Tag(s)" %}</label><select id='id_tags' name='tags' multiple='selected' size='5'>{% for t in tag_choices %}<option value='{{t.name}}'{% if t.name|in_list:query_params.tags %} selected='selected'{% endif %}>{{ t.name }}</option>{% endfor %}</select>
|
||||
<p class='filterHelp'>Ctrl-click to select multiple options</p>
|
||||
<p class='filterHelp'>{% trans "Ctrl-click to select multiple options" %}</p>
|
||||
<input type='button' class='filterBuilderRemove' value='-' />
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class='filterBox{% if query %} filterBoxShow{% endif %}' id='filterBoxKeywords'>
|
||||
<label for='id_query'>{% trans "Keywords" %}</label><input type='text' name='q' value='{{ query }}' id='id_query' />
|
||||
<p class='filterHelp'>Keywords are case-insensitive, and will be looked for in the title, body and submitter fields.</p>
|
||||
<p class='filterHelp'>{% trans "Keywords are case-insensitive, and will be looked for in the title, body and submitter fields." %}</p>
|
||||
<input type='button' class='filterBuilderRemove' value='-' />
|
||||
</div>
|
||||
<hr style='clear: both;' />
|
||||
@ -193,7 +193,7 @@ $(document).ready(function() {
|
||||
|
||||
|
||||
{{ search_message|safe }}
|
||||
<form method='post' action='{% url helpdesk_mass_update %}'>
|
||||
<form method='post' action='{% url helpdesk_mass_update %}' id="ticket_mass_update">
|
||||
<table width='100%'>
|
||||
<tr class='row_tablehead'><td colspan='9'>{% trans "Tickets" %}</td></tr>
|
||||
<tr class='row_columnheads'><th>#</th><th> </th><th>{% trans "Pr" %}</th><th>{% trans "Title" %}</th><th>{% trans "Queue" %}</th><th>{% trans "Status" %}</th><th>{% trans "Created" %}</th><th>{% trans "Owner" %}</th>{% if tags_enabled %}<th>{% trans "Tags" %}</th>{% endif %}</tr>
|
||||
|
@ -16,8 +16,9 @@ def saved_queries(request):
|
||||
user_saved_queries = SavedSearch.objects.filter(Q(user=request.user) | Q(shared__exact=True))
|
||||
return user_saved_queries
|
||||
except Exception, e:
|
||||
print "'saved_queries' template tag (django-helpdesk) crashed with following error:"
|
||||
print e
|
||||
import sys
|
||||
print >> sys.stderr, "'saved_queries' template tag (django-helpdesk) crashed with following error:"
|
||||
print >> sys.stderr, e
|
||||
return ''
|
||||
|
||||
register = Library()
|
||||
|
@ -15,6 +15,7 @@ from django.shortcuts import render_to_response, get_object_or_404
|
||||
from django.template import RequestContext
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from helpdesk import settings as helpdesk_settings
|
||||
from helpdesk.models import KBCategory, KBItem
|
||||
|
||||
|
||||
@ -24,6 +25,7 @@ def index(request):
|
||||
return render_to_response('helpdesk/kb_index.html',
|
||||
RequestContext(request, {
|
||||
'kb_categories': category_list,
|
||||
'helpdesk_settings': helpdesk_settings,
|
||||
}))
|
||||
|
||||
|
||||
@ -34,6 +36,7 @@ def category(request, slug):
|
||||
RequestContext(request, {
|
||||
'category': category,
|
||||
'items': items,
|
||||
'helpdesk_settings': helpdesk_settings,
|
||||
}))
|
||||
|
||||
|
||||
@ -42,6 +45,7 @@ def item(request, item):
|
||||
return render_to_response('helpdesk/kb_item.html',
|
||||
RequestContext(request, {
|
||||
'item': item,
|
||||
'helpdesk_settings': helpdesk_settings,
|
||||
}))
|
||||
|
||||
|
||||
|
@ -111,6 +111,7 @@ def view_ticket(request):
|
||||
return render_to_response('helpdesk/public_view_ticket.html',
|
||||
RequestContext(request, {
|
||||
'ticket': ticket,
|
||||
'helpdesk_settings': helpdesk_settings,
|
||||
}))
|
||||
|
||||
return render_to_response('helpdesk/public_view_form.html',
|
||||
|
@ -8,6 +8,7 @@ views/staff.py - The bulk of the application - provides most business logic and
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
import sys
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
@ -590,7 +591,7 @@ def ticket_list(request):
|
||||
query_params['sortreverse'] = sortreverse
|
||||
|
||||
ticket_qs = apply_query(Ticket.objects.select_related(), query_params)
|
||||
print str(ticket_qs.query)
|
||||
print >> sys.stderr, str(ticket_qs.query)
|
||||
|
||||
## TAG MATCHING
|
||||
if HAS_TAG_SUPPORT:
|
||||
|
Loading…
Reference in New Issue
Block a user