[gen] Do not generate base label for a workflow transition if transition.show is False; added an alternative predefined layout for pages (including summary, which is absent by default); [pod] added a default POD style 'podPageBreak' allowing to include page breaks via do... from... statements.
This commit is contained in:
parent
625c8b079b
commit
31a0268641
|
@ -943,10 +943,11 @@ class ZopeGenerator(Generator):
|
|||
for name in dir(wfDescr.klass):
|
||||
transition = getattr(wfDescr.klass, name)
|
||||
if not isinstance(transition, gen.Transition): continue
|
||||
poMsg = PoMessage('%s_%s' % (wfName, name), '', name)
|
||||
poMsg.produceNiceDefault()
|
||||
self.labels.append(poMsg)
|
||||
if transition.confirm:
|
||||
if transition.show:
|
||||
poMsg = PoMessage('%s_%s' % (wfName, name), '', name)
|
||||
poMsg.produceNiceDefault()
|
||||
self.labels.append(poMsg)
|
||||
if transition.show and transition.confirm:
|
||||
# We need to generate a label for the message that will be shown
|
||||
# in the confirm popup.
|
||||
label = '%s_%s_confirm' % (wfName, name)
|
||||
|
|
|
@ -214,9 +214,15 @@ class Table(LayoutElement):
|
|||
if macroToRemove in cell['content']:
|
||||
cell['content'].remove(macroToRemove)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Some base layouts to use, for fields and pages -------------------------------
|
||||
# The default layouts for pages
|
||||
defaultPageLayouts = {
|
||||
'view': Table('n!-w|-b|', align="center"),
|
||||
'edit': Table('w|-b|', width=None)}
|
||||
# A layout for pages, containing the page summary.
|
||||
summaryPageLayouts = {'view': Table('s-n!-w|-b|', align="center"),
|
||||
'edit': Table('w|-b|', width=None)}
|
||||
# The default layout for fields. Alternative layouts may exist and are declared
|
||||
# as static attributes of the concerned Type subclass.
|
||||
defaultFieldLayouts = {'edit': 'lrv-f'}
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
<@style@:style @style@:name="podSub" @style@:family="text">
|
||||
<@style@:text-properties @style@:text-position="sub 58%"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podPageBreak" @style@:family="paragraph">
|
||||
<@style@:paragraph-properties @fo@:break-before="page"/>
|
||||
</@style@:style>
|
||||
<@style@:style @style@:name="podBulletItem" @style@:family="paragraph" @style@:list-style-name="podBulletedList"/>
|
||||
<@style@:style @style@:name="podNumberItem" @style@:family="paragraph" @style@:list-style-name="podNumberedList"/>
|
||||
<@style@:style @style@:name="podBulletItemKeepWithNext" @style@:family="paragraph"
|
||||
|
|
Loading…
Reference in a new issue