Revision: 8058
          http://svn.sourceforge.net/mailman/?rev=8058&view=rev
Author:   mindlace23
Date:     2006-10-12 11:53:20 -0700 (Thu, 12 Oct 2006)

Log Message:
-----------
CSS cleanup, newlist page, signin element renders itself (more or less) 
properly. Next up is the post handler.

Modified Paths:
--------------
    branches/soc2006-webui/XUI/docs/devel_config.ini
    branches/soc2006-webui/XUI/xui/sitepage.py
    branches/soc2006-webui/XUI/xui/static/global.css
    branches/soc2006-webui/XUI/xui/templates/pieces/lists.html
    branches/soc2006-webui/XUI/xui/templates/pieces/signin.html
    branches/soc2006-webui/XUI/xui/web/index.py

Added Paths:
-----------
    branches/soc2006-webui/XUI/xui/templates/pieces/newlist.html

Removed Paths:
-------------
    branches/soc2006-webui/XUI/xui/templates/pieces/ownership_passwords.html

Modified: branches/soc2006-webui/XUI/docs/devel_config.ini
===================================================================
--- branches/soc2006-webui/XUI/docs/devel_config.ini    2006-10-12 00:49:48 UTC 
(rev 8057)
+++ branches/soc2006-webui/XUI/docs/devel_config.ini    2006-10-12 18:53:20 UTC 
(rev 8058)
@@ -7,7 +7,7 @@
 
 [app:static]
 use = egg:Paste#static
-document_root = /Users/mindlace/Source/soc2006/XUI/xui/static/
+document_root = /srv/mailman/XUI/xui/static
 
 [filter-app:xui]
 use = egg:Paste#evalerror
@@ -17,7 +17,7 @@
 use = egg:XUI
 debug = true
 # -*- extra config: -*-
-mailman_directory = /Users/mindlace/Source/mm_mine/
+mailman_directory = /srv/mailman/local/
 [app:test]
 use = xui_app
 # -*- extra automated test config: -*-
@@ -26,7 +26,7 @@
 use = egg:PasteScript#wsgiutils
 port = 8080
 # Change to 0.0.0.0 to make public:
-host = 127.0.0.1
+host = 66.92.68.23
 
 [exe]
 command = serve

Modified: branches/soc2006-webui/XUI/xui/sitepage.py
===================================================================
--- branches/soc2006-webui/XUI/xui/sitepage.py  2006-10-12 00:49:48 UTC (rev 
8057)
+++ branches/soc2006-webui/XUI/xui/sitepage.py  2006-10-12 18:53:20 UTC (rev 
8058)
@@ -31,6 +31,10 @@
     mm_configuration = config
     mm_configuration.load()
     template_loader = 
TemplateLoader(search_path=[CONFIG['template_directory']],auto_reload=True)
+    
+    def add_piece(self, piecename, attribute_match):
+        self.context['pieces'].append('pieces/'+piecename+'.html')
+        self.context[piecename+'_content'] = attribute_match
 
     def render_template(self, template_name, context=None):
         if not context: context = self.context
@@ -44,7 +48,7 @@
         # Add your application-specific code here
         self.listnames = Utils.list_names()
         self.context = {'bm': BiteMarks(), 'moderationRequests': doNothing,
-        'location': doNothing
+        'location': doNothing, 'pieces': []
         }
         self.setup()
 

Modified: branches/soc2006-webui/XUI/xui/static/global.css
===================================================================
--- branches/soc2006-webui/XUI/xui/static/global.css    2006-10-12 00:49:48 UTC 
(rev 8057)
+++ branches/soc2006-webui/XUI/xui/static/global.css    2006-10-12 18:53:20 UTC 
(rev 8058)
@@ -6,6 +6,7 @@
        margin-left: 9em;
        padding-right: .5em;
        padding-left: 1em;
+       margin-right: 11em;
 }
 
 #messages {
@@ -38,6 +39,10 @@
 
 #navigation, #controls {
        background: #7f7b5c;
+       width: 10em;
+}
+
+#navigation {
        position: absolute;
        left: 0;
        top: 60px;
@@ -45,6 +50,14 @@
        height: 40%;
 }
 
+#controls {
+       position: fixed;
+       top: 0;
+       width: 10em;
+       right: 0;
+       z-index: 2;
+}
+
 #navigation dl, #navigation ol, #navigation ul {
        background-color: #cbc494;
 }

Modified: branches/soc2006-webui/XUI/xui/templates/pieces/lists.html
===================================================================
--- branches/soc2006-webui/XUI/xui/templates/pieces/lists.html  2006-10-12 
00:49:48 UTC (rev 8057)
+++ branches/soc2006-webui/XUI/xui/templates/pieces/lists.html  2006-10-12 
18:53:20 UTC (rev 8058)
@@ -9,6 +9,7 @@
 
 <body py:strip="">
 <div id="body" py:match="[EMAIL PROTECTED]'body']" py:attrs="select('@*')">
