Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2018-04-13 19:15:20 +02:00
commit 0398229bca
2 changed files with 18 additions and 0 deletions

View File

@ -113,6 +113,7 @@
Changes in version 5.1.8
--------------------------------------------------------------------------------
- fix javascript errors when an error page was shown
- add new extraTabs in ViewDocument for adding more tabs
--------------------------------------------------------------------------------
Changes in version 5.1.7

View File

@ -549,6 +549,14 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
?>
<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($reverselinks)) ? " (".count($links)."/".count($reverselinks).")" : ""; ?></a></li>
<?php
$tabs = $this->callHook('extraTabs', $document);
if($tabs) {
foreach($tabs as $tabid=>$tab) {
echo '<li class="'.($currenttab == $tabid ? 'active' : '').'"><a data-target="#'.$tabid.'" data-toggle="tab">'.$tab['title'].'</a></li>';
}
}
?>
</ul>
<div class="tab-content">
<div class="tab-pane <?php if(!$currenttab || $currenttab == 'docinfo') echo 'active'; ?>" id="docinfo">
@ -1753,6 +1761,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
}
?>
</div>
<?php
if($tabs) {
foreach($tabs as $tabid=>$tab) {
echo '<div class="tab-pane '.($currenttab == $tabid ? 'active' : '').'" id="'.$tabid.'">';
echo $tab['content'];
echo "</div>\n";
}
}
?>
</div>
<?php
if($user->isAdmin()) {