fradrive/templates/workflows/instances.hamlet
2020-10-19 21:46:10 +02:00

20 lines
968 B
Plaintext

$newline never
<ul .workflow-instances>
$forall (Entity _ WorkflowInstance{workflowInstanceName}, mDesc) <- instances
<li>
$maybe WorkflowInstanceDescription{workflowInstanceDescriptionTitle} <- mDesc
<p .workflow-instance--title>
#{workflowInstanceDescriptionTitle}
$nothing
<p .workflow-instance--name>
#{workflowInstanceName}
<div .workflow-instance--actions .buttongroup>
^{linkButton mempty (i18n MsgMenuWorkflowInstanceWorkflows) [BCIsButton, BCPrimary] $ SomeRoute $ toListRoute workflowInstanceName}
^{linkButton mempty (i18n MsgMenuWorkflowInstanceInitiate) [BCIsButton] $ SomeRoute $ toInitiateRoute workflowInstanceName}
^{linkButton mempty (i18n MsgMenuWorkflowInstanceEdit) [BCIsButton] $ SomeRoute $ toEditRoute workflowInstanceName}
$maybe desc <- workflowInstanceDescriptionDescription =<< mDesc
<div .workflow-instance--description>
#{desc}