[Zope3-checkins] SVN: Zope3/trunk/ Merge branch roger-sourcequerryview back to the trunk:

Roger Ineichen roger at projekt01.ch
Sun Jan 16 19:21:45 EST 2005


Log message for revision 28852:
  Merge branch roger-sourcequerryview back to the trunk:
  
  Change input option fields to input radio fields for grant mechanism
  Support a matrix table with javascript support.
  The javascript will change the color if you change the grant settings.
  This should be usefull for to check the bigger changes before you commit the form.
  
  Added grant vocabulary for supporting RadioWidget via a simply Choise field.
  Added grant vocabulary interface for register the RadioWidget
  Different changes for bulding a matrix table instead dropdown input fields

Changed:
  _U  Zope3/trunk/
  U   Zope3/trunk/src/zope/app/form/browser/source.py
  U   Zope3/trunk/src/zope/app/form/browser/source.txt
  _U  Zope3/trunk/src/zope/app/pau/authenticationplugins.zcml
  UU  Zope3/trunk/src/zope/app/pau/browser/__init__.py
  _U  Zope3/trunk/src/zope/app/pau/browser/configure.zcml
  UU  Zope3/trunk/src/zope/app/pau/browser/group_searching_with_empty_string.txt
  _U  Zope3/trunk/src/zope/app/pau/browser/groupfolder.txt
  _U  Zope3/trunk/src/zope/app/pau/browser/loginform.pt
  _U  Zope3/trunk/src/zope/app/pau/browser/principalfolder.txt
  UU  Zope3/trunk/src/zope/app/pau/browser/schemasearch.py
  UU  Zope3/trunk/src/zope/app/pau/browser/schemasearch.txt
  UU  Zope3/trunk/src/zope/app/pau/browser/tests.py
  U   Zope3/trunk/src/zope/app/pau/browserplugins.py
  _U  Zope3/trunk/src/zope/app/pau/challengeplugins.zcml
  UU  Zope3/trunk/src/zope/app/pau/configure.zcml
  _U  Zope3/trunk/src/zope/app/pau/extractionplugins.zcml
  _U  Zope3/trunk/src/zope/app/pau/generic.py
  UU  Zope3/trunk/src/zope/app/pau/groupfolder.py
  _U  Zope3/trunk/src/zope/app/pau/groupfolder.zcml
  _U  Zope3/trunk/src/zope/app/pau/principalfolder.py
  _U  Zope3/trunk/src/zope/app/pau/principalplugins.py
  _U  Zope3/trunk/src/zope/app/pau/principalplugins.zcml
  _U  Zope3/trunk/src/zope/app/pau/sql.py
  U   Zope3/trunk/src/zope/app/rotterdam/configure.zcml
  U   Zope3/trunk/src/zope/app/rotterdam/dialog_macros.pt
  U   Zope3/trunk/src/zope/app/rotterdam/template.pt
  U   Zope3/trunk/src/zope/app/rotterdam/zope3.css
  A   Zope3/trunk/src/zope/app/rotterdam/zope3.js
  UU  Zope3/trunk/src/zope/app/security/browser/__init__.py
  U   Zope3/trunk/src/zope/app/security/browser/auth.py
  UU  Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt
  _U  Zope3/trunk/src/zope/app/security/browser/principalterms.py
  _U  Zope3/trunk/src/zope/app/security/browser/principalterms.txt
  UU  Zope3/trunk/src/zope/app/security/browser/tests.py
  _U  Zope3/trunk/src/zope/app/securitypolicy/SETUP.cfg
  UU  Zope3/trunk/src/zope/app/securitypolicy/__init__.py
  UU  Zope3/trunk/src/zope/app/securitypolicy/browser/__init__.py
  U   Zope3/trunk/src/zope/app/securitypolicy/browser/configure.zcml
  UU  Zope3/trunk/src/zope/app/securitypolicy/browser/ftests.py
  UU  Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt
  UU  Zope3/trunk/src/zope/app/securitypolicy/browser/granting.py
  _U  Zope3/trunk/src/zope/app/securitypolicy/browser/granting.txt
  U   Zope3/trunk/src/zope/app/securitypolicy/browser/granting_ftest.txt
  U   Zope3/trunk/src/zope/app/securitypolicy/interfaces.py
  _U  Zope3/trunk/src/zope/app/securitypolicy/principalrole.py
  _U  Zope3/trunk/src/zope/app/securitypolicy/securitymap.py
  _U  Zope3/trunk/src/zope/app/securitypolicy/tests/__init__.py
  UU  Zope3/trunk/src/zope/app/securitypolicy/tests/test_role.py
  UU  Zope3/trunk/src/zope/app/securitypolicy/tests/test_vocabulary.py
  UU  Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py
  U   Zope3/trunk/src/zope/app/zopetop/view_macros.pt

-=-

Property changes on: Zope3/trunk
___________________________________________________________________
Name: svn:ignore
   - overrides_ftesting.zcml
products_ftesting.zcml
principals.zcml
products.zcml
overrides.zcml
zope.conf
Data.fs
Data.fs.*
build
dist
coverage
z3.log
access.log
test-db
zdsock
test.bat
setup.bat
start.bat

   + overrides_ftesting.zcml
products_ftesting.zcml
principals.zcml
products.zcml
overrides.zcml
zope.conf
Data.fs
Data.fs.*
build
dist
coverage
z3.log
access.log
test-db
zdsock
setup.bat
start.bat
test.bat


Modified: Zope3/trunk/src/zope/app/form/browser/source.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/source.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/form/browser/source.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -148,10 +148,14 @@
 
         term = None
         if value == field.missing_value:
-            result.append(u'  ' +
+            result.append('  <div class="row">')
+            result.append('    <div class="field">')
+            result.append(u'     ' +
                           self._translate(_("SourceDisplayWidget-missing",
                                             default="Nothing"))
                           )
+            result.append('    </div>')
+            result.append('  </div>')
         else:
             try:
                 term = self.terms.getTerm(value)
@@ -161,10 +165,13 @@
                                                 default="Nothing Valid"))
                               )
             else:
-                result.append(u'  ' + cgi.escape(term.title))
+                result.append('  <div class="row">')
+                result.append('    <div class="field">')
+                result.append(u'     ' + cgi.escape(term.title))
+                result.append('    </div>')
+                result.append('  </div>')
                 result.append('  <input type="hidden" name="%s" value="%s">'
                               % (self.name, cgi.escape(term.token)))
-        result.append('  <br>')
 
         result.append('  <input type="hidden" name="%s.displayed" value="y">'
                       % self.name)

Modified: Zope3/trunk/src/zope/app/form/browser/source.txt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/source.txt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/form/browser/source.txt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -126,18 +126,21 @@
 nothing) and a form elements for seaching for values:
 
   >>> print widget()
-  <div class="value">
-    Nothing
-    <br>
-    <input type="hidden" name="field.dog.displayed" value="y">
-    <div class="queries">
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.dog.query.string">
-  <input type="submit" name="field.dog.query" value="Search">
-        </div> <!-- queryinput -->
-      </div> <!-- query -->
-    </div> <!-- queries -->
+  <div class="value">
+    <div class="row">
+      <div class="field">
+       Nothing
+      </div>
+    </div>
+    <input type="hidden" name="field.dog.displayed" value="y">
+    <div class="queries">
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.dog.query.string">
+  <input type="submit" name="field.dog.query" value="Search">
+        </div> <!-- queryinput -->
+      </div> <!-- query -->
+    </div> <!-- queries -->
   </div> <!-- value -->
 
 This shows that we haven't selected a dog. We get a search box that we
