Code

ignore coverage files
[roundup.git] / roundup / templates / extended / interfaces.py
index b3db3c7f12438b0ab21fc8477e0a8866a2ed5fe1..e6fbcbbd07f83e4b1f94013b7ce358068ff37921 100644 (file)
 # 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 $
+# $Id: interfaces.py,v 1.16 2002-01-14 02:20:15 richard Exp $
 
-import instance_config, urlparse, os
+import instance_config
 from roundup import cgi_client, mailgw 
 
-class Client(cgi_client.Client): 
-    ''' derives basic mail gateway implementation from the standard module, 
+class Client(cgi_client.ExtendedClient): 
+    ''' derives basic CGI implementation from the standard module, 
         with any specific extensions 
     ''' 
-    TEMPLATES = instance_config.TEMPLATES
-    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 = '<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>All
-<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>,
-<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>
-| Unassigned
-<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>,
-<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>
-| Add
-<a href="newissue">Issue</a>,
-<a href="newsupport">Support</a>,
-<a href="newuser">User</a>
-%s</td>
-<td align=right>
-<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> |
-<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> |
-<a href="user%s">My Details</a></td>
-</table>
-'''%(title, style, message, title, self.user, extras, userid, userid, userid))
+    pass
  
 class MailGW(mailgw.MailGW): 
     ''' derives basic mail gateway implementation from the standard module, 
         with any specific extensions 
     ''' 
-    ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
-    ADMIN_EMAIL = instance_config.ADMIN_EMAIL
-    MAILHOST = instance_config.MAILHOST
+    pass
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.15  2002/01/02 02:32:38  richard
+# ANONYMOUS_ACCESS -> ANONYMOUS_REGISTER
+#
+# Revision 1.14  2001/12/20 15:43:01  rochecompaan
+# Features added:
+#  .  Multilink properties are now displayed as comma separated values in
+#     a textbox
+#  .  The add user link is now only visible to the admin user
+#  .  Modified the mail gateway to reject submissions from unknown
+#     addresses if ANONYMOUS_ACCESS is denied
+#
+# Revision 1.13  2001/11/26 23:00:53  richard
+# This config stuff is getting to be a real mess...
+#
+# Revision 1.12  2001/10/22 03:25:01  richard
+# Added configuration for:
+#  . anonymous user access and registration (deny/allow)
+#  . filter "widget" location on index page (top, bottom, both)
+# Updated some documentation.
+#
+# Revision 1.11  2001/10/09 07:38:58  richard
+# Pushed the base code for the extended schema CGI interface back into the
+# code cgi_client module so that future updates will be less painful.
+# Also removed a debugging print statement from cgi_client.
+#
+# Revision 1.10  2001/10/05 02:23:24  richard
+#  . roundup-admin create now prompts for property info if none is supplied
+#    on the command-line.
+#  . hyperdb Class getprops() method may now return only the mutable
+#    properties.
+#  . Login now uses cookies, which makes it a whole lot more flexible. We can
+#    now support anonymous user access (read-only, unless there's an
+#    "anonymous" user, in which case write access is permitted). Login
+#    handling has been moved into cgi_client.Client.main()
+#  . The "extended" schema is now the default in roundup init.
+#  . The schemas have had their page headings modified to cope with the new
+#    login handling. Existing installations should copy the interfaces.py
+#    file from the roundup lib directory to their instance home.
+#  . Incorrectly had a Bizar Software copyright on the cgitb.py module from
+#    Ping - has been removed.
+#  . Fixed a whole bunch of places in the CGI interface where we should have
+#    been returning Not Found instead of throwing an exception.
+#  . Fixed a deviation from the spec: trying to modify the 'id' property of
+#    an item now throws an exception.
+#
+# Revision 1.9  2001/08/07 00:24:43  richard
+# stupid typo
+#
 # Revision 1.8  2001/08/07 00:15:51  richard
 # Added the copyright/license notice to (nearly) all files at request of
 # Bizar Software.