From 7fcd2f44d36bbb4bb6884097b1cbb21e92a8d4ec Mon Sep 17 00:00:00 2001 From: Gaetan Delannay Date: Thu, 27 Jun 2013 17:40:01 +0200 Subject: [PATCH] [gen] More ZPT->PX work. --- gen/wrappers/__init__.py | 268 ++++++++++++++++++++++++++++++++++++++- pod/buffers.py | 2 +- 2 files changed, 268 insertions(+), 2 deletions(-) diff --git a/gen/wrappers/__init__.py b/gen/wrappers/__init__.py index 274992b..d280556 100644 --- a/gen/wrappers/__init__.py +++ b/gen/wrappers/__init__.py @@ -556,7 +556,273 @@ class AbstractWrapper(object): ''', prologue=Px.xhtmlPrologue) - # PX for viewing an object ------------------------------------------------- + # -------------------------------------------------------------------------- + # PXs for rendering graphical elements tied to a given object + # -------------------------------------------------------------------------- + + # This PX displays an object's history. + pxObjectHistory = Px(''' + + + + + :self.pxAppyNavigate + + + + + + + + + + + + + + + + + +
:_('object_action'):_('object_author'):_('action_date'):_('action_comment')
+ :_('data_change') + + :_(contextObj.getWorkflowLabel(action)) + ? + :ztool.getUserName(actorId) + :ztool.formatDate(event['time'], withHour=True)"> + ::contextObj.formatText(rhComments) + - + + + + + + + + + + + + + +
:_('modified_field'):_('previous_value')
::_(appyType['labelId'])::change[1][0]
+
+
+
+ ''') + + # Displays an object's transitions(s). + pxTransitions = Px(''' + +
+ + + + + + + + + +
+ + + + + +
+
+
''') + + # Displays header information about an object: title, workflow-related info, + # history... + pxObjectHeader = Px(''' +
+ + + + + + + + + + +
+ + + + :_('object_history') || + + + + :_('object_created_by') + :ztool.getUserName(creator) + + + :_('object_created_on') + + :ztool.formatDate(creationDate, withHour=True)> + — + :_('object_modified_on') + :ztool.formatDate(modificationDate, withHour=True) + + + + + — + :_('workflow_state') : :_(contextObj.getWorkflowLabel()) + +
+ +
+ +
+
+
+
+ ''') + + # Shows the range of buttons (next, previous, save,...) and the workflow + # transitions. + pxObjectButtons = Px(''' + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + :self.pxTransitions + + +
''') + pxLayoutedObject = Px('''

Layouted object

''') pxView = Px('''