@@ -180,25 +183,28 @@
 Now if we render the widget, we'll see the search results:
 
   >>> print widget()
-  <div class="value">
-    Nothing
-    <br>
-    <input type="hidden" name="field.dog.displayed" value="y">
-    <div class="queries">
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.dog.query.string">
-  <input type="submit" name="field.dog.query" value="Search">
-        </div> <!-- queryinput -->
-        <div class="queryresults">
-  <select name="field.dog.selection">
-  <option value="Ym93c2Vy">bowser</option>
-  <option value="c3BvdA==">spot</option>
-  </select>
-  <input type="submit" name="field.dog.apply" value="Apply">
-        </div> <!-- queryresults -->
-      </div> <!-- query -->
-    </div> <!-- queries -->
+  <div class="value">
+    <div class="row">
+      <div class="field">
+       Nothing
+      </div>
+    </div>
+    <input type="hidden" name="field.dog.displayed" value="y">
+    <div class="queries">
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.dog.query.string">
+  <input type="submit" name="field.dog.query" value="Search">
+        </div> <!-- queryinput -->
+        <div class="queryresults">
+  <select name="field.dog.selection">
+  <option value="Ym93c2Vy">bowser</option>
+  <option value="c3BvdA==">spot</option>
+  </select>
+  <input type="submit" name="field.dog.apply" value="Apply">
+        </div> <!-- queryresults -->
+      </div> <!-- query -->
+    </div> <!-- queries -->
   </div> <!-- value -->
 
 If we select an item:
@@ -212,19 +218,22 @@
 Then we'll show the newly selected value:
 
   >>> print widget()
-  <div class="value">
-    spot
-    <input type="hidden" name="field.dog" value="c3BvdA==">
-    <br>
-    <input type="hidden" name="field.dog.displayed" value="y">
-    <div class="queries">
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.dog.query.string">
-  <input type="submit" name="field.dog.query" value="Search">
-        </div> <!-- queryinput -->
-      </div> <!-- query -->
-    </div> <!-- queries -->
+  <div class="value">
+    <div class="row">
+      <div class="field">
+       spot
+      </div>
+    </div>
+    <input type="hidden" name="field.dog" value="c3BvdA==">
+    <input type="hidden" name="field.dog.displayed" value="y">
+    <div class="queries">
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.dog.query.string">
+  <input type="submit" name="field.dog.query" value="Search">
+        </div> <!-- queryinput -->
+      </div> <!-- query -->
+    </div> <!-- queries -->
   </div> <!-- value -->
 
 Note that we should have an input value now, since pressing the 'Apply' button
@@ -290,24 +299,27 @@
 and cats:
 
   >>> print widget()
-  <div class="value">
-    Nothing
-    <br>
-    <input type="hidden" name="field.pet.displayed" value="y">
-    <div class="queries">
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.pet.MA__.query.string">
-  <input type="submit" name="field.pet.MA__.query" value="Search">
-        </div> <!-- queryinput -->
-      </div> <!-- query -->
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.pet.MQ__.query.string">
-  <input type="submit" name="field.pet.MQ__.query" value="Search">
-        </div> <!-- queryinput -->
-      </div> <!-- query -->
-    </div> <!-- queries -->
+  <div class="value">
+    <div class="row">
+      <div class="field">
+       Nothing
+      </div>
+    </div>
+    <input type="hidden" name="field.pet.displayed" value="y">
+    <div class="queries">
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.pet.MA__.query.string">
+  <input type="submit" name="field.pet.MA__.query" value="Search">
+        </div> <!-- queryinput -->
+      </div> <!-- query -->
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.pet.MQ__.query.string">
+  <input type="submit" name="field.pet.MQ__.query" value="Search">
+        </div> <!-- queryinput -->
+      </div> <!-- query -->
+    </div> <!-- queries -->
   </div> <!-- value -->
 
 As before, we can perform a search:
@@ -319,33 +331,36 @@
 In which case, we'll get some results:
 
   >>> print widget() # doctest:
-  <div class="value">
-    Nothing
-    <br>
-    <input type="hidden" name="field.pet.displayed" value="y">
-    <div class="queries">
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.pet.MA__.query.string">
-  <input type="submit" name="field.pet.MA__.query" value="Search">
-        </div> <!-- queryinput -->
-      </div> <!-- query -->
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.pet.MQ__.query.string">
-  <input type="submit" name="field.pet.MQ__.query" value="Search">
-        </div> <!-- queryinput -->
-        <div class="queryresults">
-  <select name="field.pet.MQ__.selection">
-  <option value="Ym9vdHM=">boots</option>
-  <option value="dGFiYnk=">tabby</option>
-  <option value="dGlnZXI=">tiger</option>
-  <option value="dG9t">tom</option>
-  </select>
-  <input type="submit" name="field.pet.MQ__.apply" value="Apply">
-        </div> <!-- queryresults -->
-      </div> <!-- query -->
-    </div> <!-- queries -->
+  <div class="value">
+    <div class="row">
+      <div class="field">
+       Nothing
+      </div>
+    </div>
+    <input type="hidden" name="field.pet.displayed" value="y">
+    <div class="queries">
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.pet.MA__.query.string">
+  <input type="submit" name="field.pet.MA__.query" value="Search">
+        </div> <!-- queryinput -->
+      </div> <!-- query -->
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.pet.MQ__.query.string">
+  <input type="submit" name="field.pet.MQ__.query" value="Search">
+        </div> <!-- queryinput -->
+        <div class="queryresults">
+  <select name="field.pet.MQ__.selection">
+  <option value="Ym9vdHM=">boots</option>
+  <option value="dGFiYnk=">tabby</option>
+  <option value="dGlnZXI=">tiger</option>
+  <option value="dG9t">tom</option>
+  </select>
+  <input type="submit" name="field.pet.MQ__.apply" value="Apply">
+        </div> <!-- queryresults -->
+      </div> <!-- query -->
+    </div> <!-- queries -->
   </div> <!-- value -->
 
 from which we can choose:
@@ -359,25 +374,28 @@
 and get a selection:
 
   >>> print widget()
-  <div class="value">
-    tabby
-    <input type="hidden" name="field.pet" value="dGFiYnk=">
-    <br>
-    <input type="hidden" name="field.pet.displayed" value="y">
-    <div class="queries">
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.pet.MA__.query.string">
-  <input type="submit" name="field.pet.MA__.query" value="Search">
-        </div> <!-- queryinput -->
-      </div> <!-- query -->
-      <div class="query">
-        <div class="queryinput">
-  <input name="field.pet.MQ__.query.string">
-  <input type="submit" name="field.pet.MQ__.query" value="Search">
-        </div> <!-- queryinput -->
-      </div> <!-- query -->
-    </div> <!-- queries -->
+  <div class="value">
+    <div class="row">
+      <div class="field">
+       tabby
+      </div>
+    </div>
+    <input type="hidden" name="field.pet" value="dGFiYnk=">
+    <input type="hidden" name="field.pet.displayed" value="y">
+    <div class="queries">
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.pet.MA__.query.string">
+  <input type="submit" name="field.pet.MA__.query" value="Search">
+        </div> <!-- queryinput -->
+      </div> <!-- query -->
+      <div class="query">
+        <div class="queryinput">
+  <input name="field.pet.MQ__.query.string">
+  <input type="submit" name="field.pet.MQ__.query" value="Search">
+        </div> <!-- queryinput -->
+      </div> <!-- query -->
+    </div> <!-- queries -->
   </div> <!-- value -->
 
 Note that we should have an input value now, since pressing the 'Apply' button