+<div py:if="lists">
     <p class="preamble" py:if="bm.anonymous">
        This is the list of publically available lists on ${sitename}. 
        If you sign in, you will be able to see the private lists
@@ -53,6 +54,12 @@
               </div>
          </dd>
     </dl>
+</div>
+<div py:if="not lists">
+    <p py:if="no_lists" class="preamble">Welcome to your new mailman 
installation!</p>
+    <p py:if="bm.anonymous" class="preamble">If you sign in as user 'admin' 
with the password you set during configuration, you'll be able to create a new 
list. If you haven't set a password yet, use the mmsitepass script.</p>
+    <p py:if="bm.anonymous and (not no_lists)" class="preamble">There are no 
publically available lists on ${sitename}. Please sign in to view your 
subscriptions.</p>
+</div>
     <link py:replace="select('*')" />
 </div>
 <div py:match="[EMAIL PROTECTED]'header']" py:attrs="select('@*')">

Copied: branches/soc2006-webui/XUI/xui/templates/pieces/newlist.html (from rev 
8055, branches/soc2006-webui/XUI/xui/templates/pieces/ownership_passwords.html)
===================================================================
--- branches/soc2006-webui/XUI/xui/templates/pieces/newlist.html                
                (rev 0)
+++ branches/soc2006-webui/XUI/xui/templates/pieces/newlist.html        
2006-10-12 18:53:20 UTC (rev 8058)
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:py="http://genshi.edgewall.org/"; 
xmlns:xi="http://www.w3.org/2001/XInclude"; xml:lang="en">
+<head py:match="head" py:attrs="select('@*')">
+  <title py:if="newlist_content == 'body'">New list at ${sitename}</title>
+  <div py:replace="select('*')"/>
+</head>
+<body py:strip="">
+
+<div py:match="[EMAIL PROTECTED]">
+    <fieldset>
+      <legend>Required information</legend>
+      <label>
+         The email name of the list: <input type="text" name="list_address" 
value="${list_address}" />
+      </label>
+      <h3>The username or email address of the owner of this list:</h3>
+      <div py:replace="fragment.get('singleuser',name='owner')">
+         
+      </div>
+      <label>
+         A one-sentence description of the list: <input type="text" 
name="list_description" value="${list_description}" />
+      </label>
+    </fieldset>
+    <fieldset>
+        <legend>Optional Information</legend>
+      <label>
+         A more detailed introduction to the list: <br />
+         <textarea name="${list_info}">${list_info}</textarea>
+      </label>
+   <div class="mail_items">
+      <label>
+         A prefix for the Subject line:
+         <input type="text" name="list_prefix" value="${list_prefix}" />
+      </label>
+      <label>
+         Should list emails appear to come only from the list?
+         <input type="radio" name="anonymous_list" value="no" checked="1" />
+         <input type="radio" name="anonymous_list" value="yes" />
+      </label>
+      <div class="reply_to">
+         <label>
+            Should any existing Reply-To: header in the original message be 
stripped?
+            <input type="radio" name="first_strip_reply_to" value="no" 
checked="1" />
+            <input type="radio" name="first_strip_reply_to" value="yes" />
+         </label>
+         Where are replies to list messages directed?
+         <label>
+            <input type="radio" name="reply_to" value="poster" /> Poster
+         </label>
+         <label>
+            <input type="radio" name="reply_to" value="this_list" /> This List
+         </label>
+         <label>
+            <input type="radio" name="reply_to" value="explicit" 
+                   
onselect="document.getElementById('reply_to_address').style.display='block';" />
+         </label>
+         <label>
+            Enter address for Reply-To header:<br />
+            <input style="display: none;" type="text" id="reply_to_address" />
+         </label>
+      </div>
+   </div>
+   <div class="ownership">
+      <h3>The username(s) or email address(es) of this list's moderators:</h3>
+      <div py:replace="widget.get('multiuser',name='moderator')">
+         
+      </div>
+   </div>
+</fieldset>
+</div>
+
+</body>
+</html>

