diff --git a/LICENSE b/LICENSE index 4be731a0..5bac8794 100644 --- a/LICENSE +++ b/LICENSE @@ -28,6 +28,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EXCEPTIONS -This software is distributed with a copy of jQuery, a javascript library written by John Resig. jQuery is not distributed under the above license, but rather uses the MIT license. See LICENSE.JQUERY for further details. - -This software is also distributed with a copy of nicEdit, a javascript rich-text editor written by Brian Kirchoff. nicEdit is not distributed under the above license, but rather uses the MIT license. See LICENSE.NICEDIT for further details. +This software is distributed with some third-party software which is not distributed under the above license. See LICENSE.3RDPARTY for further details. diff --git a/LICENSE.3RDPARTY b/LICENSE.3RDPARTY new file mode 100644 index 00000000..b00a7e7c --- /dev/null +++ b/LICENSE.3RDPARTY @@ -0,0 +1,69 @@ +This file contains license details for 3rd party software which is +distributed with Jutda Helpdesk. + +1. License for jQuery & jQuery UI +2. License for nicEdit +3. License for jQuery UI 'Smoothness' theme + +---------------------------------------------------------------------- + +1. License for jQuery & jQuery UI + +Copyright (c) 2007 John Resig, http://jquery.com/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +---------------------------------------------------------------------- + +2. License for nicEdit + +Copyright (c) 2007 Brian Kirchoff (http://nicedit.com) + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +---------------------------------------------------------------------- + +3. License for jQuery UI 'Smoothness' theme + +/* + * jQuery UI screen structure and presentation + * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI + * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com + * Visit ThemeRoller.com +*/ diff --git a/LICENSE.JQUERY b/LICENSE.JQUERY deleted file mode 100644 index 965a8313..00000000 --- a/LICENSE.JQUERY +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2007 John Resig, http://jquery.com/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/LICENSE.NICEDIT b/LICENSE.NICEDIT deleted file mode 100644 index 6b294b18..00000000 --- a/LICENSE.NICEDIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2007 Brian Kirchoff (http://nicedit.com) - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/admin.py b/admin.py index 170f5c80..a7dae0b3 100644 --- a/admin.py +++ b/admin.py @@ -20,9 +20,6 @@ class AttachmentInline(admin.StackedInline): class FollowUpAdmin(admin.ModelAdmin): inlines = [TicketChangeInline, AttachmentInline] -class PreSetReplyAdmin(admin.ModelAdmin): - list_display = ('name',) - admin.site.register(Ticket, TicketAdmin) admin.site.register(Queue, QueueAdmin) admin.site.register(FollowUp, FollowUpAdmin) diff --git a/htdocs/helpdesk.css b/htdocs/helpdesk.css index 0625ff31..4a489642 100644 --- a/htdocs/helpdesk.css +++ b/htdocs/helpdesk.css @@ -200,7 +200,24 @@ textarea#commentBox { .filterBox { display: none; + float: left; + border: solid #ccc 1px; + padding: 2px; + margin: 4px; + max-width: 24%; } + .filterBoxShow { display: block; } + +.filterBox label { + clear: both; + display: block; +} + +.filterBox .filterHelp { + color: #aaa; + font-size: 0.8em; + clear: both; +} diff --git a/htdocs/jquery-smoothness-theme/demo.html b/htdocs/jquery-smoothness-theme/demo.html new file mode 100644 index 00000000..6d52fea9 --- /dev/null +++ b/htdocs/jquery-smoothness-theme/demo.html @@ -0,0 +1,167 @@ + + +
+ +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+I'm in a dialog!
+Are you sure you want to delete this saved filter (%(query_title)s" +"em>)? To re-create it, you will need to manually re-filter your ticket " +"listing.
\n" +msgstr "" + +#: templates/helpdesk/confirm_delete_saved_query.html:11 +msgid "" +"\n" +"You have shared this query, so other users may be using it. If you delete " +"it, they will have to manually create their own query.
\n" +msgstr "" + +#: templates/helpdesk/confirm_delete_saved_query.html:15 +#: templates/helpdesk/delete_ticket.html:11 +msgid "" +"\n" +"\n" +"\n" +msgstr "" + #: templates/helpdesk/create_ticket.html:3 msgid "Create Ticket" msgstr "" @@ -685,7 +750,7 @@ msgid "Your Tickets" msgstr "" #: templates/helpdesk/dashboard.html:26 templates/helpdesk/dashboard.html:41 -#: templates/helpdesk/ticket_list.html:59 +#: templates/helpdesk/ticket_list.html:115 msgid "Pr" msgstr "" @@ -710,11 +775,6 @@ msgid "" "Are you sure you want to delete this ticket (%(ticket_title)s)? " "All traces of the ticket, including followups, attachments, and updates will " "be irreversably removed.
\n" -"\n" -"\n" -"\n" -"\n" msgstr "" #: templates/helpdesk/kb_category.html:4 @@ -1036,9 +1096,9 @@ msgstr "" msgid "Change Further Details »" msgstr "" -#: templates/helpdesk/ticket.html:156 templates/helpdesk/ticket_list.html:13 -#: templates/helpdesk/ticket_list.html:28 -#: templates/helpdesk/ticket_list.html:59 +#: templates/helpdesk/ticket.html:156 templates/helpdesk/ticket_list.html:29 +#: templates/helpdesk/ticket_list.html:44 +#: templates/helpdesk/ticket_list.html:115 msgid "Owner" msgstr "" @@ -1062,32 +1122,74 @@ msgstr "" msgid "Ticket Listing" msgstr "" -#: templates/helpdesk/ticket_list.html:12 +#: templates/helpdesk/ticket_list.html:26 +msgid "Change Query" +msgstr "" + +#: templates/helpdesk/ticket_list.html:28 msgid "Sorting" msgstr "" -#: templates/helpdesk/ticket_list.html:16 -#: templates/helpdesk/ticket_list.html:50 +#: templates/helpdesk/ticket_list.html:32 +#: templates/helpdesk/ticket_list.html:70 msgid "Keywords" msgstr "" -#: templates/helpdesk/ticket_list.html:34 +#: templates/helpdesk/ticket_list.html:51 msgid "Owner(s)" msgstr "" -#: templates/helpdesk/ticket_list.html:39 +#: templates/helpdesk/ticket_list.html:57 msgid "Queue(s)" msgstr "" -#: templates/helpdesk/ticket_list.html:44 +#: templates/helpdesk/ticket_list.html:63 msgid "Status(es)" msgstr "" -#: templates/helpdesk/ticket_list.html:54 +#: templates/helpdesk/ticket_list.html:75 msgid "Apply Filter" msgstr "" -#: templates/helpdesk/ticket_list.html:71 +#: templates/helpdesk/ticket_list.html:80 +#: templates/helpdesk/ticket_list.html:95 +msgid "Save Query" +msgstr "" + +#: templates/helpdesk/ticket_list.html:86 +msgid "" +"This name appears in the drop-down list of saved queries. If you share your " +"query, other users will see this name, so choose something clear and " +"descriptive!" +msgstr "" + +#: templates/helpdesk/ticket_list.html:88 +msgid "Shared?" +msgstr "" + +#: templates/helpdesk/ticket_list.html:89 +msgid "Yes, share this query with other users." +msgstr "" + +#: templates/helpdesk/ticket_list.html:90 +msgid "" +"If you share this query, it will be visible by all other logged-in " +"users." +msgstr "" + +#: templates/helpdesk/ticket_list.html:102 +msgid "Use Saved Query" +msgstr "" + +#: templates/helpdesk/ticket_list.html:104 +msgid "Query" +msgstr "" + +#: templates/helpdesk/ticket_list.html:109 +msgid "Run Query" +msgstr "" + +#: templates/helpdesk/ticket_list.html:127 msgid "No Tickets Match Your Selection" msgstr "" @@ -1183,23 +1285,23 @@ msgstr "" msgid "Invalid ticket ID or e-mail address. Please try again." msgstr "" -#: views/staff.py:107 +#: views/staff.py:111 msgid "Accepted resolution and closed ticket" msgstr "" -#: views/staff.py:143 +#: views/staff.py:147 #, python-format msgid "Assigned to %(username)s" msgstr "" -#: views/staff.py:165 +#: views/staff.py:169 msgid "Updated" msgstr "" -#: views/staff.py:369 +#: views/staff.py:401 msgid "Ticket taken off hold" msgstr "" -#: views/staff.py:372 +#: views/staff.py:404 msgid "Ticket placed on hold" msgstr "" diff --git a/models.py b/models.py index 7c4a321a..aefed79d 100644 --- a/models.py +++ b/models.py @@ -817,3 +817,41 @@ class KBItem(models.Model): return ('helpdesk_kb_item', [str(self.id)]) get_absolute_url = models.permalink(get_absolute_url) + +class SavedSearch(models.Model): + """ + Allow a user to save a ticket search, eg their filtering and sorting + options, and optionally share it with other users. This lets people + easily create a set of commonly-used filters, such as: + * My tickets waiting on me + * My tickets waiting on submitter + * My tickets in 'Priority Support' queue with priority of 1 + * All tickets containing the word 'billing'. + etc... + """ + user = models.ForeignKey(User) + + title = models.CharField( + _('Query Name'), + max_length=100, + help_text=_('User-provided name for this query'), + ) + + shared = models.BooleanField( + _('Shared With Other Users?'), + default=False, + blank=True, + null=True, + help_text=_('Should other users see this query?'), + ) + + query = models.TextField( + _('Search Query'), + help_text=_('Pickled query object. Be wary changing this.'), + ) + + def __unicode__(self): + if self.shared: + return u'%s (*)' % self.title + else: + return u'%s' % self.title diff --git a/templates/helpdesk/base.html b/templates/helpdesk/base.html index ca2f4c31..23e2ef43 100644 --- a/templates/helpdesk/base.html +++ b/templates/helpdesk/base.html @@ -3,7 +3,9 @@Are you sure you want to delete this saved filter ({{ query_title }})? To re-create it, you will need to manually re-filter your ticket listing.
+{% endblocktrans %} + +{% if query.shared %}{% blocktrans %} +You have shared this query, so other users may be using it. If you delete it, they will have to manually create their own query.
+{% endblocktrans %}{% endif %} + +{% blocktrans %} + + +{% endblocktrans %}{% endblock %} diff --git a/templates/helpdesk/delete_ticket.html b/templates/helpdesk/delete_ticket.html index 67a549d1..b62a7208 100644 --- a/templates/helpdesk/delete_ticket.html +++ b/templates/helpdesk/delete_ticket.html @@ -6,8 +6,9 @@Are you sure you want to delete this ticket ({{ ticket_title }})? All traces of the ticket, including followups, attachments, and updates will be irreversably removed.
+{% endblocktrans %} - +{% blocktrans %} {% endblocktrans %}{% endblock %} diff --git a/templates/helpdesk/ticket_list.html b/templates/helpdesk/ticket_list.html index 7f772612..2eefea24 100644 --- a/templates/helpdesk/ticket_list.html +++ b/templates/helpdesk/ticket_list.html @@ -3,11 +3,27 @@ {% block helpdesk_head %} + + {% endblock %} {% block helpdesk_body %} {% load in_list %} +