Property changes on: Zope3/trunk/src/zope/app/pau/authenticationplugins.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/browser/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/pau/browser/__init__.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/browser/__init__.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1 +1,17 @@
-# Make a package
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""PAU Views
+
+$Id$
+"""


Property changes on: Zope3/trunk/src/zope/app/pau/browser/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/browser/configure.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/browser/group_searching_with_empty_string.txt
===================================================================
--- Zope3/trunk/src/zope/app/pau/browser/group_searching_with_empty_string.txt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/browser/group_searching_with_empty_string.txt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -22,31 +22,31 @@
   ... Content-Type: multipart/form-data; boundary=---------------------------8474411127918531132143183931
   ... Referer: http://localhost:8081/++etc++site/default/PA/addRegistration.html
   ... 
-  ... -----------------------------8474411127918531132143183931
-  ... Content-Disposition: form-data; name="field.name"
-  ... 
-  ... 
-  ... -----------------------------8474411127918531132143183931
-  ... Content-Disposition: form-data; name="field.interface"
-  ... 
-  ... zope.app.security.interfaces.IAuthentication
-  ... -----------------------------8474411127918531132143183931
-  ... Content-Disposition: form-data; name="field.interface-empty-marker"
-  ... 
-  ... 1
-  ... -----------------------------8474411127918531132143183931
-  ... Content-Disposition: form-data; name="field.permission"
-  ... 
-  ... 
-  ... -----------------------------8474411127918531132143183931
-  ... Content-Disposition: form-data; name="field.permission-empty-marker"
-  ... 
-  ... 1
-  ... -----------------------------8474411127918531132143183931
-  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
-  ... 
-  ... Add
-  ... -----------------------------8474411127918531132143183931--
+  ... -----------------------------8474411127918531132143183931
+  ... Content-Disposition: form-data; name="field.name"
+  ... 
+  ... 
+  ... -----------------------------8474411127918531132143183931
+  ... Content-Disposition: form-data; name="field.interface"
+  ... 
+  ... zope.app.security.interfaces.IAuthentication
+  ... -----------------------------8474411127918531132143183931
+  ... Content-Disposition: form-data; name="field.interface-empty-marker"
+  ... 
+  ... 1
+  ... -----------------------------8474411127918531132143183931
+  ... Content-Disposition: form-data; name="field.permission"
+  ... 
+  ... 
+  ... -----------------------------8474411127918531132143183931
+  ... Content-Disposition: form-data; name="field.permission-empty-marker"
+  ... 
+  ... 1
+  ... -----------------------------8474411127918531132143183931
+  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
+  ... 
+  ... Add
+  ... -----------------------------8474411127918531132143183931--
   ... """)
   HTTP/1.1 303 See Other
   ...
@@ -72,19 +72,19 @@
   ... Content-Type: multipart/form-data; boundary=---------------------------1160081710811409419323271465
   ... Referer: http://localhost:8081/++etc++site/AddIPrincipalSearchPluginTool/AddGroupFolder.html=
   ... 
-  ... -----------------------------1160081710811409419323271465
-  ... Content-Disposition: form-data; name="field.prefix"
-  ... 
-  ... test.
-  ... -----------------------------1160081710811409419323271465
-  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
-  ... 
-  ... Add
-  ... -----------------------------1160081710811409419323271465
-  ... Content-Disposition: form-data; name="add_input_name"
-  ... 
-  ... 
-  ... -----------------------------1160081710811409419323271465--
+  ... -----------------------------1160081710811409419323271465
+  ... Content-Disposition: form-data; name="field.prefix"
+  ... 
+  ... test.
+  ... -----------------------------1160081710811409419323271465
+  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
+  ... 
+  ... Add
+  ... -----------------------------1160081710811409419323271465
+  ... Content-Disposition: form-data; name="add_input_name"
+  ... 
+  ... 
+  ... -----------------------------1160081710811409419323271465--
   ... """)
   HTTP/1.1 303 See Other
   ...
@@ -98,23 +98,23 @@
   ... Content-Type: multipart/form-data; boundary=---------------------------57051497716357005611441891504
   ... Referer: http://localhost:8081/++etc++site/tools/GroupFolder/+/AddGroupInformation.html=
   ... 
-  ... -----------------------------57051497716357005611441891504
-  ... Content-Disposition: form-data; name="field.title"
-  ... 
-  ... Test1
-  ... -----------------------------57051497716357005611441891504
-  ... Content-Disposition: form-data; name="field.description"
-  ... 
-  ... 
-  ... -----------------------------57051497716357005611441891504
-  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
-  ... 
-  ... Add
-  ... -----------------------------57051497716357005611441891504
-  ... Content-Disposition: form-data; name="add_input_name"
-  ... 
-  ... 
-  ... -----------------------------57051497716357005611441891504--
+  ... -----------------------------57051497716357005611441891504
+  ... Content-Disposition: form-data; name="field.title"
+  ... 
+  ... Test1
+  ... -----------------------------57051497716357005611441891504
+  ... Content-Disposition: form-data; name="field.description"
+  ... 
+  ... 
+  ... -----------------------------57051497716357005611441891504
+  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
+  ... 
+  ... Add
+  ... -----------------------------57051497716357005611441891504
+  ... Content-Disposition: form-data; name="add_input_name"
+  ... 
+  ... 
+  ... -----------------------------57051497716357005611441891504--
   ... """)
   HTTP/1.1 303 See Other
   ...
@@ -127,23 +127,23 @@
   ... Content-Type: multipart/form-data; boundary=---------------------------1162360160489428309570988744
   ... Referer: http://localhost:8081/++etc++site/tools/GroupFolder/+/AddGroupInformation.html=
   ... 
