[Zope3-checkins] CVS: Zope3/src/zope/app/browser/workflow/stateful - configure.zcml:1.7 definition.py:1.7 definition_edit.pt:1.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 15 21:45:22 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/workflow/stateful
In directory cvs.zope.org:/tmp/cvs-serv20171/app/browser/workflow/stateful

Modified Files:
	configure.zcml definition.py definition_edit.pt 
Log Message:
Merging dreamcatcher's TTW Schema branch:

1. Fixed Bug in adding that would cause infinite loops when the menu items
   action was not a valif view or factory id.

2. Extended adding to support more complex views. Until now we only 
   supported constructions like "+/AddView=id". Now you are able to say
   "+/AddView/More=id", which means that more information can be carried 
   in the URL. This can be used in many ways, including multi-page adding
   wizards. In my case I needed it to pass in the type of the TTW Schema-
   based Content Component.

3. Added Local Menus. This was a pain in the butt, but I think I got a 
   fairly nice model, where you can create local Menu Services, and Menus
   are simply named utilities. When active they are menus in the menu 
   service. This is very similar to the local interface service and TTW 
   Schema. 

4. Made some modifications to TTW Schema, cleaned up the code and moved
   the browser code and interfaces to the places they belong.

5. Added a Content Component Definition utility component, which takes a
   Schema and creates a content component for it, including permission
   settings and a menu entry. Currently the menu entry is always made to
   a local 'add_content' menu. I will change this and make it actually a
   screen, where the menu and title of the menu item can be chosen by the
   developer. Mmmh, should I add a factory for the definition as well, so
   that the content component is also available via python?

6. Added a Content Component Instance component that represents an 
   instance od a Content Component Definition. You will never directly 
   encounter this component, since it is automatically used by the adding
   code of the Content Component Definition.

7. Cleanups by both dreamcatcher and myself.

That's it. For more details see the branch checkin messages. I now consider
the dreamcatcher-ttwschema-branch closed.


=== Zope3/src/zope/app/browser/workflow/stateful/configure.zcml 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/workflow/stateful/configure.zcml:1.6	Thu Aug  7 13:41:51 2003
+++ Zope3/src/zope/app/browser/workflow/stateful/configure.zcml	Fri Aug 15 20:43:16 2003
@@ -13,7 +13,7 @@
 
   <page
       for="zope.app.interfaces.workflow.stateful.IStatefulProcessDefinition"
-      name="index.html" 
+      name="index.html"
       class=".definition.StatefulProcessDefinitionView"
       permission="zope.ManageServices"
       template="definition_index.pt" />
@@ -29,10 +29,10 @@
   <menuItems
       for="zope.app.interfaces.workflow.stateful.IStatefulProcessDefinition"
       menu="zmi_actions">
-    
-    <menuItem 
+
+    <menuItem
         title="Manage States" action="states/contents.html" />
-    <menuItem 
+    <menuItem
         title="Manage Transitions" action="transitions/contents.html" />
 
   </menuItems>
@@ -52,10 +52,10 @@
       class=".definition.StatesContainerAdding"
       permission="zope.workflow.ManageProcessDefinitions"
       allowed_attributes="addingInfo">
-  
+
     <page name="index.html"  template="add.pt" />
     <page name="action.html" attribute="action" />
-  
+
   </view>
 
 
@@ -104,7 +104,7 @@
       menu="zmi_views"
       label="Edit a Transition"
       permission="zope.workflow.ManageProcessDefinitions" />
-  
+
   <addform
       name="AddTransition"
       menu="add_stateful_transitions" title="Stateful Transition"
@@ -113,7 +113,7 @@
       content_factory="zope.app.workflow.stateful.definition.Transition"
       arguments="sourceState destinationState"
       keyword_arguments="condition script permission triggerMode"
-      fields="sourceState destinationState condition script 
+      fields="sourceState destinationState condition script
               permission triggerMode"/>
 
 
@@ -126,19 +126,19 @@
       description="An utility to manage content and workflow interaction." />
 
   <page
-      name="index.html" 
+      name="index.html"
       for="zope.app.interfaces.workflow.stateful.IContentWorkflowsManager"
       class=".contentworkflow.ContentWorkflowsManagerView"
       permission="zope.ManageServices"
-      template="contentworkflow_index.pt" 
+      template="contentworkflow_index.pt"
       menu="zmi_views" title="Overview"/>
 
   <page
