backoffice: add section styling to workflow inspect (#55376)
This commit is contained in:
parent
f73369b8c9
commit
6be1ce99d4
|
@ -1549,32 +1549,40 @@ class WorkflowPage(Directory):
|
|||
self.html_top('%s - %s' % (_('Workflow'), self.workflow.name))
|
||||
r = TemplateIO(html=True)
|
||||
get_response().breadcrumb.append(('inspect', _('Inspector')))
|
||||
r += htmltext('<div class="section">')
|
||||
r += htmltext('<h2>%s</h2>') % _('Workflow Functions')
|
||||
r += htmltext('<ul>')
|
||||
for label in (self.workflow.roles or {}).values():
|
||||
r += htmltext('<li>%s</li>') % label
|
||||
r += htmltext('</ul>')
|
||||
r += htmltext('</div>')
|
||||
|
||||
if self.workflow.variables_formdef:
|
||||
r += htmltext('<div class="section">')
|
||||
r += htmltext('<h2>%s</h2>') % _('Workflow Variables')
|
||||
r += self.expand_workflow_formdef(self.workflow.variables_formdef)
|
||||
r += htmltext('</div>')
|
||||
|
||||
if self.workflow.backoffice_fields_formdef:
|
||||
r += htmltext('<div class="section">')
|
||||
r += htmltext('<h2>%s</h2>') % _('Backoffice Fields')
|
||||
r += self.expand_workflow_formdef(self.workflow.backoffice_fields_formdef)
|
||||
r += htmltext('</div>')
|
||||
|
||||
if self.workflow.criticality_levels:
|
||||
r += htmltext('<div class="section">')
|
||||
r += htmltext('<h2>%s</h2>') % _('Criticality Levels')
|
||||
r += htmltext('<ul>')
|
||||
for level in self.workflow.criticality_levels or []:
|
||||
r += htmltext('<li>%s</li>') % level.name
|
||||
r += htmltext('</ul>')
|
||||
r += htmltext('</div>')
|
||||
|
||||
r += htmltext('<h2>%s</h2>') % _('Statuses')
|
||||
r += htmltext('<div class="expanded-statuses">')
|
||||
for status in self.workflow.possible_status or []:
|
||||
r += htmltext(
|
||||
'<div class="status" style="border-left-color: #%s;">'
|
||||
'<div class="section status" style="border-left-color: #%s;">'
|
||||
% (getattr(status, 'colour', None) or 'fff')
|
||||
)
|
||||
r += htmltext('<h3 id="status-%s"><a href="status/%s/">%s</a></h3>') % (
|
||||
|
@ -1602,7 +1610,7 @@ class WorkflowPage(Directory):
|
|||
r += htmltext('<h2>%s</h2>') % _('Global Actions')
|
||||
r += htmltext('<div class="expanded-statuses">')
|
||||
for action in self.workflow.global_actions:
|
||||
r += htmltext('<div class="status">')
|
||||
r += htmltext('<div class="section global-action">')
|
||||
r += htmltext('<h3><a href="global-actions/%s/">%s</a></h3>') % (action.id, action.name)
|
||||
r += htmltext('<ul>')
|
||||
for trigger in action.triggers:
|
||||
|
|
|
@ -1588,7 +1588,6 @@ div.expanded-status {
|
|||
}
|
||||
|
||||
div.expanded-statuses div.status {
|
||||
padding-left: 1ex;
|
||||
border-left: 5px solid transparent;
|
||||
border-bottom: 1px dotted #888;
|
||||
margin-bottom: 1em;
|
||||
|
|
Loading…
Reference in New Issue