-  ... -----------------------------1162360160489428309570988744
-  ... Content-Disposition: form-data; name="field.title"
-  ... 
-  ... Test2
-  ... -----------------------------1162360160489428309570988744
-  ... Content-Disposition: form-data; name="field.description"
-  ... 
-  ... 
-  ... -----------------------------1162360160489428309570988744
-  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
-  ... 
-  ... Add
-  ... -----------------------------1162360160489428309570988744
-  ... Content-Disposition: form-data; name="add_input_name"
-  ... 
-  ... 
-  ... -----------------------------1162360160489428309570988744--
+  ... -----------------------------1162360160489428309570988744
+  ... Content-Disposition: form-data; name="field.title"
+  ... 
+  ... Test2
+  ... -----------------------------1162360160489428309570988744
+  ... Content-Disposition: form-data; name="field.description"
+  ... 
+  ... 
+  ... -----------------------------1162360160489428309570988744
+  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
+  ... 
+  ... Add
+  ... -----------------------------1162360160489428309570988744
+  ... Content-Disposition: form-data; name="add_input_name"
+  ... 
+  ... 
+  ... -----------------------------1162360160489428309570988744--
   ... """)
   HTTP/1.1 303 See Other
   ...
@@ -158,27 +158,27 @@
   ... Content-Type: multipart/form-data; boundary=---------------------------13414337386198656711891559433
   ... Referer: http://localhost:8081/++etc++site/default/PA/@@edit.html
   ... 
-  ... -----------------------------13414337386198656711891559433
-  ... Content-Disposition: form-data; name="field.factories.to"
-  ... 
-  ... Default
-  ... -----------------------------13414337386198656711891559433
-  ... Content-Disposition: form-data; name="field.searchers.to"
-  ... 
-  ... GroupFolder
-  ... -----------------------------13414337386198656711891559433
-  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
-  ... 
-  ... Change
-  ... -----------------------------13414337386198656711891559433
-  ... Content-Disposition: form-data; name="field.factories"
-  ... 
-  ... Default
-  ... -----------------------------13414337386198656711891559433
-  ... Content-Disposition: form-data; name="field.searchers"
-  ... 
-  ... GroupFolder
-  ... -----------------------------13414337386198656711891559433--
+  ... -----------------------------13414337386198656711891559433
+  ... Content-Disposition: form-data; name="field.factories.to"
+  ... 
+  ... Default
+  ... -----------------------------13414337386198656711891559433
+  ... Content-Disposition: form-data; name="field.searchers.to"
+  ... 
+  ... GroupFolder
+  ... -----------------------------13414337386198656711891559433
+  ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
+  ... 
+  ... Change
+  ... -----------------------------13414337386198656711891559433
+  ... Content-Disposition: form-data; name="field.factories"
+  ... 
+  ... Default
+  ... -----------------------------13414337386198656711891559433
+  ... Content-Disposition: form-data; name="field.searchers"
+  ... 
+  ... GroupFolder
+  ... -----------------------------13414337386198656711891559433--
   ... """)
   HTTP/1.1 200 Ok
   ...


Property changes on: Zope3/trunk/src/zope/app/pau/browser/group_searching_with_empty_string.txt
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/browser/groupfolder.txt
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/browser/loginform.pt
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/browser/principalfolder.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/browser/schemasearch.py
===================================================================
--- Zope3/trunk/src/zope/app/pau/browser/schemasearch.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/browser/schemasearch.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -20,6 +20,7 @@
 from zope.interface import implements
 from zope.i18n import translate
 from zope.schema import getFieldsInOrder
+from zope.app.zapi import getName, getPath
 from zope.app.pau.interfaces import IQuerySchemaSearch
 from zope.app.form.utility import setUpWidgets, getWidgetsData
 from zope.app.form.interfaces import IInputWidget
@@ -37,30 +38,49 @@
 
     def render(self, name):
         schema = self.context.schema
+        sourcename = getName(self.context)
+        sourcepath = getPath(self.context)
         setUpWidgets(self, schema, IInputWidget, prefix=name+'.field')
         html = []
+        
+        # add sub title for source search field
+        html.append('<h4 i18n:translate="">%s %s</h4>' % (sourcename, sourcepath))
+        # start row for search fields
+        html.append('<div class="row">')
+
         for field_name, field in getFieldsInOrder(schema):
             widget = getattr(self, field_name+'_widget')
-            html.append('<div class="row">')
+            
+            # for each field add lable...
             html.append('<div class="label">')
             html.append('<label for="%s" title="%s">'
                         % (widget.name, widget.hint))
             html.append(widget.label)
             html.append('</label>')
             html.append('</div>')
+            
+            # ...and field widget
             html.append('<div class="field">')
             html.append(widget())
-            html.append('</div>')
+
             if widget.error():
                 html.append('<div class="error">')
                 html.append(widget.error())
                 html.append('</div>')
             html.append('</div>')
+        # end row
+        html.append('</div>')
 
-        html.append('<br /><input type="submit" name="%s" value="%s" />'
-                    % (name+'.search',
-                       translate(search_label, context=self.request)))
+        # add search button for search fields
+        html.append('<div class="row">')
+        html.append('<div class="field">')
+        html.append('<input type="submit" name="%s" value="%s" />'
+                     % (name+'.search',
+                        translate(search_label, context=self.request)))
+        html.append('</div>')
+        html.append('</div>')
 
+
         return '\n'.join(html)
 
     def results(self, name):


Property changes on: Zope3/trunk/src/zope/app/pau/browser/schemasearch.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/browser/schemasearch.txt
===================================================================
--- Zope3/trunk/src/zope/app/pau/browser/schemasearch.txt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/browser/schemasearch.txt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1,14 +1,27 @@
 The Query View for Schema Search Plugins
 ========================================
 
-If a plugin supports `IQuerySchemaSearch`: 
+Placefull setup for making the search plugin IPhysicallyLocatable:
 
+  >>> from zope.app.tests import ztapi
+  >>> from zope.schema.interfaces import ITextLine
+  >>> from zope.app.form.browser import TextWidget
+  >>> from zope.app.form.interfaces import IInputWidget
+  >>> from zope.app.tests.setup import placefulSetUp, placefulTearDown
+  >>> site = placefulSetUp(True)
+  >>> ztapi.browserView(ITextLine, '', TextWidget, providing=IInputWidget)
+
+If a plugin supports `IQuerySchemaSearch`:
+
   >>> from zope.interface import Interface
   >>> import zope.schema
   >>> class ISearchCriteria(Interface):
   ...     search = zope.schema.TextLine(title=u"Search String")
 
+  >>> from zope.interface import implements
   >>> class MySearchPlugin:
+  ...     __name__ = 'searchplugin'
+  ...     __parent__ = site
   ...     schema = ISearchCriteria
   ...     data = ['foo', 'bar', 'blah']
   ...
@@ -38,6 +51,7 @@
 This allows us to render a search form.
 
   >>> print view.render('test') # doctest: +NORMALIZE_WHITESPACE
+  <h4 i18n:translate="">searchplugin /searchplugin</h4>
   <div class="row">
   <div class="label">
   <label for="test.field.search" title="">
@@ -45,11 +59,15 @@
   </label>
   </div>
   <div class="field">
-  <input class="textType" id="test.field.search" name="test.field.search" 
+  <input class="textType" id="test.field.search" name="test.field.search"
          size="20" type="text" value=""  />
   </div>
   </div>
-  <br /><input type="submit" name="test.search" value="Search" />
+  <div class="row">
+  <div class="field">
+  <input type="submit" name="test.search" value="Search" />
+  </div>
+  </div>
 
 If we ask for results:
 
@@ -70,4 +88,6 @@
 so that we now get results (!):
 
   >>> list(view.results('test'))
-  ['bar', 'blah']
\ No newline at end of file
+  ['bar', 'blah']
+
+  >>> placefulTearDown()


Property changes on: Zope3/trunk/src/zope/app/pau/browser/schemasearch.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/browser/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/pau/browser/tests.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/browser/tests.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -13,27 +13,24 @@
 ##############################################################################
 """Pluggable Authentication Service Tests
 
-$Id: tests.py 27985 2004-10-12 08:00:42Z srichter $
+$Id$
 """
 __docformat__ = "reStructuredText"
 import unittest
 from zope.testing import doctest
-from zope.schema.interfaces import ITextLine
-from zope.app.tests import placelesssetup
-from zope.app.tests import ztapi
-from zope.app.form.browser import TextWidget
-from zope.app.form.interfaces import IInputWidget
+from zope.app.tests.setup import placefulSetUp, placefulTearDown
 
