Code

Changed the order of the information in the message generated by web edits.
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 2 Aug 2001 00:26:16 +0000 (00:26 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 2 Aug 2001 00:26:16 +0000 (00:26 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@184 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi_client.py

index 3e2361e6c53500ef29b397c414f477a0ecf84f5b..204ab0bd267942cd74cf6f9fef06c9341915403a 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: cgi_client.py,v 1.13 2001-07-30 08:12:17 richard Exp $
+# $Id: cgi_client.py,v 1.14 2001-08-02 00:26:16 richard Exp $
 
 import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
 
@@ -348,8 +348,23 @@ class Client:
         if (cl.getprops().has_key('messages') and
                 cl.getprops()['messages'].isMultilinkType and
                 cl.getprops()['messages'].classname == 'msg'):
+            # handle the note
+            note = None
+            if self.form.has_key('__note'):
+                note = self.form['__note']
+            if note is not None and note.value:
+                note = note.value
+                if '\n' in note:
+                    summary = re.split(r'\n\r?', note)[0]
+                else:
+                    summary = note
+                m = ['%s\n'%note)
+            else:
+                summary = 'This %s has been created through the web.\n'%cn
+                m = [summary]
+            m.append('\n-------\n')
+
             # generate an edit message - nosyreactor will send it
-            m = []
             for name, prop in cl.getprops().items():
                 value = cl.get(nid, name)
                 if prop.isLinkType:
@@ -371,21 +386,6 @@ class Client:
                     value = ', '.join(l)
                 m.append('%s: %s'%(name, value))
 
-            # handle the note
-            note = None
-            if self.form.has_key('__note'):
-                note = self.form['__note']
-            if note is not None and note.value:
-                note = note.value
-                if '\n' in note:
-                    summary = re.split(r'\n\r?', note)[0]
-                else:
-                    summary = note
-                m.append('\n%s\n'%note)
-            else:
-                summary = 'This %s has been created through the web.'%cn
-                m.append('\n%s\s'%summary)
-
             # now create the message
             content = '\n'.join(m)
             message_id = self.db.msg.create(author='1', recipients=[],
@@ -519,6 +519,9 @@ class Client:
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.13  2001/07/30 08:12:17  richard
+# Added time logging and file uploading to the templates.
+#
 # Revision 1.12  2001/07/30 06:26:31  richard
 # Added some documentation on how the newblah works.
 #