|
1 | | -# $Id: cgi_client.py,v 1.8 2001-07-29 08:27:40 richard Exp $ |
| 1 | +# $Id: cgi_client.py,v 1.9 2001-07-30 01:25:07 richard Exp $ |
2 | 2 |
|
3 | 3 | import os, cgi, pprint, StringIO, urlparse, re, traceback |
4 | 4 |
|
@@ -41,29 +41,17 @@ def pagehead(self, title, message=None): |
41 | 41 | message = '' |
42 | 42 | style = open(os.path.join(self.TEMPLATES, 'style.css')).read() |
43 | 43 | userid = self.db.user.lookup(self.user) |
44 | | - if self.user == 'admin': |
45 | | - extras = ' | <a href="list_classes">Class List</a>' |
46 | | - else: |
47 | | - extras = '' |
48 | 44 | self.write('''<html><head> |
49 | 45 | <title>%s</title> |
50 | 46 | <style type="text/css">%s</style> |
51 | 47 | </head> |
52 | 48 | <body bgcolor=#ffffff> |
53 | 49 | %s |
54 | 50 | <table width=100%% border=0 cellspacing=0 cellpadding=2> |
55 | | -<tr class="location-bar"><td><big><strong>%s</strong></big></td> |
56 | | -<td align=right valign=bottom>%s</td></tr> |
57 | | -<tr class="location-bar"> |
58 | | -<td align=left><a href="issue?status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=activity,status,title&:group=priority">All issues</a> | |
59 | | -<a href="issue?priority=fatal-bug,bug">Bugs</a> | |
60 | | -<a href="issue?priority=usability">Support</a> | |
61 | | -<a href="issue?priority=feature">Wishlist</a> | |
62 | | -<a href="newissue">New Issue</a> |
63 | | -%s</td> |
64 | | -<td align=right><a href="user%s">Your Details</a></td> |
| 51 | +<tr class="location-bar"><td><big><strong>%s</strong></big> |
| 52 | +(login: <a href="user%s">%s</a>)</td></tr> |
65 | 53 | </table> |
66 | | -'''%(title, style, message, title, self.user, extras, userid)) |
| 54 | +'''%(title, style, message, title, userid, self.user)) |
67 | 55 |
|
68 | 56 | def pagefoot(self): |
69 | 57 | if self.debug: |
@@ -131,7 +119,7 @@ def index_filterspec(self): |
131 | 119 | default_index_sort = ['-activity'] |
132 | 120 | default_index_group = ['priority'] |
133 | 121 | default_index_filter = [] |
134 | | - default_index_columns = ['activity','status','title'] |
| 122 | + default_index_columns = ['id','activity','title','status','assignedto'] |
135 | 123 | default_index_filterspec = {'status': ['1', '2', '3', '4', '5', '6', '7']} |
136 | 124 | def index(self): |
137 | 125 | ''' put up an index |
@@ -402,7 +390,9 @@ def newissue(self, message=None): |
402 | 390 | m.append('%s: %s'%(name, value)) |
403 | 391 |
|
404 | 392 | # handle the note |
405 | | - note = self.form.get('__note', None) |
| 393 | + note = None |
| 394 | + if self.form.has_key('__note'): |
| 395 | + note = self.form['__note'] |
406 | 396 | if note and note.value: |
407 | 397 | note = note.value |
408 | 398 | if '\n' in note: |
@@ -433,6 +423,7 @@ def newissue(self, message=None): |
433 | 423 | htmltemplate.newitem(self, self.TEMPLATES, self.db, self.classname, |
434 | 424 | self.form) |
435 | 425 | self.pagefoot() |
| 426 | + newuser = newissue |
436 | 427 |
|
437 | 428 | def showuser(self, message=None): |
438 | 429 | ''' display an item |
@@ -503,6 +494,10 @@ def __del__(self): |
503 | 494 |
|
504 | 495 | # |
505 | 496 | # $Log: not supported by cvs2svn $ |
| 497 | +# Revision 1.8 2001/07/29 08:27:40 richard |
| 498 | +# Fixed handling of passed-in values in form elements (ie. during a |
| 499 | +# drill-down) |
| 500 | +# |
506 | 501 | # Revision 1.7 2001/07/29 07:01:39 richard |
507 | 502 | # Added vim command to all source so that we don't get no steenkin' tabs :) |
508 | 503 | # |
|
0 commit comments