mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 16:35:38 +00:00
check for currenttab
This commit is contained in:
parent
083e2a55a9
commit
e0fdb21986
|
@ -77,6 +77,7 @@ if($view) {
|
|||
$view->setParam('workflowmode', $settings->_workflowMode);
|
||||
$view->setParam('previewWidthList', $settings->_previewWidthList);
|
||||
$view->setParam('previewWidthDetail', $settings->_previewWidthDetail);
|
||||
$view->setParam('currenttab', isset($_GET['currenttab']) ? $_GET['currenttab'] : "");
|
||||
$view->show();
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$previewwidthlist = $this->params['previewWidthList'];
|
||||
$previewwidthdetail = $this->params['previewWidthDetail'];
|
||||
$documentid = $document->getId();
|
||||
$currenttab = $this->params['currenttab'];
|
||||
|
||||
$versions = $document->getContent();
|
||||
|
||||
|
@ -307,31 +308,31 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
</div>
|
||||
<div class="span9">
|
||||
<ul class="nav nav-tabs" id="docinfotab">
|
||||
<li class="active"><a data-target="#docinfo" data-toggle="tab"><?php printMLText('current_version'); ?></a></li>
|
||||
<li class="<?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>"><a data-target="#docinfo" data-toggle="tab"><?php printMLText('current_version'); ?></a></li>
|
||||
<?php if (count($versions)>1) { ?>
|
||||
<li><a data-target="#previous" data-toggle="tab"><?php printMLText('previous_versions'); ?></a></li>
|
||||
<li class="<?php if($currenttab == 'previous') echo 'active'; ?>"><a data-target="#previous" data-toggle="tab"><?php printMLText('previous_versions'); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
|
||||
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||
?>
|
||||
<li><a data-target="#revapp" data-toggle="tab"><?php if($workflowmode == 'traditional') echo getMLText('reviewers')."/"; echo getMLText('approvers'); ?></a></li>
|
||||
<li class="<?php if($currenttab == 'revapp') echo 'active'; ?>"><a data-target="#revapp" data-toggle="tab"><?php if($workflowmode == 'traditional') echo getMLText('reviewers')."/"; echo getMLText('approvers'); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
if($workflow) {
|
||||
?>
|
||||
<li><a data-target="#workflow" data-toggle="tab"><?php echo getMLText('workflow'); ?></a></li>
|
||||
<li class="<?php if($currenttab == 'workflow') echo 'active'; ?>"><a data-target="#workflow" data-toggle="tab"><?php echo getMLText('workflow'); ?></a></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li><a data-target="#attachments" data-toggle="tab"><?php printMLText('linked_files'); echo (count($files)) ? " (".count($files).")" : ""; ?></a></li>
|
||||
<li><a data-target="#links" data-toggle="tab"><?php printMLText('linked_documents'); echo (count($links)) ? " (".count($links).")" : ""; ?></a></li>
|
||||
<li class="<?php if($currenttab == 'attachments') echo 'active'; ?>"><a data-target="#attachments" data-toggle="tab"><?php printMLText('linked_files'); echo (count($files)) ? " (".count($files).")" : ""; ?></a></li>
|
||||
<li class="<?php if($currenttab == 'links') echo 'active'; ?>"><a data-target="#links" data-toggle="tab"><?php printMLText('linked_documents'); echo (count($links)) ? " (".count($links).")" : ""; ?></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="docinfo">
|
||||
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" id="docinfo">
|
||||
<?php
|
||||
if(!$latestContent) {
|
||||
$this->contentContainerStart();
|
||||
|
@ -516,7 +517,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
if((is_array($reviewStatus) && count($reviewStatus)>0) ||
|
||||
(is_array($approvalStatus) && count($approvalStatus)>0)) {
|
||||
?>
|
||||
<div class="tab-pane" id="revapp">
|
||||
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp">
|
||||
<?php
|
||||
$this->contentContainerstart();
|
||||
print "<table class=\"table-condensed\">\n";
|
||||
|
@ -780,7 +781,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
} else {
|
||||
if($workflow) {
|
||||
?>
|
||||
<div class="tab-pane" id="workflow">
|
||||
<div class="tab-pane <?php if($currenttab == 'workflow') echo 'active'; ?>" id="workflow">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
if($user->isAdmin()) {
|
||||
|
@ -961,7 +962,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
}
|
||||
if (count($versions)>1) {
|
||||
?>
|
||||
<div class="tab-pane" id="previous">
|
||||
<div class="tab-pane <?php if($currenttab == 'previous') echo 'active'; ?>" id="previous">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
|
||||
|
@ -1059,7 +1060,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="tab-pane" id="attachments">
|
||||
<div class="tab-pane <?php if($currenttab == 'attachments') echo 'active'; ?>" id="attachments">
|
||||
<?php
|
||||
|
||||
$this->contentContainerStart();
|
||||
|
@ -1135,7 +1136,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
$this->contentContainerEnd();
|
||||
?>
|
||||
</div>
|
||||
<div class="tab-pane" id="links">
|
||||
<div class="tab-pane <?php if($currenttab == 'links') echo 'active'; ?>" id="links">
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
if (count($links) > 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user