[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Tasks/Browser - __init__.py:1.1.2.1 configure.zcml:1.1.2.1 schedule_control.pt:1.1.2.1

Ulrich Eck ueck@net-labs.de
Wed, 11 Dec 2002 06:29:37 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Tasks/Browser
In directory cvs.zope.org:/tmp/cvs-serv21792

Added Files:
      Tag: jack-e_scheduler_branch
	__init__.py configure.zcml schedule_control.pt 
Log Message:
basic views for Task Schedule


=== Added File Zope3/lib/python/Zope/App/Tasks/Browser/__init__.py ===
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (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.
#
##############################################################################
"placeholder"


=== Added File Zope3/lib/python/Zope/App/Tasks/Browser/configure.zcml ===
<zope:zopeConfigure
   xmlns:zope='http://namespaces.zope.org/zope'
   xmlns='http://namespaces.zope.org/browser'
   xmlns:form='http://namespaces.zope.org/form'
   xmlns:browser='http://namespaces.zope.org/browser'
   package="Zope.App.Tasks"
>

<!-- Schedule -->

<defaultView
   for=".ISchedule."
   name="control.html"
   />

<view
   for=".ISchedule."
   permission="Zope.ManageServices"
   name="control.html"
   template="Browser/schedule_control.pt"
   />

<browser:menuItems menu="zmi_views" for=".ISchedule.">
  <browser:menuItem title="Control" action="control.html" />
  <browser:menuItem title="Role Permissions"
           action="AllRolePermissions.html" />
</browser:menuItems>

</zope:zopeConfigure>


=== Added File Zope3/lib/python/Zope/App/Tasks/Browser/schedule_control.pt ===
<html metal:use-macro="views/standard_macros/page">

  <head>
    <title>Schedule Control Page</title>
  </head>

  <body>

  <div metal:fill-slot="body">

    <h1><br>Schedule</h1>

    <p class="form-help">
        This page lets you control a Schedule which is used to
        schedule Tasks.  Subscription status: A "subscribed" schedule
        will consume TimeEvents and process all scheduled Tasks accordingly; 
        an "unsubscribed" schedule will just do nothing.
    </p>

    <span tal:condition="request/callSubscribe|nothing" tal:omit-tag="">
        <span tal:define="dummy context/subscribe" tal:omit-tag=""/>
    </span>
    <span tal:condition="request/callUnsubscribe|nothing" tal:omit-tag="">
        <span tal:define="dummy context/unsubscribe" tal:omit-tag=""/>
    </span>

    <form method="POST">
       <span tal:condition="context/isSubscribed" tal:omit-tag="">
           Subscription state: ON
           <input type="submit" value="Unsubscribe" name="callUnsubscribe" />
       </span>
       <span tal:condition="not:context/isSubscribed" tal:omit-tag="">
           Subscription state: OFF
           <input type="submit" value="Subscribe" name="callSubscribe" />
       </span>
    </form>

    <p>Task Times:</p>
    <table tal:define="times context/getTaskTimes">
     <tr tal:repeat="time times">
      <tal:block tal:repeat="info python:context.getTaskInfo(time)" >
       <td tal:content="info" />
      </tal:block>
     </tr>
    </table>
 
   </div>

  </body>

</html>