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

This commit is contained in:
Uwe Steinmann 2020-09-18 19:16:58 +02:00
commit 9a1d92d250
2 changed files with 26 additions and 2 deletions

View File

@ -180,6 +180,7 @@
- removing a document version will not remove attachments of the document anymore
- make document details page like like view document page
- fix selection of documents/folders
- new hooks SeedDMS_View_Document::[startRightColumn|extraVersionsViews]
--------------------------------------------------------------------------------
Changes in version 5.1.19

View File

@ -553,6 +553,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
?>
</div>
<div class="span8">
<?php
$txt = $this->callHook('startRightColumn', $document);
if(is_string($txt))
echo $txt;
?>
<ul class="nav nav-tabs" id="docinfotab">
<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) { ?>
@ -688,6 +693,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if ($viewonlinefiletypes && (in_array(strtolower($latestContent->getFileType()), $viewonlinefiletypes) || in_array(strtolower($latestContent->getMimeType()), $viewonlinefiletypes)))
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$latestContent->getDocument()->getId()."&version=". $latestContent->getVersion()."\"><i class=\"fa fa-star\"></i>" . getMLText("view_online") . "</a></li>";
}
$items = $this->callHook('extraVersionViews', $latestContent);
if($items) {
foreach($items as $item) {
if(is_string($item))
echo "<li>".$item."</li>";
elseif(is_array($item))
echo "<li><a href=\"".$item['link']."\">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i>" : "").getMLText($item['label'])."</a></li>";
}
}
print "</ul>";
}
@ -1547,8 +1561,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
// print "<td>".htmlspecialchars($version->getComment())."</td>";
print "<td>".getOverallStatusText($vstat["status"])."</td>";
print "<td>";
print "<ul class=\"actions unstyled\">";
if ($file_exists){
print "<ul class=\"actions unstyled\">";
if($accessobject->check_controller_access('Download', array('action'=>'version'))) {
print "<li><a href=\"../op/op.Download.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."\"><i class=\"fa fa-download\"></i>".getMLText("download")."</a>";
}
@ -1556,9 +1570,18 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if($accessobject->check_controller_access('ViewOnline', array('action'=>'run'))) {
print "<li><a target=\"_blank\" href=\"../op/op.ViewOnline.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."\"><i class=\"fa fa-star\"></i>" . getMLText("view_online") . "</a>";
}
print "</ul>";
print "<ul class=\"actions unstyled\">";
$items = $this->callHook('extraVersionViews', $version);
if($items) {
foreach($items as $item) {
if(is_string($item))
echo "<li>".$item."</li>";
elseif(is_array($item))
echo "<li><a href=\"".$item['link']."\">".(!empty($item['icon']) ? "<i class=\"fa fa-".$item['icon']."\"></i>" : "").getMLText($item['label'])."</a></li>";
}
}
print "</ul>";
}
print "<ul class=\"actions unstyled\">";
/* Only admin has the right to remove version in any case or a regular
* user if enableVersionDeletion is on
*/