-def setUp(test):
-    placelesssetup.setUp()
-    ztapi.browserView(ITextLine, '', TextWidget, providing=IInputWidget)
 
+def schemaSearchSetUp(self):
+    placefulSetUp(site=True)
+
+def schemaSearchTearDown(self):
+    placefulTearDown()
+
 def test_suite():
     return unittest.TestSuite((
-        doctest.DocFileSuite('schemasearch.txt',
-                             setUp=setUp, tearDown=placelesssetup.tearDown),
+        doctest.DocFileSuite('schemasearch.txt'),
         ))
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
-


Property changes on: Zope3/trunk/src/zope/app/pau/browser/tests.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/browserplugins.py
===================================================================
--- Zope3/trunk/src/zope/app/pau/browserplugins.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/browserplugins.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -147,9 +147,11 @@
 
 
 class IFormChallengerLoginPageName(Interface):
-    """HTTP Basic Auth Realm
+    """Defines the login page name which provides a login form.
 
-    Represents the realm string that is used during basic HTTP authentication
+    The default login page name is loginForm.html. This page has
+    to provide two input fields named 'login' and 'password'.
+
     """
 
     loginpagename = TextLine(title=u'loginpagename',
@@ -188,7 +190,7 @@
     loginpagename = 'loginForm.html'
 
     def challenge(self, request, response):
-        """ Response shuold redirect to login page cause Credebtials
+        """ Response should redirect to login page cause Credentials
             could not have been extracted.
         """
         site = hooks.getSite()


Property changes on: Zope3/trunk/src/zope/app/pau/challengeplugins.zcml
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/pau/configure.zcml	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/configure.zcml	2005-01-17 00:21:45 UTC (rev 28852)
@@ -72,5 +72,5 @@
   <include file="groupfolder.zcml" />
 
   <include package=".browser" />
-  
+
 </configure>


Property changes on: Zope3/trunk/src/zope/app/pau/configure.zcml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/extractionplugins.zcml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/generic.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/pau/groupfolder.py
===================================================================
--- Zope3/trunk/src/zope/app/pau/groupfolder.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/pau/groupfolder.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -13,7 +13,7 @@
 ##############################################################################
 """Zope Groups Folder implementation
 
-$Id: groupfolder.py 27237 2004-10-12 09:33:00 mriya3 $
+$Id$
 
 """
 


Property changes on: Zope3/trunk/src/zope/app/pau/groupfolder.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/groupfolder.zcml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/principalfolder.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/principalplugins.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/principalplugins.zcml
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/pau/sql.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/rotterdam/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/configure.zcml	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/rotterdam/configure.zcml	2005-01-17 00:21:45 UTC (rev 28852)
@@ -22,6 +22,11 @@
       layer="zope.app.rotterdam.rotterdam" />
   
   <browser:resource 
+      name="zope3.js" 
+      file="zope3.js" 
+      layer="zope.app.rotterdam.rotterdam" />
+  
+  <browser:resource 
       name="xmltree.js" 
       file="xmltree.js" 
       layer="zope.app.rotterdam.rotterdam" />

Modified: Zope3/trunk/src/zope/app/rotterdam/dialog_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/dialog_macros.pt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/rotterdam/dialog_macros.pt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -42,7 +42,10 @@
         >
 
     <div id="global">
-       <img tal:attributes="src context/++resource++zope3logo.gif" />
+      <a href="#" name="top"
+         tal:attributes="href string:${request/URL/0}">
+        <img tal:attributes="src context/++resource++zope3logo.gif" />
+      </a>
     </div>
 
     <div id="personal">

Modified: Zope3/trunk/src/zope/app/rotterdam/template.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/template.pt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/rotterdam/template.pt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1,4 +1,4 @@
-<metal:block define-macro="page"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block>
+<metal:block define-macro="page"><metal:block define-slot="doctype"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></metal:block>
 
 <html xmlns="http://www.w3.org/1999/xhtml"
     xml:lang="en"
@@ -27,6 +27,11 @@
     <metal:block define-slot="style_slot" />
     <metal:block define-slot="ecmascript_slot" />
 
+    <!-- Basic zope3 javascript's -->
+    <script type="text/javascript" src="zope3.js"
+            tal:attributes="src string:${context/++resource++zope3.js}" >
+    </script>
+
     <!-- Popup script for the OnlineHelp -->
     <script type="text/javascript" src="onlinehelp.js"
             tal:attributes="src string:${context/++resource++onlinehelp.js}" >
@@ -63,7 +68,8 @@
         </metal:block>
       </div>
       <metal:slot define-slot="logo">
-        <img tal:attributes="src context/++resource++zope3logo.gif" />
+        <a href="#" name="top"
+           tal:attributes="href string:${request/URL/0}/@@SelectedManagementView.html"><img tal:attributes="src context/++resource++zope3logo.gif" /></a>
       </metal:slot>
     </div>
     </metal:slot>

Modified: Zope3/trunk/src/zope/app/rotterdam/zope3.css
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/zope3.css	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/rotterdam/zope3.css	2005-01-17 00:21:45 UTC (rev 28852)
@@ -503,7 +503,15 @@
     text-align: left;
 }
 
+/*colorize the matrix table used in grant.html*/
+table.matrix td.default {
+    background: green;
+}
 
+table.matrix td.changed {
+    background: red;
+}
+
 div.spacer {
     clear: both;
 }

Copied: Zope3/trunk/src/zope/app/rotterdam/zope3.js (from rev 28850, Zope3/branches/roger-sourcequeryview/src/zope/app/rotterdam/zope3.js)
===================================================================
--- Zope3/branches/roger-sourcequeryview/src/zope/app/rotterdam/zope3.js	2005-01-16 19:59:10 UTC (rev 28850)
+++ Zope3/trunk/src/zope/app/rotterdam/zope3.js	2005-01-17 00:21:45 UTC (rev 28852)
@@ -0,0 +1,58 @@
+//----------------------------------------------------------------------------
+// Copyright (c) 2005 Zope Corporation and Contributors.
+// All Rights Reserved.
+//
+// This software is subject to the provisions of the Zope Public License,
+// Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+// WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+// FOR A PARTICULAR PURPOSE.
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// guess browser version, feel free to enhance it if needed.
+//----------------------------------------------------------------------------
+var ie = document.all != null;
+var moz = !ie && document.getElementById != null && document.layers == null;
+
+//----------------------------------------------------------------------------
+// change the status (color) of the matrix table used in grant.html
+//----------------------------------------------------------------------------
+function changeMatrix(e) {
+  var ele = e? e: window.event;
+  var id = ele.getAttribute('id');
+  var name = ele.getAttribute('name');
+  if (moz) {
+    var label = ele.parentNode;
+    var center = label.parentNode;
+    var td = center.parentNode;
+  }
+  else {
+    var label = ele.parentElement;
+    var center = label.parentElement;
+    var td = center.parentElement;
+  }
+  resetMatrixCSS(name);
+  if (td.className != "default") {
+    td.className = "changed";
+  }
+}
+
+function resetMatrixCSS(name) {
+  var inputFields = document.getElementsByTagName('input');
+  for (var i = 0; i < inputFields.length; i++) {
+    var field = inputFields[i];
+    if (field.getAttribute('name') == name) {
+      if (moz) {
+        td = field.parentNode.parentNode.parentNode;
+      }
+      else {
+        td = field.parentElement.parentElement.parentElement;
+      }
+      if (td.className != "default") {
+        td.className = "";
+      }
+    }
+  }
+}


