show date in configured format, skip groups of user if not exsit

This commit is contained in:
Uwe Steinmann 2021-12-03 10:49:59 +01:00
parent 84442d68f0
commit 14d8a1bd91

View File

@ -968,7 +968,7 @@ $(document).ready( function() {
echo "</thead><tbody>";
foreach($wkflogs as $wkflog) {
echo "<tr>";
echo "<td>".$wkflog->getDate()."</td>";
echo "<td>".getLongReadableDate($wkflog->getDate())."</td>";
echo "<td>".htmlspecialchars(getMLText('action_'.strtolower($wkflog->getTransition()->getAction()->getName()), array(), $wkflog->getTransition()->getAction()->getName()))."</td>";
$loguser = $wkflog->getUser();
echo "<td>".htmlspecialchars($loguser->getFullName())."</td>";
@ -1320,7 +1320,7 @@ $(document).ready( function() {
if($latestContent->executeWorkflowTransitionIsAllowed($transition)) {
/* If this is reached, then the transition should have been executed
* but for some reason the next state hasn't been reached. This can
* be causes, if a transition which was previously already executed
* be caused, if a transition which was previously already executed
* is about to be executed again. E.g. there was already a transition
* T1 from state S1 to S2 triggered by user U1.
* Then there was a second transition T2 from
@ -1334,14 +1334,15 @@ $(document).ready( function() {
$wkflogs = $latestContent->getWorkflowLog($transition);
foreach($wkflogs as $wkflog) {
$loguser = $wkflog->getUser();
echo htmlspecialchars($loguser->getFullName())." (";
echo htmlspecialchars($loguser->getFullName());
$names = array();
foreach($loguser->getGroups() as $loggroup) {
$names[] = htmlspecialchars($loggroup->getName());
}
echo implode(", ", $names);
echo ") - ";
echo $wkflog->getDate();
if($names)
echo " (".implode(", ", $names).")";
echo " - ";
echo getLongReadableDate($wkflog->getDate());
echo "<br />";
}
echo "</td>";