Code

Big changes:
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 30 Jul 2001 01:26:59 +0000 (01:26 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 30 Jul 2001 01:26:59 +0000 (01:26 +0000)
 . 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

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@150 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/templates/extended/dbinit.py
roundup/templates/extended/html/issue.filter
roundup/templates/extended/html/issue.index
roundup/templates/extended/html/issue.item
roundup/templates/extended/htmlbase.py
roundup/templates/extended/interfaces.py

index 905d83b4d69a2ac7fabe6af3dc59baa9757deafc..f870b490e70821bc53c9c23fb44ab41b3234f7c4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: dbinit.py,v 1.7 2001-07-29 07:01:39 richard Exp $
+# $Id: dbinit.py,v 1.8 2001-07-30 01:26:59 richard Exp $
 
 import os
 
@@ -78,13 +78,18 @@ def open(name=None):
                     date=Date(),         time=String(),
                     performedby=Link("user"), description=String())
 
+    support = IssueClass(db, "support", 
+                    assignedto=Link("user"), status=Link("status"),
+                    rate=Link("rate"), source=Link("source"),
+                    product=Link("product"), platform=Multilink("platform"),
+                    version=String(), timelog=Multilink("timelog"),
+                    customername=String())
+
     issue = IssueClass(db, "issue", 
                     assignedto=Link("user"), priority=Link("priority"), 
-                    status=Link("status"),   rate=Link("rate"), 
-                    source=Link("source"),   product=Link("product"), 
+                    status=Link("status"), product=Link("product"), 
                     platform=Multilink("platform"), version=String(),
-                    timelog=Multilink("timelog"), customername=String())
-    issue.setkey('title')
+                    supportcall=Multilink("support"))
 
     import detectors
     detectors.init(db)
@@ -109,7 +114,6 @@ def init(adminpw):
     pri.create(name="bug", order="2")
     pri.create(name="usability", order="3")
     pri.create(name="feature", order="4")
-    pri.create(name="support", order="5")
 
     stat = db.getclass('status')
     stat.create(name="unread", order="1")
@@ -151,6 +155,9 @@ def init(adminpw):
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.7  2001/07/29 07:01:39  richard
+# Added vim command to all source so that we don't get no steenkin' tabs :)
+#
 # Revision 1.6  2001/07/25 01:23:07  richard
 # Added the Roundup spec to the new documentation directory.
 #
index 4a05d0b47f8ef827b9d069d28924249261b43373..e4ade857770ce34582260115fc3c36a8b12b0d0e 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Id: issue.filter,v 1.1 2001-07-23 04:21:20 richard Exp $-->
+<!-- $Id: issue.filter,v 1.2 2001-07-30 01:26:59 richard Exp $-->
 <property name="title">
  <tr><th width="1%" align="right" class="location-bar">Title</th>
  <td><display call="field('title')"></td></tr>
  <tr><th width="1%" align="right" class="location-bar">Version</th>
  <td><display call="field('version')"></td></tr>
 </property>
-<property name="source">
- <tr><th width="1%" align="right" class="location-bar">Source</th>
- <td><display call="checklist('source')"></td></tr>
-</property>
 <property name="assignedto">
  <tr><th width="1%" align="right" class="location-bar">Assigned&nbsp;to</th>
  <td><display call="checklist('assignedto')"></td></tr>
 </property>
-<property name="customername">
- <tr><th width="1%" align="right" class="location-bar">Customer&nbsp;name</th>
- <td><display call="field('customername')"></td></tr>
-</property>
index ea00a36f25e41841350be4b893464e68dcb79fd4..0109620ef74e9036ec51b1ba09ccf6bf8464a3c9 100644 (file)
@@ -1,5 +1,8 @@
-<!-- $Id: issue.index,v 1.1 2001-07-23 04:21:20 richard Exp $-->
+<!-- $Id: issue.index,v 1.2 2001-07-30 01:26:59 richard Exp $-->
 <tr>
+    <property name="id">
+        <td valign="top"><display call="field('id')"></td>
+    </property>
     <property name="activity">
         <td valign="top"><display call="reldate('activity', pretty=1)"></td>
     </property>
     <property name="version">
         <td valign="top"><display call="plain('version')"></td>
     </property>
-    <property name="source">
-        <td valign="top"><display call="plain('source')"></td>
-    </property>
     <property name="assignedto">
         <td valign="top"><display call="plain('assignedto')"></td>
     </property>
-    <property name="customername">
-        <td valign="top"><display call="plain('customername')"></td>
-    </property>
 </tr>