Property changes on: Zope3/trunk/src/zope/app/rotterdam/zope3.js
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/security/browser/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/security/browser/__init__.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/security/browser/__init__.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1,2 +1,17 @@
+##############################################################################
 #
-# This file is necessary to make this directory a package.
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Security Views
+
+$Id:$
+"""


Property changes on: Zope3/trunk/src/zope/app/security/browser/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: Zope3/trunk/src/zope/app/security/browser/auth.py
===================================================================
--- Zope3/trunk/src/zope/app/security/browser/auth.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/security/browser/auth.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -17,6 +17,7 @@
 """
 from zope.interface import implements
 from zope.i18n import translate
+from zope.app.zapi import getName, getPath
 from zope.app.publisher.interfaces.http import ILogin, ILogout
 from zope.app.security.interfaces import IAuthentication
 from zope.app.security.principalregistry import UnauthenticatedPrincipal
@@ -35,7 +36,12 @@
         self.request = request
 
     def render(self, name):
+        sourcename = 'principals.zcml'
         html = []
+        
+        # add sub title for source search field
+        html.append('<h4 i18n:translate="">%s</h4>' % sourcename)
+        # start row for search fields
         html.append('<div class="row">')
         html.append('<div class="label">')
         html.append('Search String')
@@ -45,10 +51,17 @@
         html.append('</div>')
         html.append('</div>')
 
