mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +00:00
show review/approval tab only if version has reviewer or approver
This commit is contained in:
parent
0e631bd09e
commit
57590fef86
|
@ -121,6 +121,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
if($needwkflaction) {
|
||||
$this->infoMsg(getMLText('needs_workflow_action'));
|
||||
}
|
||||
|
||||
$status = $latestContent->getStatus();
|
||||
$reviewStatus = $latestContent->getReviewStatus();
|
||||
$approvalStatus = $latestContent->getApprovalStatus();
|
||||
|
||||
?>
|
||||
<ul class="nav nav-tabs" id="docinfotab">
|
||||
<li class="active"><a data-target="#docinfo" data-toggle="tab"><?php printMLText('document_infos'); ?> / <?php printMLText('current_version'); ?></a></li>
|
||||
|
@ -129,9 +134,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
}
|
||||
if($workflowmode == 'traditional') {
|
||||
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||
?>
|
||||
<li><a data-target="#revapp" data-toggle="tab"><?php echo getMLText('reviewers')."/".getMLText('approvers'); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if($workflow) {
|
||||
?>
|
||||
|
@ -274,10 +282,6 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
exit;
|
||||
}
|
||||
|
||||
$status = $latestContent->getStatus();
|
||||
$reviewStatus = $latestContent->getReviewStatus();
|
||||
$approvalStatus = $latestContent->getApprovalStatus();
|
||||
|
||||
// verify if file exists
|
||||
$file_exists=file_exists($dms->contentDir . $latestContent->getPath());
|
||||
|
||||
|
@ -443,6 +447,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
</div>
|
||||
<?php
|
||||
if($workflowmode == 'traditional') {
|
||||
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||
?>
|
||||
<div class="tab-pane" id="revapp">
|
||||
<?php
|
||||
|
@ -583,6 +589,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if($workflow) {
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user