Mercurial > p > roundup > code
annotate roundup/templates/extended/interfaces.py @ 213:d45384bc6420
Added the copyright/license notice to (nearly) all files...
...at request of Bizar Software.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 07 Aug 2001 00:15:51 +0000 |
| parents | 2c5135c902ff |
| children | 18134bffab37 |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
3 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
4 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
5 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
6 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
7 # IN NO EVENT SHALL THE BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
17 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
18 # $Id: interfaces.py,v 1.8 2001-08-07 00:15:51 richard Exp $ |
|
55
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 |
| 144 | 20 import instance_config, urlparse, os |
|
55
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
21 from roundup import cgi_client, mailgw |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
22 |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
23 class Client(cgi_client.Client): |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
24 ''' derives basic mail gateway implementation from the standard module, |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
25 with any specific extensions |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
26 ''' |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
27 TEMPLATES = instance_config.TEMPLATES |
|
167
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
28 showsupport = cgi_client.Client.shownode |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
29 showtimelog = cgi_client.Client.shownode |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
30 newsupport = cgi_client.Client.newnode |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
31 newtimelog = cgi_client.Client.newnode |
| 144 | 32 |
| 33 default_index_sort = ['-activity'] | |
| 34 default_index_group = ['priority'] | |
| 35 default_index_filter = [] | |
| 36 default_index_columns = ['activity','status','title','assignedto'] | |
| 37 default_index_filterspec = {'status': ['1', '2', '3', '4', '5', '6', '7']} | |
| 38 | |
| 39 def pagehead(self, title, message=None): | |
| 40 url = self.env['SCRIPT_NAME'] + '/' #self.env.get('PATH_INFO', '/') | |
| 41 machine = self.env['SERVER_NAME'] | |
| 42 port = self.env['SERVER_PORT'] | |
| 43 if port != '80': machine = machine + ':' + port | |
| 44 base = urlparse.urlunparse(('http', machine, url, None, None, None)) | |
| 45 if message is not None: | |
| 46 message = '<div class="system-msg">%s</div>'%message | |
| 47 else: | |
| 48 message = '' | |
| 49 style = open(os.path.join(self.TEMPLATES, 'style.css')).read() | |
| 50 userid = self.db.user.lookup(self.user) | |
| 51 if self.user == 'admin': | |
| 52 extras = ' | <a href="list_classes">Class List</a>' | |
| 53 else: | |
| 54 extras = '' | |
| 55 self.write('''<html><head> | |
| 56 <title>%s</title> | |
| 57 <style type="text/css">%s</style> | |
| 58 </head> | |
| 59 <body bgcolor=#ffffff> | |
| 60 %s | |
| 61 <table width=100%% border=0 cellspacing=0 cellpadding=2> | |
| 62 <tr class="location-bar"><td><big><strong>%s</strong></big></td> | |
| 63 <td align=right valign=bottom>%s</td></tr> | |
| 64 <tr class="location-bar"> | |
|
183
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
65 <td align=left>All |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
66 <a href="issue?status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=id,activity,status,title,assignedto&:group=priority">Issues</a>, |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
67 <a href="support?status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=id,activity,status,title,assignedto&:group=customername">Support</a> |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
68 | Unassigned |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
69 <a href="issue?assignedto=admin&status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=id,activity,status,title,assignedto&:group=priority">Issues</a>, |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
70 <a href="support?assignedto=admin&status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=id,activity,status,title,assignedto&:group=customername">Support</a> |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
71 | Add |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
72 <a href="newissue">Issue</a>, |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
73 <a href="newsupport">Support</a>, |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
74 <a href="newuser">User</a> |
| 144 | 75 %s</td> |
|
176
9cfab7f55df0
Added "My Issues" and "My Support" to extended template.
Richard Jones <richard@users.sourceforge.net>
parents:
167
diff
changeset
|
76 <td align=right> |
|
9cfab7f55df0
Added "My Issues" and "My Support" to extended template.
Richard Jones <richard@users.sourceforge.net>
parents:
167
diff
changeset
|
77 <a href="issue?assignedto=%s&status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=id,activity,status,title,assignedto&:group=priority">My Issues</a> | |
|
9cfab7f55df0
Added "My Issues" and "My Support" to extended template.
Richard Jones <richard@users.sourceforge.net>
parents:
167
diff
changeset
|
78 <a href="support?assignedto=%s&status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=id,activity,status,title,assignedto&:group=customername">My Support</a> | |
|
182
b6b79523be74
Made all the user-specific link names the same (My Foo)
Richard Jones <richard@users.sourceforge.net>
parents:
176
diff
changeset
|
79 <a href="user%s">My Details</a></td> |
| 144 | 80 </table> |
|
176
9cfab7f55df0
Added "My Issues" and "My Support" to extended template.
Richard Jones <richard@users.sourceforge.net>
parents:
167
diff
changeset
|
81 '''%(title, style, message, title, self.user, extras, userid, userid, userid)) |
|
55
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
82 |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
83 class MailGW(mailgw.MailGW): |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
84 ''' derives basic mail gateway implementation from the standard module, |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
85 with any specific extensions |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
86 ''' |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
87 ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
88 ADMIN_EMAIL = instance_config.ADMIN_EMAIL |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
89 MAILHOST = instance_config.MAILHOST |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
90 |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
91 # |
|
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
92 # $Log: not supported by cvs2svn $ |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
93 # Revision 1.7 2001/08/02 00:43:06 richard |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
94 # Even better (more useful) headings |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
183
diff
changeset
|
95 # |
|
183
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
96 # Revision 1.6 2001/08/02 00:36:42 richard |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
97 # Made all the user-specific link names the same (My Foo) |
|
2c5135c902ff
Even better (more useful) headings
Richard Jones <richard@users.sourceforge.net>
parents:
182
diff
changeset
|
98 # |
|
182
b6b79523be74
Made all the user-specific link names the same (My Foo)
Richard Jones <richard@users.sourceforge.net>
parents:
176
diff
changeset
|
99 # Revision 1.5 2001/08/01 05:15:09 richard |
|
b6b79523be74
Made all the user-specific link names the same (My Foo)
Richard Jones <richard@users.sourceforge.net>
parents:
176
diff
changeset
|
100 # Added "My Issues" and "My Support" to extended template. |
|
b6b79523be74
Made all the user-specific link names the same (My Foo)
Richard Jones <richard@users.sourceforge.net>
parents:
176
diff
changeset
|
101 # |
|
176
9cfab7f55df0
Added "My Issues" and "My Support" to extended template.
Richard Jones <richard@users.sourceforge.net>
parents:
167
diff
changeset
|
102 # Revision 1.4 2001/07/30 08:12:17 richard |
|
9cfab7f55df0
Added "My Issues" and "My Support" to extended template.
Richard Jones <richard@users.sourceforge.net>
parents:
167
diff
changeset
|
103 # Added time logging and file uploading to the templates. |
|
9cfab7f55df0
Added "My Issues" and "My Support" to extended template.
Richard Jones <richard@users.sourceforge.net>
parents:
167
diff
changeset
|
104 # |
|
167
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
105 # Revision 1.3 2001/07/30 01:26:59 richard |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
106 # Big changes: |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
107 # . split off the support priority into its own class |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
108 # . added "new support, new user" to the page head |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
109 # . fixed the display options for the heading links |
|
a49c8a2ddd26
Added time logging and file uploading to the templates.
Richard Jones <richard@users.sourceforge.net>
parents:
144
diff
changeset
|
110 # |
| 144 | 111 # Revision 1.2 2001/07/29 07:01:39 richard |
| 112 # Added vim command to all source so that we don't get no steenkin' tabs :) | |
| 113 # | |
|
127
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
55
diff
changeset
|
114 # Revision 1.1 2001/07/23 23:16:01 richard |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
55
diff
changeset
|
115 # Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff. |
|
55
bd7be96eb56d
Split off the interfaces (CGI, mailgw) into a separate file from the DB stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
116 # |
|
127
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
55
diff
changeset
|
117 # |
|
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
55
diff
changeset
|
118 # vim: set filetype=python ts=4 sw=4 et si |