index d971da26962c7a577320466eded8b099d17f524c..eb4cb65b19594380bfb4e94a1641ce5448a33cae 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $Id: issue.item,v 1.1 2001-07-23 04:21:20 richard Exp $-->
+<!-- $Id: issue.item,v 1.2 2001-07-30 01:26:59 richard Exp $-->
 <table border=0 cellspacing=0 cellpadding=2>
 
 <tr class="strong-header">
 <tr bgcolor="ffffea">
     <td width=1% nowrap align=right><span class="form-label">Priority</span></td>
     <td class="form-text"><display call="field('priority')"></td>
-    <td width=1% nowrap align=right><span class="form-label">Source</span></td>
-    <td class="form-text"><display call="field('source')"></td>
-</tr>
-
-<tr bgcolor="ffffea">
     <td width=1% nowrap align=right><span class="form-label">Status</span></td>
     <td class="form-text"><display call="menu('status')"></td>
-    <td width=1% nowrap align=right><span class="form-label">Rate</span></td>
-    <td class="form-text"><display call="field('rate')"></td>
 </tr>
 
 <tr bgcolor="ffffea">
     <td width=1% nowrap align=right><span class="form-label">Assigned To</span></td>
     <td class="form-text"><display call="field('assignedto')"></td>
-    <td width=1% nowrap align=right><span class="form-label">Customer Name</span></td>
-    <td class="form-text"><display call="field('customername')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Empty</span></td>
+    <td class="form-text">XXXX</td>
 </tr>
 
 <tr bgcolor="ffffea">
index 022fd31929b5f4672028233ec00064d6efcbdbbc..0db6bd602733f66108f4a2d0b0af27d85b37df1b 100644 (file)
@@ -2,7 +2,7 @@
 # Do Not Edit (Unless You Want To)
 # This file automagically generated by roundup.htmldata.makeHtmlBase
 # 
-fileDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+fileDOTindex = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <tr>
     <property name="name">
         <td><display call="link('name')"></td>
@@ -13,7 +13,7 @@ fileDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-
 </tr>
 """
 
-issueDOTfilter = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+issueDOTfilter = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <property name="title">
  <tr><th width="1%" align="right" class="location-bar">Title</th>
  <td><display call="field('title')"></td></tr>
@@ -38,22 +38,17 @@ issueDOTfilter = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp
  <tr><th width="1%" align="right" class="location-bar">Version</th>
  <td><display call="field('version')"></td></tr>
 </property>
-<property name="source">
- <tr><th width="1%" align="right" class="location-bar">Source</th>
- <td><display call="checklist('source')"></td></tr>
-</property>
 <property name="assignedto">
  <tr><th width="1%" align="right" class="location-bar">Assigned&nbsp;to</th>
  <td><display call="checklist('assignedto')"></td></tr>
 </property>
-<property name="customername">
- <tr><th width="1%" align="right" class="location-bar">Customer&nbsp;name</th>
- <td><display call="field('customername')"></td></tr>
-</property>
 """
 
-issueDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+issueDOTindex = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <tr>
+    <property name="id">
+        <td valign="top"><display call="field('id')"></td>
+    </property>
     <property name="activity">
         <td valign="top"><display call="reldate('activity', pretty=1)"></td>
     </property>
@@ -75,19 +70,13 @@ issueDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $
     <property name="version">
         <td valign="top"><display call="plain('version')"></td>
     </property>
-    <property name="source">
-        <td valign="top"><display call="plain('source')"></td>
-    </property>
     <property name="assignedto">
         <td valign="top"><display call="plain('assignedto')"></td>
     </property>
-    <property name="customername">
-        <td valign="top"><display call="plain('customername')"></td>
-    </property>
 </tr>
 """
 
-issueDOTitem = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+issueDOTitem = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <table border=0 cellspacing=0 cellpadding=2>
 
 <tr class="strong-header">
@@ -118,22 +107,15 @@ issueDOTitem = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-
 <tr bgcolor="ffffea">
     <td width=1% nowrap align=right><span class="form-label">Priority</span></td>
     <td class="form-text"><display call="field('priority')"></td>
-    <td width=1% nowrap align=right><span class="form-label">Source</span></td>
-    <td class="form-text"><display call="field('source')"></td>
-</tr>
-
-<tr bgcolor="ffffea">
     <td width=1% nowrap align=right><span class="form-label">Status</span></td>
     <td class="form-text"><display call="menu('status')"></td>
-    <td width=1% nowrap align=right><span class="form-label">Rate</span></td>
-    <td class="form-text"><display call="field('rate')"></td>
 </tr>
 
 <tr bgcolor="ffffea">
     <td width=1% nowrap align=right><span class="form-label">Assigned To</span></td>
     <td class="form-text"><display call="field('assignedto')"></td>
-    <td width=1% nowrap align=right><span class="form-label">Customer Name</span></td>
-    <td class="form-text"><display call="field('customername')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Empty</span></td>
+    <td class="form-text">XXXX</td>
 </tr>
 
 <tr bgcolor="ffffea">
@@ -175,7 +157,7 @@ issueDOTitem = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-
 
 """
 
-msgDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+msgDOTindex = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <tr>
     <property name="date">
         <td><display call="link('date')"></td>
@@ -189,7 +171,7 @@ msgDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $--
 </tr>
 """
 
-msgDOTitem = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+msgDOTitem = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <table border=0 cellspacing=0 cellpadding=2>
 
 <tr class="strong-header">
@@ -393,7 +375,165 @@ th {
 }
 """
 
-userDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+supportDOTfilter = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
+<property name="title">
+ <tr><th width="1%" align="right" class="location-bar">Title</th>
+ <td><display call="field('title')"></td></tr>
+</property>
+<property name="status">
+ <tr><th width="1%" align="right" class="location-bar">Status</th>
+ <td><display call="checklist('status')"></td></tr>
+</property>
+<property name="platform">
+ <tr><th width="1%" align="right" class="location-bar">Platform</th>
+ <td><display call="checklist('platform')"></td></tr>
+</property>
+<property name="product">
+ <tr><th width="1%" align="right" class="location-bar">Product</th>
+ <td><display call="checklist('product')"></td></tr>
+</property>
+<property name="version">
+ <tr><th width="1%" align="right" class="location-bar">Version</th>
+ <td><display call="field('version')"></td></tr>
+</property>
+<property name="source">
+ <tr><th width="1%" align="right" class="location-bar">Source</th>
+ <td><display call="checklist('source')"></td></tr>
+</property>
+<property name="assignedto">
+ <tr><th width="1%" align="right" class="location-bar">Assigned&nbsp;to</th>
+ <td><display call="checklist('assignedto')"></td></tr>
+</property>
+<property name="customername">
+ <tr><th width="1%" align="right" class="location-bar">Customer&nbsp;name</th>
+ <td><display call="field('customername')"></td></tr>
+</property>
+"""
+
+supportDOTindex = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
+<tr>
+    <property name="id">
+        <td valign="top"><display call="field('id')"></td>
+    </property>
+    <property name="activity">
+        <td valign="top"><display call="reldate('activity', pretty=1)"></td>
+    </property>
+    <property name="status">
+        <td valign="top"><display call="plain('status')"></td>
+    </property>
+    <property name="title">
+        <td valign="top"><display call="link('title')"></td>
+    </property>
+    <property name="platform">
+        <td valign="top"><display call="plain('platform')"></td>
+    </property>
+    <property name="product">
+        <td valign="top"><display call="plain('product')"></td>
+    </property>
+    <property name="version">
+        <td valign="top"><display call="plain('version')"></td>
+    </property>
+    <property name="source">
+        <td valign="top"><display call="plain('source')"></td>
+    </property>
+    <property name="assignedto">
+        <td valign="top"><display call="plain('assignedto')"></td>
+    </property>
+    <property name="customername">
+        <td valign="top"><display call="plain('customername')"></td>
+    </property>
+</tr>
+"""
+
+supportDOTitem = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
+<table border=0 cellspacing=0 cellpadding=2>
+
+<tr class="strong-header">
+  <td colspan=4>Item Information</td>
+</td>
+
+<tr  bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Title</span></td>
+    <td colspan=3 class="form-text"><display call="field('title', size=80)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Product</span></td>
+    <td class="form-text" valign=middle><display call="menu('product')">
+    version:<display call="field('version', 5)"></td>
+    <td width=1% nowrap align=right><span class="form-label">Platform</span></td>
+    <td class="form-text" valign=middle><display call="checklist('platform')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Created</span></td>
+    <td class="form-text"><display call="reldate('creation', pretty=1)">
+        (<display call="plain('creator')">)</td>
+    <td width=1% nowrap align=right><span class="form-label">Last activity</span></td>
+    <td class="form-text"><display call="reldate('activity', pretty=1)"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Empty</span></td>
+    <td class="form-text">XXXX</td>
+    <td width=1% nowrap align=right><span class="form-label">Source</span></td>
+    <td class="form-text"><display call="field('source')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Status</span></td>
+    <td class="form-text"><display call="menu('status')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Rate</span></td>
+    <td class="form-text"><display call="field('rate')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Assigned To</span></td>
+    <td class="form-text"><display call="field('assignedto')"></td>
+    <td width=1% nowrap align=right><span class="form-label">Customer Name</span></td>
+    <td class="form-text"><display call="field('customername')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Superseder</span></td>
+    <td class="form-text"><display call="field('superseder', size=40, showid=1)"></td>
+    <td width=1% nowrap align=right><span class="form-label">Nosy List</span></td>
+    <td class="form-text"><display call="field('nosy')"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td width=1% nowrap align=right><span class="form-label">Change Note</span></td>
+    <td colspan=3 class="form-text"><display call="note()"></td>
+</tr>
+
+<tr bgcolor="ffffea">
+    <td>&nbsp;</td>
+    <td colspan=3 class="form-text"><display call="submit()"></td>
+</tr>
+
+<property name="messages">
+<tr class="strong-header">
+    <td colspan=4><b>Messages</b></td>
+</tr>
+<tr>            
+    <td colspan=4><display call="list('messages')"></td>
+</tr>
+</property>
+
+<property name="files">
+ <tr class="strong-header">
+     <td colspan=4><b>Files</b></td>
+ </tr>
+ <tr>            
+     <td colspan=4><display call="list('files')"></td>
+ </tr>
+</property>
+
+</table>
+
+"""
+
+userDOTindex = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <tr>
     <property name="username">
         <td><display call="link('username')"></td>
@@ -413,7 +553,7 @@ userDOTindex = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-
 </tr>
 """
 