Deleted: 
branches/soc2006-webui/XUI/xui/templates/pieces/ownership_passwords.html
===================================================================
--- branches/soc2006-webui/XUI/xui/templates/pieces/ownership_passwords.html    
2006-10-12 00:49:48 UTC (rev 8057)
+++ branches/soc2006-webui/XUI/xui/templates/pieces/ownership_passwords.html    
2006-10-12 18:53:20 UTC (rev 8058)
@@ -1,71 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
-<html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:py="http://genshi.edgewall.org/"; 
xmlns:xi="http://www.w3.org/2001/XInclude"; xml:lang="en">
-   <head>
-      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-      <title>${listname} Administration at ${sitename}</title>
-
-   </head>
-   <body id="admin">
-   <form>
-   <div class="display">
-      <label>
-         The name of the list for display: <input type="text" 
name="list_displayname" value="${list_displayname}" />
-      </label>
-      <label>
-         A one-sentence description of the list: <input type="text" 
name="list_description" value="${list_description}" />
-      </label>
-      <label>
-         A more detailed introduction to the list: <br />
-         <textarea name="${list_info}">${list_info}</textarea>
-      </label>
-   </div>
-   <div class="mail_items">
-      <label>
-         A prefix for the Subject line:
-         <input type="text" name="list_prefix" value="${list_prefix}" />
-      </label>
-      <label>
-         Should list emails appear to come only from the list?
-         <input type="radio" name="anonymous_list" value="no" checked="1" />
-         <input type="radio" name="anonymous_list" value="yes" />
-      </label>
-      <div class="reply_to">
-         <label>
-            Should any existing Reply-To: header in the original message be 
stripped?
-            <input type="radio" name="first_strip_reply_to" value="no" 
checked="1" />
-            <input type="radio" name="first_strip_reply_to" value="yes" />
-         </label>
-         Where are replies to list messages directed?
-         <label>
-            <input type="radio" name="reply_to" value="poster" /> Poster
-         </label>
-         <label>
-            <input type="radio" name="reply_to" value="this_list" /> This List
-         </label>
-         <label>
-            <input type="radio" name="reply_to" value="explicit" 
-                   
onselect="document.getElementById('reply_to_address').style.display='block';" />
-         </label>
-         <label>
-            Enter address for Reply-To header:<br />
-            <input style="display: none;" type="text" id="reply_to_address" />
-         </label>
-      </div>
-   </div>
-   <div class="ownership">
-      <h3>The username or email address of the owner of this list:</h3>
-      <div py:replace="widget.get('singleuser',name='owner')">
-         
-      </div>
-      <h3>The username(s) or email address(es) of this list's moderators:</h3>
-      <div py:replace="widget.get('multiuser',name='moderator')">
-         
-      </div>
-   </div>
-
-
-  
-   </form>
-   </body>
-</html>

Modified: branches/soc2006-webui/XUI/xui/templates/pieces/signin.html
===================================================================
--- branches/soc2006-webui/XUI/xui/templates/pieces/signin.html 2006-10-12 
00:49:48 UTC (rev 8057)
+++ branches/soc2006-webui/XUI/xui/templates/pieces/signin.html 2006-10-12 
18:53:20 UTC (rev 8058)
@@ -2,13 +2,13 @@
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
 <html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:py="http://genshi.edgewall.org/"; 
xmlns:xi="http://www.w3.org/2001/XInclude";>
 
-<head py:if="am_body('signin')" py:match="head">
-    <title>Welcome to Mailman</title>
+<head py:match="head">
+        <title py:if="signin_content == 'body'">Sign in to Mailman at 
$sitename</title>
     <link py:replace="select('*')" />
 </head>
 <body>
 
-<div py:match="[EMAIL PROTECTED]'messages']">
+<div py:match="[EMAIL PROTECTED]'messages']" py:attrs="select('@*')">
       <p class="messages alert" id="login_failed">
           The credentials you supplied were not correct or did not grant 
access to this resource.
       </p>
@@ -22,8 +22,8 @@
       <p py:replace="select('*')"></p>
 </div>
 
-<fieldset py:match="Path(signin_location)">
-    <legend>Log In!</legend>
+<fieldset py:match="[EMAIL PROTECTED]" py:attrs="select('@*')">
+    <legend>Sign In!</legend>
     <label>Username or Email Address: <br />
     <input type="text" id="username_or_email" />
     </label>

Modified: branches/soc2006-webui/XUI/xui/web/index.py
===================================================================
--- branches/soc2006-webui/XUI/xui/web/index.py 2006-10-12 00:49:48 UTC (rev 
8057)
+++ branches/soc2006-webui/XUI/xui/web/index.py 2006-10-12 18:53:20 UTC (rev 
8058)
@@ -5,20 +5,23 @@
 
 class index(SitePage):
     def setup(self):
-        self.context['pieces'] = ('pieces/lists.html', )
-        self.context['lists_content'] = 'body'
+        self.add_piece('lists','body')
 
     def respond(self):
         hostname = self.environ.get('HTTP_HOST')
         self.context['sitename'] = hostname[:hostname.rfind(':')]
-        
-        #XXX dev cludge
-        self.context['sitename'] = 'mindlace.net'
-    
+        if self.context['bm'].anonymous:
+            self.add_piece('signin','controls')
+            
         self.lists()
-        
+        self.render_template('content.html')
 
     def lists(self):
+        if not self.listnames:
+            self.context['lists'] = []
+            self.context['no_lists'] = True
+            return
+        
         advertised = []
         for name in self.listnames:
             mlist = self.listmodule(name, lock=False)
@@ -29,5 +32,3 @@
                     advertised.append(mlist)
 
         self.context['lists'] = advertised
-
-        self.render_template('content.html')


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to