[Zope-CVS] CVS: Products/Scheduler/www - manage_current_tasks.zpt:1.3
Tres Seaver
tseaver@zope.com
Tue, 13 Aug 2002 14:11:32 -0400
Update of /cvs-repository/Products/Scheduler/www
In directory cvs.zope.org:/tmp/cvs-serv22795/www
Modified Files:
manage_current_tasks.zpt
Log Message:
- Scheduler:
o Add convenience UI method, 'getPendingTaskInfo', to dodge permissions
issues on schedule entries.
- manage_current_tasks:
o Rip out duplicated colorizing code, which should be done using
'tal:attributes'.
=== Products/Scheduler/www/manage_current_tasks.zpt 1.2 => 1.3 ===
--- Products/Scheduler/www/manage_current_tasks.zpt:1.2 Thu Aug 8 17:23:38 2002
+++ Products/Scheduler/www/manage_current_tasks.zpt Tue Aug 13 14:11:32 2002
@@ -5,7 +5,7 @@
<!-- cheesy sys.maxint inlined below -->
<h4 tal:content="python: here.format_time(here.now())"
class="form-label">10:00 am</h4>
-<h4 tal:define="global tasks python: here.getPendingTasks(2147483647)"
+<h4 tal:define="global tasks python: here.getPendingTaskInfo(2147483647)"
tal:condition="not:tasks">There are no current tasks.</h4>
<form action="" method="post" tal:attributes="action request/URL1" >
@@ -22,25 +22,24 @@
<tbody tal:repeat="task_tup tasks">
-<tr bgcolor="#EEEEEE" align="left" tal:condition="repeat/task_tup/even"
- class="form-help">
+<span tal:condition="nothing">
+Whoever puts the coloring back in had better not do it by cloning
+the row!
+</span>
+<tr align="left" class="form-help"
+ tal:condition="repeat/task_tup/even"
+ tal:define="current_time python:task_tup[0];
+ current_task python:task_tup[1];
+ scheduled_when current_task/when
+ "
+>
<td><input type="checkbox" name="when:int:list"
- tal:attributes="value python: task_tup[0]"></td>
- <td tal:content="python: here.format_time(task_tup[1].when)">11:00 am</td>
- <td tal:content="python: here.format_time(task_tup[0])">11:00 am</td>
- <td tal:content="python: task_tup[1].description">An even task</td>
- <td tal:content="python: task_tup[1].info()">
- incidental run info
- </td>
-</tr>
-
-<tr align="left" tal:condition="repeat/task_tup/odd" class="form-help">
- <td><input type="checkbox" name="when:int:list"
- tal:attributes="value python: task_tup[0]"></td>
- <td tal:content="python: here.format_time(task_tup[1].when)">11:00 am</td>
- <td tal:content="python: here.format_time(task_tup[0])">11:00 am</td>
- <td tal:content="python: task_tup[1].description">An odd task</td>
- <td tal:content="python: task_tup[1].info()">
+ tal:attributes="value current_time"></td>
+ <td tal:content="python: here.format_time(scheduled_when)">
+ 11:00 am</td>
+ <td tal:content="python: here.format_time(current_time)">11:00 am</td>
+ <td tal:content="current_task/description">An even task</td>
+ <td tal:content="current_task/info">
incidental run info
</td>
</tr>