-userDOTitem = """<!-- $Id: htmlbase.py,v 1.2 2001-07-29 23:34:38 richard Exp $-->
+userDOTitem = """<!-- $Id: htmlbase.py,v 1.3 2001-07-30 01:26:59 richard Exp $-->
 <table border=0 cellspacing=0 cellpadding=2>
 
 <tr class="strong-header">
index c093c663adfe108575036987ceebaf22b5d931ef..03624971f138a963f580379b53293e5c47ebd56e 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: interfaces.py,v 1.2 2001-07-29 07:01:39 richard Exp $
+# $Id: interfaces.py,v 1.3 2001-07-30 01:26:59 richard Exp $
 
-import instance_config
+import instance_config, urlparse, os
 from roundup import cgi_client, mailgw 
 
 class Client(cgi_client.Client): 
@@ -8,7 +8,52 @@ class Client(cgi_client.Client):
         with any specific extensions 
     ''' 
     TEMPLATES = instance_config.TEMPLATES
-    pass 
+    showsupport = cgi_client.Client.showitem
+    newsupport = cgi_client.Client.newissue
+
+    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 = '<div class="system-msg">%s</div>'%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 = ' | <a href="list_classes">Class List</a>'
+        else:
+            extras = ''
+        self.write('''<html><head>
+<title>%s</title>
+<style type="text/css">%s</style>
+</head>
+<body bgcolor=#ffffff>
+%s
+<table width=100%% border=0 cellspacing=0 cellpadding=2>
+<tr class="location-bar"><td><big><strong>%s</strong></big></td>
+<td align=right valign=bottom>%s</td></tr>
+<tr class="location-bar">
+<td align=left><a href="issue?status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=activity,status,title,assignedto&:group=priority">All issues</a> | 
+<a href="issue?status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=activity,status,title,assignedto&priority=fatal-bug,bug">Bugs</a> | 
+<a href="issue?status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=activity,status,title,assignedto&priority=usability,feature">Wishlist</a> | 
+<a href="support?status=unread,deferred,chatting,need-eg,in-progress,testing,done-cbb&:sort=activity&:columns=activity,status,title,assignedto&:group=customername">Support</a> | 
+<a href="newissue">New Issue</a> |
+<a href="newsupport">New Support</a> |
+<a href="newuser">New User</a>
+%s</td>
+<td align=right><a href="user%s">Your Details</a></td>
+</table>
+'''%(title, style, message, title, self.user, extras, userid))
  
 class MailGW(mailgw.MailGW): 
     ''' derives basic mail gateway implementation from the standard module, 
@@ -20,6 +65,9 @@ class MailGW(mailgw.MailGW):
 
 #
 # $Log: not supported by cvs2svn $
+# 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.
 #