Author: jmorliaguet
Date: Tue May  9 15:46:54 2006
New Revision: 3088

Added:
   cpsskins/branches/paris-sprint-2006/ui/manager/registration.pt   (contents, 
props changed)
Modified:
   cpsskins/branches/paris-sprint-2006/INSTALL.txt
   cpsskins/branches/paris-sprint-2006/ui/manager/configure.zcml
   cpsskins/branches/paris-sprint-2006/ui/manager/themes_manager.pt
   cpsskins/branches/paris-sprint-2006/ui/manager/views.py

Log:

- added a custom registration page for theme management folders



Modified: cpsskins/branches/paris-sprint-2006/INSTALL.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/INSTALL.txt     (original)
+++ cpsskins/branches/paris-sprint-2006/INSTALL.txt     Tue May  9 15:46:54 2006
@@ -31,10 +31,11 @@
 
 4) Add a "Theme Management Folder" (choose any ID)
 
-5) Enable the themes by clicking on the 'Enable themes' button.
+5) Go to the "Registration" tab
+   Enable the themes by clicking on the 'Enable themes' button.
 
-6) Press the "Add theme" button
-   a minimal theme called 'Theme' will be added.
+6) Go to the "Themes" tab
+   Press the "Add theme" button a minimal theme called 'Theme' will be added.
 
 7) Click on the 'Theme' link
 

Modified: cpsskins/branches/paris-sprint-2006/ui/manager/configure.zcml
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/manager/configure.zcml       
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/manager/configure.zcml       Tue May 
 9 15:46:54 2006
@@ -38,4 +38,15 @@
 
   </pages>
 
+  <!-- registration management -->
+
+  <page
+      for="cpsskins.thememanager.IThemeManagementFolder"
+      name="registration.html"
+      menu="zmi_views" title="Registration"
+      permission="zope.ManageSite"
+      class=".views.ThemeManagerView"
+      template="registration.pt"
+  />
+
 </configure>

Added: cpsskins/branches/paris-sprint-2006/ui/manager/registration.pt
==============================================================================
--- (empty file)
+++ cpsskins/branches/paris-sprint-2006/ui/manager/registration.pt      Tue May 
 9 15:46:54 2006
@@ -0,0 +1,24 @@
+<html metal:use-macro="context/@@standard_macros/view">
+  <body>
+    <div metal:fill-slot="body"
+         tal:define="enabled view/isEnabled">
+
+      <h4>Registration</h4>
+      <form tal:condition="not:enabled"
+            action="./@@enableThemes.html" method="post">
+        <p style="color:red">Themes are currently disabled.</p>
+        <p>
+          <input type="submit" value="Enable themes" />
+        </p>
+      </form>
+
+      <form tal:condition="enabled"
+            action="./@@disableThemes.html" method="post">
+        <p>
+          <input type="submit" value="Disable themes" />
+        </p>
+      </form>
+
+    </div>
+  </body>
+</html>

Modified: cpsskins/branches/paris-sprint-2006/ui/manager/themes_manager.pt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/manager/themes_manager.pt    
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/manager/themes_manager.pt    Tue May 
 9 15:46:54 2006
@@ -3,22 +3,6 @@
     <div metal:fill-slot="body"
          tal:define="enabled view/isEnabled">
 
-      <h4>Registration</h4>
-      <form tal:condition="not:enabled"
-            action="./@@enableThemes.html" method="post">
-        <p style="color:red">Themes are currently disabled.</p>
-        <p>
-          <input type="submit" value="Enable themes" />
-        </p>
-      </form>
-
-      <form tal:condition="enabled"
-            action="./@@disableThemes.html" method="post">
-        <p>
-          <input type="submit" value="Disable themes" />
-        </p>
-      </form>
-
       <h4>Themes</h4>
       <tal:block define="themes view/listThemeInfo">
         <ul>

Modified: cpsskins/branches/paris-sprint-2006/ui/manager/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/manager/views.py     (original)
+++ cpsskins/branches/paris-sprint-2006/ui/manager/views.py     Tue May  9 
15:46:54 2006
@@ -72,12 +72,12 @@
         sm = self._getSiteManager()
         sm.registerUtility(removeSecurityProxy(self.context),
                            IThemeManagementFolder)
-        self.request.response.redirect('@@themes-manager.html')
+        self.request.response.redirect('@@registration.html')
 
     def disableThemes(self):
         sm = self._getSiteManager()
         sm.unregisterUtility(self.context, IThemeManagementFolder)
-        self.request.response.redirect('@@themes-manager.html')
+        self.request.response.redirect('@@registration.html')
 
     def getThemes(self):
         return self.tmutil.getThemes()
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to