[Zope3-checkins] SVN: Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/ templates

Julien Anguenot ja at nuxeo.com
Wed Oct 13 16:59:33 EDT 2004


Log message for revision 28131:
  templates

Changed:
  U   Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/configure.zcml
  A   Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/pd_permissions.pt

-=-
Modified: Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/configure.zcml
===================================================================
--- Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/configure.zcml	2004-10-13 20:58:56 UTC (rev 28130)
+++ Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/configure.zcml	2004-10-13 20:59:32 UTC (rev 28131)
@@ -1,5 +1,6 @@
 <zope:configure
    xmlns:zope="http://namespaces.zope.org/zope"
+   xmlns:browser="http://namespaces.zope.org/browser"
    xmlns="http://namespaces.zope.org/browser">
 
 <!-- Workflow manager -->
@@ -36,6 +37,13 @@
       permission="zope.ManageServices"
       template="definition_index.pt" />
 
+  <page
+      name="pd_permissions.html"
+      for="zope.app.workflow.stateful.interfaces.IStatefulProcessDefinition"
+      template="pd_permissions.pt"
+      permission="zope.ManageServices"
+      />
+
   <menuItems
       for="zope.app.workflow.stateful.interfaces.IStatefulProcessDefinition"
       menu="zmi_actions">
@@ -44,11 +52,41 @@
         title="Manage States" action="states/contents.html" />
     <menuItem
         title="Manage Transitions" action="transitions/contents.html" />
+    <menuItem
+        title="Manage permissions" action="pd_permissions.html" />
+        />
 
   </menuItems>
 
+  <!-- Stateful process Permissions changed -->
 
-<!-- States/Transitions Container Adding Menus -->
+  <browser:page
+       name="pdAddPermission.py"
+       for="..interfaces.IStatefulProcessDefinition"
+       class=".pd_permissionchange_view.PermissionChangeView"
+       attribute="sendProcessDefinitionAddPermissionsEvent"
+       permission="zope.workflow.ManageProcessDefinitions"
+       />
+
+  <browser:page
+       name="pdDelPermission.py"
+       for="..interfaces.IStatefulProcessDefinition"
+       class=".pd_permissionchange_view.PermissionChangeView"
+       attribute="sendProcessDefinitionDelPermissionsEvent"
+       permission="zope.workflow.ManageProcessDefinitions"
+       />
+
+  <!-- State permissions roles mapping updated -->
+
+  <browser:page
+      name="state_permissions_role_mapping_change.py"
+      for="..interfaces.IState"
+      class=".state_permissionchange_view.PermissionsRolesMappingChangeView"
+      attribute="sendStateUpdatePermissionsRolesMappingEvent"
+      permission="zope.workflow.ManageProcessDefinitions"
+       />
+
+  <!-- States/Transitions Container Adding Menus -->
   <menu id="add_stateful_states" title="State Items" />
   <menu id="add_stateful_transitions" title="Transition Items" />
 
@@ -87,7 +125,16 @@
       arguments=""
       fields="" />
 
+  <page
+      name="state_permissions_role.html"
+      for="zope.app.workflow.stateful.interfaces.IState"
+      menu="zmi_views"
+      title="State permissions role"
+      template="state_permissions_role.pt"
+      permission="zope.Public"
+      />
 
+
 <!-- Transitions Container -->
 
   <view
@@ -103,8 +150,6 @@
 
   </view>
 
-
-
 <!-- Transition -->
   <editform
       schema="zope.app.workflow.stateful.interfaces.ITransition"

Added: Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/pd_permissions.pt
===================================================================
--- Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/pd_permissions.pt	2004-10-13 20:58:56 UTC (rev 28130)
+++ Zope3/branches/jack-e_interfacebased_workflow/src/zope/app/workflow/stateful/browser/pd_permissions.pt	2004-10-13 20:59:32 UTC (rev 28131)
@@ -0,0 +1,53 @@
+<html metal:use-macro='context/@@standard_macros/view'
+      i18n:domain='zope'>
+<body>
+<div metal:fill-slot='body'>
+<h1>Manage permissions</h1>
+<i>
+You may add relevant permissions for this process definition in here.  It will
+allow you to configure the permissions role mappings on the states included
+within your process definition.
+</i>
+<br />
+<tal:block define="permissions context/getProcessPermissions">
+<h2>Below are the permissions already defined on this process definition</h2>
+  <tal:block condition="not:permissions">
+    No permissions defined yet
+  </tal:block>
+  <tal:block condition="permissions">
+    Below are the permissions currently manage by this process definition
+    <br /><br />
+    <form action="pdDelPermission.py" name="form_del_permissions">
+      <tal:block repeat="permission permissions">
+        <input type="checkbox" name="permissions_to_remove:list"
+               tal:attributes="value permission" />
+        <span tal:replace="permission" /> <br />
+      </tal:block>
+      <p>
+        <input type="submit" value="Del" />
+      </p>
+    </form>
+  </tal:block>
+  <div align="left">
+    <form action="pdAddPermission.py" name="form_add_permissions">
+    <h2>Add a permission</h2>
+    <tal:block define="permissions context/getAvailablePermissions">
+      <tal:block condition="permissions"
+                 repeat="permission permissions">
+        <input type="checkbox" name="permissions_to_add:list"
+               tal:attributes="value permission" />
+        <span tal:replace="permission" /> <br />
+      </tal:block>
+      <tal:block condition="not:permissions">
+        No permissions available for this process definition
+      </tal:block>
+    </tal:block>
+    <p>
+      <input type="submit" value="Add" />
+    </p>
+    </form>
+  </div>
+</tal:block>
+</div>
+</body>
+</html>



More information about the Zope3-Checkins mailing list