-      name="registry.html" 
+      name="registry.html"
       for="zope.app.interfaces.workflow.stateful.IContentWorkflowsManager"
       class=".contentworkflow.ManageContentProcessRegistry"
       permission="zope.ManageServices"
-      template="contentworkflow_registry.pt" 
+      template="contentworkflow_registry.pt"
       menu="zmi_views" title="Content/Process Registry"/>
 
 
@@ -158,7 +158,7 @@
       for="zope.app.interfaces.container.IContentContainer"
       permission="zope.View"
       class="zope.app.browser.workflow.stateful.content_filter.FilterList"
-      name="published_content.html" 
+      name="published_content.html"
       attribute="published_content" />
 
 <!-- uhm ... this seems to be too generic in its definition


=== Zope3/src/zope/app/browser/workflow/stateful/definition.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/workflow/stateful/definition.py:1.6	Wed Aug 13 17:28:28 2003
+++ Zope3/src/zope/app/browser/workflow/stateful/definition.py	Fri Aug 15 20:43:16 2003
@@ -12,7 +12,7 @@
 #
 ##############################################################################
 """ProcessDefinition registration adding view
- 
+
 $Id$
 """
 __metaclass__ = type
@@ -55,7 +55,7 @@
 
 
 class StatefulProcessDefinitionView(BrowserView):
- 
+
     def getName(self):
         return """I'm a stateful ProcessInstance"""
 
@@ -124,7 +124,7 @@
                  'getter': getattr(self, name+'_get_perm_widget'),
                  'setter': getattr(self, name+'_set_perm_widget')} )
         return info
-        
+
 
 class AddState(BrowserView):
 
@@ -136,7 +136,7 @@
 
 class AddTransition(BrowserView):
 
-    # XXX This could and should be handled by a Vocabulary Field/Widget 
+    # XXX This could and should be handled by a Vocabulary Field/Widget
     def getStateNames(self):
         pd = self.context.getProcessDefinition()
         states = removeAllProxies(pd.getStateNames())


=== Zope3/src/zope/app/browser/workflow/stateful/definition_edit.pt 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/workflow/stateful/definition_edit.pt:1.2	Thu Aug  7 13:41:51 2003
+++ Zope3/src/zope/app/browser/workflow/stateful/definition_edit.pt	Fri Aug 15 20:43:16 2003
@@ -7,18 +7,18 @@
 
 <body>
 <div metal:fill-slot="body">
- 
+
   <p tal:define="status view/update"
      tal:condition="status"
      tal:content="status" />
 
   <form action="./@@edit.html" method="POST">
     <h3>Set Workflow-Relevant Data Schema</h3>
-    <div class="row" 
+    <div class="row"
          tal:content="structure view/relevantDataSchema_widget/row" />
     <div class="row">
-      <div class="controls" style="width: 100%"> 
-        <input type="submit" value="Refresh" 
+      <div class="controls" style="width: 100%">
+        <input type="submit" value="Refresh"
             i18n:attributes="value refresh-button" />
         <input type="submit" value="Set Schema" name="UPDATE_SUBMIT" />
        </div>
@@ -29,25 +29,25 @@
       <h3 i18n:translate="">Map permissions to Schema fields</h3>
 
       <tal:block repeat="widget widgets">
-        <h5 tal:content="string:${widget/fieldName} (${widget/fieldName})">
+        <h5 tal:content="string:${widget/fieldTitle} (${widget/fieldName})">
           FieldName (Field Title)
         </h5>
         <div class="row" tal:replace="structure widget/getter/row">
           <div class="label" i18n:translate="">Get Permission</div>
           <div class="field">
-  
+
           </div>
         </div>
         <div class="row" tal:replace="structure widget/setter/row">
           <div class="label" i18n:translate="">Set Permission</div>
           <div class="field">
-  
+
           </div>
         </div>
       </tal:block>
       <div class="row">
-        <div class="controls" style="width: 100%"> 
-          <input type="submit" value="Refresh" 
+        <div class="controls" style="width: 100%">
+          <input type="submit" value="Refresh"
                  i18n:attributes="value refresh-button" />
           <input type="submit" value="Change" name="CHANGE"
                  i18n:attributes="value change-button" />
@@ -56,7 +56,7 @@
     </tal:block>
 
   </form>
- 
+
 </div>
-</body> 
+</body>
 </html>




More information about the Zope3-Checkins mailing list