-        html.append('<br /><input type="submit" name="%s" value="%s" />'
+        # add search button for search fields
+        html.append('<div class="row">')
+        html.append('<div class="field">')
+        html.append('<input type="submit" name="%s" value="%s" />'
                     % (name+'.search',
                        translate(search_label, context=self.request)))
+        html.append('</div>')
 
+        # end row
+        html.append('</div>')
+
         return '\n'.join(html)
 
     def results(self, name):

Modified: Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt
===================================================================
--- Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -28,6 +28,7 @@
 This allows us to render a search form.
 
   >>> print view.render('test') # doctest: +NORMALIZE_WHITESPACE
+  <h4 i18n:translate="">principals.zcml</h4>
   <div class="row">
   <div class="label">
   Search String
@@ -36,7 +37,11 @@
   <input type="text" name="test.searchstring" />
   </div>
   </div>
-  <br /><input type="submit" name="test.search" value="Search" />
+  <div class="row">
+  <div class="field">
+  <input type="submit" name="test.search" value="Search" />
+  </div>
+  </div>
 
 If we ask for results:
 


Property changes on: Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt
___________________________________________________________________
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/security/browser/principalterms.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/security/browser/principalterms.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/security/browser/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/security/browser/tests.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/security/browser/tests.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -13,7 +13,7 @@
 ##############################################################################
 """Security Views Tests
 
-$Id: tests.py 27985 2004-10-12 08:00:42Z srichter $
+$Id$
 """
 __docformat__ = "reStructuredText"
 import unittest


Property changes on: Zope3/trunk/src/zope/app/security/browser/tests.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/SETUP.cfg
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/securitypolicy/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/__init__.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/__init__.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1,2 +1,17 @@
+##############################################################################
 #
-# This file is necessary to make this directory a package.
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Securitypolicy
+
+$Id:$
+"""


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/__init__.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/__init__.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1 +1,17 @@
-# Security Policy Browser Package
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Securitypolicy Views
+
+$Id:$
+"""


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/browser/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/configure.zcml	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/configure.zcml	2005-01-17 00:21:45 UTC (rev 28852)
@@ -10,6 +10,16 @@
       to principals."
       />
 
+<!-- RadioWidget for build a matrix for granting permissions -->
+  <zope:view
+      type="zope.publisher.interfaces.browser.IBrowserRequest"
+      for="zope.schema.interfaces.IChoice
+           zope.app.securitypolicy.interfaces.IGrantVocabulary"
+      provides="zope.app.form.interfaces.IInputWidget"
+      factory="zope.app.securitypolicy.browser.granting.GrantWidget"
+      permission="zope.Public"
+      />
+
 <!-- Role Utility -->
 
   <addform

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/ftests.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/ftests.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/ftests.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -13,7 +13,7 @@
 ##############################################################################
 """Functional tests for Security Policy's Grant screens.
 
-$Id: ftests.py 25177 2004-06-02 13:17:31Z jim $
+$Id$
 """
 import unittest
 from zope.app.tests.functional import BrowserTestCase


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/browser/ftests.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1,63 +1,75 @@
 <html metal:use-macro="context/@@standard_macros/page">
 <body>
 <div metal:fill-slot="body" i18n:domain="zope">
+  <h2 i18n:translate="">Granting Roles and Permissions to Principals</h2>
+  <p tal:define="status view/status"
+     tal:condition="status"
+     tal:content="status" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
-<h2 i18n:translate="">Granting Roles and Permissions to Principals</h2>
+  <form action="" method="POST">
+    <h4 i18n:translate="">Selected principal:</h4>
+    <div tal:content="structure view/principal_widget">...</div>
+    <div tal:condition="view/principal">
 
-<p tal:define="status view/status"
-   tal:condition="status"
-   tal:content="status" />
+      <h2 i18n:translate="">Grants for the selected principal</h2>
+      <input type="submit" name="GRANT_SUBMIT" value="Change" 
+             i18n:attributes="value grant-submit" />
 
-<form action="" method="post">
-<p i18n:translate="">Select a principal:</p>
-<div tal:content="structure view/principal_widget">...</div>
+      <table width="100%" border="0">
+        <tr>
+          <td valign="top">
+            <table class="matrix">
+              <tr>
+                <td i18n:translate=""><strong>Roles</strong>&nbsp;</td>
+                <td i18n:translate=""><strong>Allow</strong>&nbsp;</td>
+                <td i18n:translate=""><strong>Unset</strong>&nbsp;</td>
+                <td i18n:translate=""><strong>Deny</strong>&nbsp;</td>
+              </tr>
+              <tr tal:repeat="widget view/roles">
+                <td valign="top" nowrap>
+                  <div class="label">
+                    <label for="field.name" title="The widget's hint"
+                           tal:attributes="for widget/name; title widget/hint"
+                           tal:content="widget/label">The Label</label>
+                  </div>
+                </td>
+								<tal:block tal:content="structure widget">roles widget</tal:block>
+              </tr>
+              <tr>
+                <td colspan="2"><a href="#top" i18n:translate="">^ top</a></td>
+              </tr>
+            </table>
+          </td>
+          <td valign="top">
+            <table class="matrix">
+              <tr>
+                <td i18n:translate=""><strong>Permissions</strong>&nbsp;</td>
+                <td i18n:translate=""><strong>Allow</strong>&nbsp;</td>
+                <td i18n:translate=""><strong>Unset</strong>&nbsp;</td>
+                <td i18n:translate=""><strong>Deny</strong>&nbsp;</td>
+              </tr>
+              <tr tal:repeat="widget view/permissions">
+                <td valign="top" nowrap>
+                  <div class="label">
+                    <label for="field.name" title="The widget's hint"
+                           tal:attributes="for widget/name; title widget/hint"
+                           tal:content="widget/label">The Label</label>
+                  </div>
+                </td>
+								<tal:block tal:content="structure widget">permission widget</tal:block>
+              </tr>
+              <tr>
+                <td colspan="2"><a href="#top" i18n:translate="">^ top</a></td>
+              </tr>
+            </table>
+          </td>
+        </tr>
+      </table>
+      <input type="submit" name="GRANT_SUBMIT" value="Change" 
+             i18n:attributes="value grant-submit" />
 
-<div tal:condition="view/principal">
-
-  <h2 i18n:translate="">Grants for the selected principal</h2>
-
-  <input type="submit" name="GRANT_SUBMIT" value="Change" 
-         i18n:attributes="value grant-submit" />
-
-<table width="100%">
-  <tr>
-    <th i18n:translate="">Roles:</th>
-    <th i18n:translate="">Permissions:</th>
-  <tr/>
-  <tr>
-    <td valign="top">
-      <div class="row" tal:repeat="widget view/roles">
-        <div class="label">
-          <label for="field.name" title="The widget's hint"
-            tal:attributes="for widget/name; title widget/hint"
-            tal:content="widget/label">The Label</label>
-        </div>
-        <div class="field" tal:content="structure widget">
-          <input type="text" style="width:100%"/>
-        </div>
-      </div>
-    </td>
-    <td valign="top">
-      <div class="row" tal:repeat="widget view/permissions">
-        <div class="label">
-          <label for="field.name" title="The widget's hint"
-            tal:attributes="for widget/name; title widget/hint"
-            tal:content="widget/label">The Label</label>
-        </div>
-        <div class="field" tal:content="structure widget">
-          <input type="text" style="width:100%"/>
-        </div>
-      </div>
-    </td>
-  <tr/>
-</table>
-
-  <input type="submit" name="GRANT_SUBMIT" value="Change" 
-         i18n:attributes="value grant-submit" />
-
+    </div>
+  </form>
 </div>
-</form>
-
-</div>
 </body>
 </html>


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/granting.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/granting.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/granting.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -21,21 +21,113 @@
 from zope.app import zapi
 from zope.app.security.vocabulary import PrincipalSource
 from zope.app.form.utility import setUpWidget
+from zope.app.form.browser import RadioWidget
+from zope.app.form.browser.widget import renderElement
 from zope.app.i18n import ZopeMessageIDFactory as _
 
 from zope.app.form.interfaces import IInputWidget
 from zope.app.securitypolicy.interfaces import IPrincipalPermissionManager
 from zope.app.securitypolicy.interfaces import IPrincipalRoleManager
 from zope.app.securitypolicy.interfaces import IRole
+from zope.app.securitypolicy.vocabulary import GrantVocabulary
 from zope.app.security.interfaces import IPermission
 from zope.app.security import settings
 
-settings_vocabulary = SimpleVocabulary(
+settings_vocabulary = GrantVocabulary(
     [SimpleTerm(settings.Allow, token="allow", title=_('Allow')),
      SimpleTerm(settings.Unset, token="unset", title=_('Unset')),
      SimpleTerm(settings.Deny,  token='deny',  title=_('Deny')),
      ])
 
+
+class GrantWidget(RadioWidget):
+    """Garnt widget for build a colorized matrix.
+    
+    The matrix shows anytime the status if you edit the radio widgets.
+    This special widget shows the radio input field without labels.
+    The labels are added in the header of the table. The order of the radio
+    input fields is 'Allowed', 'Unset', 'Deny'.
+    
+    """
+    orientation = "horizontal"
+    _tdTemplate = u'\n<td class="%s">\n<center>\n<label for="%s" title="%s">\n%s\n</label>\n</center>\n</td>\n'
+
+    def __call__(self):
+        """See IBrowserWidget."""
+        value = self._getFormValue()
+        contents = []
+        have_results = False
+
+        return self.renderValue(value)
+
+
+    def renderItem(self, index, text, value, name, cssClass):
+        """Render an item of the list. 
+        
+        Revert the order of label and text. Added field id to the lable 
+        attribute.
+        
+        Added tabel td tags for fit in the matrix table.
+        
+        """
+        
+        tdClass = ''
+        id = '%s.%s' % (name, index)
+        elem = renderElement(u'input',
+                             value=value,
+                             name=name,
+                             id=id,
+                             cssClass=cssClass,
+                             type='radio',
+                             extra = 'onclick="changeMatrix(this);"')
+        return self._tdTemplate % (tdClass, id, text, elem)
+
+    def renderSelectedItem(self, index, text, value, name, cssClass):
+        """Render a selected item of the list. 
+        
+        Revert the order of label and text. Added field id to the lable 
+        attribute.
+        """
+
+        tdClass = 'default'
+        id = '%s.%s' % (name, index)
+        elem = renderElement(u'input',
+                             value=value,
+                             name=name,
+                             id=id,
+                             cssClass=cssClass,
+                             checked="checked",
+                             type='radio',
+                             extra = 'onclick="changeMatrix(this);"')
+        return self._tdTemplate %(tdClass, id, text, elem)
+
+    def renderItems(self, value):
+        # check if we want to select first item, the previously selected item
+        # or the "no value" item.
+        no_value = None
+        if (value == self.context.missing_value
+            and getattr(self, 'firstItem', False)
+            and len(self.vocabulary) > 0):
+            if self.context.required:
+                # Grab the first item from the iterator:
+                values = [iter(self.vocabulary).next().value]
+            else:
+                # the "no value" option will be checked
+                no_value = 'checked'
+        elif value != self.context.missing_value:
+            values = [value]
+        else:
+            values = []
+
+        items = self.renderItemsWithValues(values)
+        return items
+
+    def renderValue(self, value):
+        rendered_items = self.renderItems(value)
+        return " ".join(rendered_items)
+
+
+
 class Granting(object):
 
     principal = None


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/browser/granting.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/browser/granting.txt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/granting_ftest.txt
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/granting_ftest.txt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/granting_ftest.txt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -39,7 +39,7 @@
   >>> print http(r"""
   ... POST /@@grant.html HTTP/1.1
   ... Authorization: Basic mgr:mgrpw
-  ... Content-Length: 169
+  ... Content-Length: 62415
   ... Content-Type: application/x-www-form-urlencoded
   ... Referer: http://localhost:8081/@@grant.html
   ... 
@@ -49,17 +49,52 @@
   ... """&field.principal.MA__.apply=Apply""")
   HTTP/1.1 200 Ok
   ...
-  <select name="field.em9wZS5tZ3I_.role.zope.Member" size="1" >
-  <option value="allow">Allow</option>
-  <option selected="selected" value="unset">Unset</option>
-  <option value="deny">Deny</option>
-  </select>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.role.zope.Member.0" title="Allow">
+  <input class="radioType" id="field.em9wZS5tZ3I_.role.zope.Member.0" name="field.em9wZS5tZ3I_.role.zope.Member" type="radio" value="allow" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="default">
+  <center>
+  <label for="field.em9wZS5tZ3I_.role.zope.Member.1" title="Unset">
+  <input class="radioType" checked="checked" id="field.em9wZS5tZ3I_.role.zope.Member.1" name="field.em9wZS5tZ3I_.role.zope.Member" type="radio" value="unset" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.role.zope.Member.2" title="Deny">
+  <input class="radioType" id="field.em9wZS5tZ3I_.role.zope.Member.2" name="field.em9wZS5tZ3I_.role.zope.Member" type="radio" value="deny" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
   ...
-  <select name="field.em9wZS5tZ3I_.permission.zope.ManageCode" size="1" >
-  <option value="allow">Allow</option>
-  <option selected="selected" value="unset">Unset</option>
-  <option value="deny">Deny</option>
-  </select>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.permission.zope.ManageCode.0" title="Allow">
+  <input class="radioType" id="field.em9wZS5tZ3I_.permission.zope.ManageCode.0" name="field.em9wZS5tZ3I_.permission.zope.ManageCode" type="radio" value="allow" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="default">
+  <center>
+  <label for="field.em9wZS5tZ3I_.permission.zope.ManageCode.1" title="Unset">
+  <input class="radioType" checked="checked" id="field.em9wZS5tZ3I_.permission.zope.ManageCode.1" name="field.em9wZS5tZ3I_.permission.zope.ManageCode" type="radio" value="unset" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.permission.zope.ManageCode.2" title="Deny">
+  <input class="radioType" id="field.em9wZS5tZ3I_.permission.zope.ManageCode.2" name="field.em9wZS5tZ3I_.permission.zope.ManageCode" type="radio" value="deny" onclick="changeMatrix(this);" />
+  </label>
+  </center>
   ...
 
 Before we submit any data, there are no grants for the root object
@@ -82,7 +117,7 @@
   >>> print http(r"""
   ... POST /@@grant.html HTTP/1.1
   ... Authorization: Basic mgr:mgrpw
-  ... Content-Length: 6311
+  ... Content-Length: 62437
   ... Content-Type: application/x-www-form-urlencoded
   ... Referer: http://localhost:8081/@@grant.html
   ... 
@@ -96,17 +131,52 @@
   ... """&GRANT_SUBMIT=Change""")
   HTTP/1.1 200 Ok
   ...
-  <select name="field.em9wZS5tZ3I_.role.zope.Member" size="1" >
-  <option selected="selected" value="allow">Allow</option>
-  <option value="unset">Unset</option>
-  <option value="deny">Deny</option>
-  </select>
+  <td class="default">
+  <center>
+  <label for="field.em9wZS5tZ3I_.role.zope.Member.0" title="Allow">
+  <input class="radioType" checked="checked" id="field.em9wZS5tZ3I_.role.zope.Member.0" name="field.em9wZS5tZ3I_.role.zope.Member" type="radio" value="allow" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.role.zope.Member.1" title="Unset">
+  <input class="radioType" id="field.em9wZS5tZ3I_.role.zope.Member.1" name="field.em9wZS5tZ3I_.role.zope.Member" type="radio" value="unset" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.role.zope.Member.2" title="Deny">
+  <input class="radioType" id="field.em9wZS5tZ3I_.role.zope.Member.2" name="field.em9wZS5tZ3I_.role.zope.Member" type="radio" value="deny" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
   ...
-  <select name="field.em9wZS5tZ3I_.permission.zope.ManageCode" size="1" >
-  <option value="allow">Allow</option>
-  <option value="unset">Unset</option>
-  <option selected="selected" value="deny">Deny</option>
-  </select>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.permission.zope.ManageCode.0" title="Allow">
+  <input class="radioType" id="field.em9wZS5tZ3I_.permission.zope.ManageCode.0" name="field.em9wZS5tZ3I_.permission.zope.ManageCode" type="radio" value="allow" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="">
+  <center>
+  <label for="field.em9wZS5tZ3I_.permission.zope.ManageCode.1" title="Unset">
+  <input class="radioType" id="field.em9wZS5tZ3I_.permission.zope.ManageCode.1" name="field.em9wZS5tZ3I_.permission.zope.ManageCode" type="radio" value="unset" onclick="changeMatrix(this);" />
+  </label>
+  </center>
+  </td>
+  <BLANKLINE>
+  <td class="default">
+  <center>
+  <label for="field.em9wZS5tZ3I_.permission.zope.ManageCode.2" title="Deny">
+  <input class="radioType" checked="checked" id="field.em9wZS5tZ3I_.permission.zope.ManageCode.2" name="field.em9wZS5tZ3I_.permission.zope.ManageCode" type="radio" value="deny" onclick="changeMatrix(this);" />
+  </label>
+  </center>
   ...
 
 And, if we check the grants, we see the changes:

Modified: Zope3/trunk/src/zope/app/securitypolicy/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/interfaces.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/interfaces.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -222,3 +222,6 @@
         The role grants are an iterable of role, setting tuples, where
         setting is either Allow or Deny.
         """
+
+class IGrantVocabulary(Interface):
+    """Marker interface for register the RadioWidget."""


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/principalrole.py
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/securitymap.py
___________________________________________________________________
Name: svn:keywords
   + Id


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/tests/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id

Modified: Zope3/trunk/src/zope/app/securitypolicy/tests/test_role.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/tests/test_role.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/tests/test_role.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -13,7 +13,7 @@
 ##############################################################################
 """Doctests for 'permission' module.
 
-$Id: test_permission.py 26201 2004-07-08 10:42:46Z srichter $
+$Id$
 """
 import unittest
 from zope.testing.doctestunit import DocTestSuite


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/tests/test_role.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/securitypolicy/tests/test_vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/tests/test_vocabulary.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/tests/test_vocabulary.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -1,27 +1,27 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Role vocabluary doc tests.
-
-$Id$
-"""
-import unittest
-from zope.testing.doctestunit import DocTestSuite
-
-def test_suite():
-    return unittest.TestSuite((
-        DocTestSuite('zope.app.securitypolicy.vocabulary'),
-        ))
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Role vocabluary doc tests.
+
+$Id$
+"""
+import unittest
+from zope.testing.doctestunit import DocTestSuite
+
+def test_suite():
+    return unittest.TestSuite((
+        DocTestSuite('zope.app.securitypolicy.vocabulary'),
+        ))
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/tests/test_vocabulary.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py	2005-01-17 00:21:45 UTC (rev 28852)
@@ -15,11 +15,13 @@
 
 This vocabulary provides role IDs.
 
-$Id:$
+$Id$
 """
+from zope.interface import implements
 from zope.app import zapi
 from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
 from zope.app.securitypolicy.interfaces import IRole
+from zope.app.securitypolicy.interfaces import IGrantVocabulary
 
 class RoleIdsVocabulary(SimpleVocabulary):
     """A vocabular of role IDs.
@@ -64,3 +66,9 @@
         super(RoleIdsVocabulary, self).__init__(terms)
 
 
+class GrantVocabulary(SimpleVocabulary):
+    """A vocabular for getting the RadioWidget via the Choice field."""
+    
+    implements(IGrantVocabulary)
+
+


Property changes on: Zope3/trunk/src/zope/app/securitypolicy/vocabulary.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Modified: Zope3/trunk/src/zope/app/zopetop/view_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/zopetop/view_macros.pt	2005-01-16 22:36:48 UTC (rev 28851)
+++ Zope3/trunk/src/zope/app/zopetop/view_macros.pt	2005-01-17 00:21:45 UTC (rev 28852)
@@ -23,7 +23,7 @@
   <body tal:attributes="onload body_onload | nothing">
 
     <div class="top">
-      <a href="#" tal:attributes="href string:${request/URL/1}/@@manage">
+      <a href="#" name="top" tal:attributes="href string:${request/URL/1}/@@manage">
         <img src="zope3logo.jpg" width="366" height="37"
              alt="Zope 3 Logo"
              tal:attributes="src context/++resource++zope3logo.jpg" />



More information about the Zope3-Checkins mailing list