diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 91c9adb71..4619d9273 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -722,11 +722,21 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } } else { if($workflow) { + /* Check if user is involved in workflow */ + $user_is_involved = false; + foreach($transitions as $transition) { + if($latestContent->triggerWorkflowTransitionIsAllowed($user, $transition)) { + $user_is_involved = true; + } + } ?>
"; - echo "
"; + if($user_is_involved || $user->isAdmin()) + echo "
"; + else + echo "
"; $this->contentContainerStart(); if($user->isAdmin()) { if(SeedDMS_Core_DMS::checkIfEqual($workflow->getInitState(), $latestContent->getWorkflowState())) { @@ -900,11 +910,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } $this->contentContainerEnd(); echo "
"; - echo "
"; + if($user_is_involved || $user->isAdmin()) { + echo "
"; ?> "; + echo "
"; + } echo "
"; ?>