use a unified layout

This commit is contained in:
Uwe Steinmann 2021-08-20 09:45:58 +02:00
parent f18ab76b63
commit 3a26fc3e2a
4 changed files with 60 additions and 54 deletions

View File

@ -58,21 +58,23 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style {
$enterts = makeTsFromLongDate($enterdate);
}
}
$msg .= "The state was entered at ".$enterdate." which was ";
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
if(!empty($enterdate)) {
$msg .= "The state was entered at ".$enterdate." which was ";
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
}
}
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
} else {
$msg = getMLText('workflow_in_unknown_state');
}
$this->infoMsg($msg);
$this->contentContainerStart();
//$this->contentContainerStart();
// Display the Workflow form.
$this->rowStart();
$this->columnStart(4);
$this->infoMsg($msg);
$this->warningMsg(getMLText('rm_workflow_warning'));
?>
<p><?php printMLText("rm_workflow_warning"); ?></p>
<form method="post" action="../op/op.RemoveWorkflowFromDocument.php" name="form1">
<?php echo createHiddenFieldWithKey('removeworkflowfromdocument'); ?>
<input type='hidden' name='documentid' value='<?php echo $document->getId(); ?>'/>
@ -88,24 +90,24 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style {
</div>
<?php
$this->columnEnd();
$this->contentContainerEnd();
$this->rowEnd();
//$this->contentContainerEnd();
if($wkflog) {
$this->contentContainerStart();
echo "<table class=\"table-condensed\">";
$this->contentHeading(getMLText("workflow_log"));
echo "<table class=\"table table-condensed table-sm\">";
echo "<tr><th>".getMLText('action')."</th><th>Start state</th><th>End state</th><th>".getMLText('date')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>";
foreach($wkflog as $entry) {
echo "<tr>";
echo "<td>".getMLText('action_'.$entry->getTransition()->getAction()->getName())."</td>";
echo "<td>".$entry->getTransition()->getState()->getName()."</td>";
echo "<td>".$entry->getTransition()->getNextState()->getName()."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.$entry->getTransition()->getAction()->getName()))."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getState()->getName())."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getNextState()->getName())."</td>";
echo "<td>".$entry->getDate()."</td>";
echo "<td>".$entry->getUser()->getFullname()."</td>";
echo "<td>".$entry->getComment()."</td>";
echo "<td>".htmlspecialchars($entry->getUser()->getFullname())."</td>";
echo "<td>".htmlspecialchars($entry->getComment())."</td>";
echo "</tr>";
}
echo "</table>\n";
$this->contentContainerEnd();
}
$this->rowEnd();

View File

