X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=roundup%2Ftemplates%2Fextended%2Finterfaces.py;h=b3db3c7f12438b0ab21fc8477e0a8866a2ed5fe1;hb=729c4981a73b1eadd183066b120f65d6b9d0db19;hp=c093c663adfe108575036987ceebaf22b5d931ef;hpb=efe03825ec770b4c20f5264e30a705b22e73267a;p=roundup.git diff --git a/roundup/templates/extended/interfaces.py b/roundup/templates/extended/interfaces.py index c093c66..b3db3c7 100644 --- a/roundup/templates/extended/interfaces.py +++ b/roundup/templates/extended/interfaces.py @@ -1,6 +1,23 @@ -# $Id: interfaces.py,v 1.2 2001-07-29 07:01:39 richard Exp $ +# +# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) +# This module is free software, and you may redistribute it and/or modify +# under the same terms as Python, so long as this copyright message and +# disclaimer are retained in their original form. +# +# IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR +# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING +# OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" +# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, +# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +# +# $Id: interfaces.py,v 1.9 2001-08-07 00:24:43 richard Exp $ -import instance_config +import instance_config, urlparse, os from roundup import cgi_client, mailgw class Client(cgi_client.Client): @@ -8,7 +25,60 @@ class Client(cgi_client.Client): with any specific extensions ''' TEMPLATES = instance_config.TEMPLATES - pass + showsupport = cgi_client.Client.shownode + showtimelog = cgi_client.Client.shownode + newsupport = cgi_client.Client.newnode + newtimelog = cgi_client.Client.newnode + + default_index_sort = ['-activity'] + default_index_group = ['priority'] + default_index_filter = [] + default_index_columns = ['activity','status','title','assignedto'] + default_index_filterspec = {'status': ['1', '2', '3', '4', '5', '6', '7']} + + def pagehead(self, title, message=None): + url = self.env['SCRIPT_NAME'] + '/' #self.env.get('PATH_INFO', '/') + machine = self.env['SERVER_NAME'] + port = self.env['SERVER_PORT'] + if port != '80': machine = machine + ':' + port + base = urlparse.urlunparse(('http', machine, url, None, None, None)) + if message is not None: + message = '
%s
'%message + else: + message = '' + style = open(os.path.join(self.TEMPLATES, 'style.css')).read() + userid = self.db.user.lookup(self.user) + if self.user == 'admin': + extras = ' | Class List' + else: + extras = '' + self.write(''' +%s + + + +%s + + + + + + +
%s%s
All +Issues, +Support +| Unassigned +Issues, +Support +| Add +Issue, +Support, +User +%s +My Issues | +My Support | +My Details
+'''%(title, style, message, title, self.user, extras, userid, userid, userid)) class MailGW(mailgw.MailGW): ''' derives basic mail gateway implementation from the standard module, @@ -20,6 +90,31 @@ class MailGW(mailgw.MailGW): # # $Log: not supported by cvs2svn $ +# Revision 1.8 2001/08/07 00:15:51 richard +# Added the copyright/license notice to (nearly) all files at request of +# Bizar Software. +# +# Revision 1.7 2001/08/02 00:43:06 richard +# Even better (more useful) headings +# +# Revision 1.6 2001/08/02 00:36:42 richard +# Made all the user-specific link names the same (My Foo) +# +# Revision 1.5 2001/08/01 05:15:09 richard +# Added "My Issues" and "My Support" to extended template. +# +# Revision 1.4 2001/07/30 08:12:17 richard +# Added time logging and file uploading to the templates. +# +# Revision 1.3 2001/07/30 01:26:59 richard +# Big changes: +# . split off the support priority into its own class +# . added "new support, new user" to the page head +# . fixed the display options for the heading links +# +# Revision 1.2 2001/07/29 07:01:39 richard +# Added vim command to all source so that we don't get no steenkin' tabs :) +# # Revision 1.1 2001/07/23 23:16:01 richard # Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff. #