[CMF-checkins] CVS: CMF/CMFStaging/skins/staging - object_status_block.pt:1.3
Shane Hathaway
shane@cvs.zope.org
Mon, 5 Aug 2002 12:17:31 -0400
Update of /cvs-repository/CMF/CMFStaging/skins/staging
In directory cvs.zope.org:/tmp/cvs-serv17073/skins/staging
Modified Files:
object_status_block.pt
Log Message:
Refined the status display to show checked out versions in other stages
(even though that should never happen) and added a utility "getObjectInStage".
=== CMF/CMFStaging/skins/staging/object_status_block.pt 1.2 => 1.3 ===
<form action="." method="POST"
- tal:define="lt here/portal_lock|nothing;
- locker python: lt and lt.locker(here);
- username python: user.getUserName();
- versions python: here.portal_staging.getVersionIds(here);
- stage python: here.portal_staging.getStageOf(here);"
+ tal:define="username python: user.getUserName();
+ versions python: here.portal_staging.getVersionIds(here, 1);
+ stage python: here.portal_staging.getStageOf(here);
+ dev_object python:
+ here.portal_staging.getObjectInStage(here, 'dev');
+ lt here/portal_lock|nothing;
+ locker python: lt and lt.locker(dev_object);"
tal:attributes="action here/absolute_url">
<!--
allow_submit python: (locker == username) or (
@@ -24,7 +26,7 @@
<td width="90%">
<span tal:content="python: versions['dev'] and (
- 'rev %s%s' % (versions['dev'], locker and '+' or '')) or '--'">rev 1</span>
+ 'rev %s' % versions['dev']) or '--'">rev 1</span>
<span tal:condition="locker">
(<span tal:replace="locker">someone</span>)
</span>
@@ -33,11 +35,11 @@
<tr>
<td></td>
- <td colspan="2">
+ <td colspan="2" tal:condition="python: stage == 'dev'">
<input type="submit" name="object_lock:method"
- value="Lock" tal:condition="python: lt and lt.canLock(here)" />
+ value="Lock" tal:condition="python: lt and lt.canLock(dev_object)" />
<input type="submit" name="object_unlock:method"
- value="Unlock" tal:condition="python: lt and lt.canUnlock(here)" />
+ value="Unlock" tal:condition="python: lt and lt.canUnlock(dev_object)" />
<!--
<input type="submit" name="content_submit_form:method"
value="Submit for review..." tal:condition="allow_submit" />