@ -58,20 +58,22 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Theme_Style {
$enterts = makeTsFromLongDate($enterdate);
}
}
$msg .= "The state was entered at ".$enterdate." which was ";
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
if(!empty($enterdate)) {
$msg .= "The state was entered at ".$enterdate." which was ";
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
}
}
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
} else {
$msg = getMLText('workflow_in_unknown_state');
}
$this->infoMsg($msg);
// Display the Workflow form.
$this->rowStart();
$this->columnStart(4);
$this->infoMsg($msg);
$this->warningMsg(getMLText("rewind_workflow_warning"));
?>
<?php $this->warningMsg(getMLText("rewind_workflow_warning")); ?>
<form method="post" action="../op/op.RewindWorkflow.php" name="form1">
<?php echo createHiddenFieldWithKey('rewindworkflow'); ?>
<input type='hidden' name='documentid' value='<?php echo $document->getId(); ?>'/>
@ -83,23 +85,24 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Theme_Style {
$this->columnStart(8);
?>
<div id="workflowgraph">
<iframe src="out.WorkflowGraph.php?workflow=<?php echo $workflow->getID(); ?>" width="100%" height="400" style="border: 1px solid #AAA;"></iframe>
<iframe src="out.WorkflowGraph.php?workflow=<?php echo $workflow->getID(); ?>" width="100%" height="600" style="border: 1px solid #AAA;"></iframe>
</div>
<?php
$this->columnEnd();
$this->rowEnd();
if($wkflog) {
$this->contentHeading(getMLText("workflow_log"));
echo "<table class=\"table table-condensed table-sm\">";
echo "<tr><th>".getMLText('action')."</th><th>Start state</th><th>End state</th><th>".getMLText('date')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>";
foreach($wkflog as $entry) {
echo "<tr>";
echo "<td>".getMLText('action_'.$entry->getTransition()->getAction()->getName())."</td>";
echo "<td>".$entry->getTransition()->getState()->getName()."</td>";
echo "<td>".$entry->getTransition()->getNextState()->getName()."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.$entry->getTransition()->getAction()->getName()))."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getState()->getName())."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getNextState()->getName())."</td>";
echo "<td>".$entry->getDate()."</td>";
echo "<td>".$entry->getUser()->getFullname()."</td>";
echo "<td>".$entry->getComment()."</td>";
echo "<td>".htmlspecialchars($entry->getUser()->getFullname())."</td>";
echo "<td>".htmlspecialchars($entry->getComment())."</td>";
echo "</tr>";
}
echo "</table>\n";

View File

@ -62,46 +62,46 @@ class SeedDMS_View_RunSubWorkflow extends SeedDMS_Theme_Style {
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
}
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
$this->infoMsg($msg);
$this->contentContainerStart();
//$this->contentContainerStart();
// Display the Workflow form.
$this->rowStart();
$this->columnStart(4);
$this->infoMsg($msg);
?>
<form method="POST" action="../op/op.RunSubWorkflow.php" name="form1">
<?php echo createHiddenFieldWithKey('runsubworkflow'); ?>
<table>
<tr><td></td><td>
<input type='hidden' name='documentid' value='<?php echo $document->getId(); ?>'/>
<input type='hidden' name='version' value='<?php echo $latestContent->getVersion(); ?>'/>
<input type='hidden' name='subworkflow' value='<?php echo $subworkflow->getID(); ?>'/>
<input type='submit' class="btn btn-primary" value='<?php printMLText("run_subworkflow"); ?>'/>
</td></tr></table>
<?php
echo createHiddenFieldWithKey('runsubworkflow');
$this->formSubmit(getMLText("run_subworkflow"));
?>
</form>
<?php
$this->columnEnd();
$this->columnStart(4);
$this->columnStart(8);
?>
<div id="workflowgraph">
<iframe src="out.WorkflowGraph.php?workflow=<?php echo $subworkflow->getID(); ?>" width="100%" height="400" style="border: 1px solid #AAA;"></iframe>
<iframe src="out.WorkflowGraph.php?workflow=<?php echo $subworkflow->getID(); ?>" width="100%" height="600" style="border: 1px solid #AAA;"></iframe>
</div>
<?php
$this->columnEnd();
$this->rowEnd();
$this->contentContainerEnd();
//$this->contentContainerEnd();
if($wkflog) {
$this->contentHeading(getMLText("workflow_log"));
echo "<table class=\"table table-condensed table-sm\">";
echo "<tr><th>".getMLText('action')."</th><th>Start state</th><th>End state</th><th>".getMLText('date')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>";
foreach($wkflog as $entry) {
echo "<tr>";
echo "<td>".getMLText('action_'.$entry->getTransition()->getAction()->getName())."</td>";
echo "<td>".$entry->getTransition()->getState()->getName()."</td>";
echo "<td>".$entry->getTransition()->getNextState()->getName()."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($entry->getTransition()->getAction()->getName()), array(), $entry->getTransition()->getAction()->getName()))."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getState()->getName())."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getNextState()->getName())."</td>";
echo "<td>".$entry->getDate()."</td>";
echo "<td>".$entry->getUser()->getFullname()."</td>";
echo "<td>".$entry->getComment()."</td>";
echo "<td>".htmlspecialchars($entry->getUser()->getFullname())."</td>";
echo "<td>".htmlspecialchars($entry->getComment())."</td>";
echo "</tr>";
}
echo "</table>\n";

View File

@ -90,16 +90,18 @@ $(document).ready(function() {
$enterts = makeTsFromLongDate($enterdate);
}
}
$msg .= "The state was entered at ".$enterdate." which was ";
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
if(!empty($enterdate)) {
$msg .= "The state was entered at ".$enterdate." which was ";
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
}
}
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
$this->infoMsg($msg);
$this->contentContainerStart();
//$this->contentContainerStart();
// Display the Workflow form.
$this->rowStart();
$this->columnStart(4);
$this->infoMsg($msg);
?>
<form class="form-horizontal" method="post" action="../op/op.TriggerWorkflow.php" id="form1" name="form1">
<input type='hidden' name='documentid' value='<?php echo $document->getId(); ?>'/>
@ -123,29 +125,28 @@ $(document).ready(function() {
$this->columnStart(8);
?>
<div id="workflowgraph">
<iframe src="out.WorkflowGraph.php?workflow=<?php echo $workflow->getID(); ?>&transitions[]=<?php echo $transition->getID(); ?>&documentid=<?php echo $document->getID(); ?>" width="100%" height="500" style="border: 1px solid #AAA;"></iframe>
<iframe src="out.WorkflowGraph.php?workflow=<?php echo $workflow->getID(); ?>&transitions[]=<?php echo $transition->getID(); ?>&documentid=<?php echo $document->getID(); ?>" width="100%" height="600" style="border: 1px solid #AAA;"></iframe>
</div>
<?php
$this->columnEnd();
$this->rowEnd();
$this->contentContainerEnd();
//$this->contentContainerEnd();
if($wkflog) {
$this->contentContainerStart();
echo "<table class=\"table-condensed\">";
$this->contentHeading(getMLText("workflow_log"));
echo "<table class=\"table table-condensed table-sm\">";
echo "<tr><th>".getMLText('action')."</th><th>Start state</th><th>End state</th><th>".getMLText('date')."</th><th>".getMLText('user')."</th><th>".getMLText('comment')."</th></tr>";
foreach($wkflog as $entry) {
echo "<tr>";
echo "<td>".getMLText('action_'.strtolower($entry->getTransition()->getAction()->getName()), array(), $entry->getTransition()->getAction()->getName())."</td>";
echo "<td>".$entry->getTransition()->getState()->getName()."</td>";
echo "<td>".$entry->getTransition()->getNextState()->getName()."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($entry->getTransition()->getAction()->getName()), array(), $entry->getTransition()->getAction()->getName()))."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getState()->getName())."</td>";
echo "<td>".htmlspecialchars($entry->getTransition()->getNextState()->getName())."</td>";
echo "<td>".$entry->getDate()."</td>";
echo "<td>".$entry->getUser()->getFullname()."</td>";
echo "<td>".$entry->getComment()."</td>";
echo "<td>".htmlspecialchars($entry->getUser()->getFullname())."</td>";
echo "<td>".htmlspecialchars($entry->getComment())."</td>";
echo "</tr>";
}
echo "</table>\n";
$this->contentContainerEnd();
}
$this->contentEnd();