mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
new hooks on view document page
This commit is contained in:
parent
8d0b501978
commit
0649815e56
|
@ -8,6 +8,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
|
||||
|
|
|
@ -515,6 +515,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) { ?>
|
||||
|
@ -642,6 +647,15 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
print "<li><a href=\"../op/op.Download.php?documentid=".$latestContent->getDocument()->getId()."&version=".$latestContent->getVersion()."\"><i class=\"fa fa-download\"></i>".getMLText("download")."</a></li>";
|
||||
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>";
|
||||
}
|
||||
|
||||
|
@ -1244,14 +1258,23 @@ 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\">";
|
||||
print "<li><a href=\"../op/op.Download.php?documentid=".$version->getDocument()->getId()."&version=".$version->getVersion()."\"><i class=\"fa fa-download\"></i>".getMLText("download")."</a>";
|
||||
if ($viewonlinefiletypes && (in_array(strtolower($version->getFileType()), $viewonlinefiletypes) || in_array(strtolower($version->getMimeType()), $viewonlinefiletypes)))
|
||||
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>";
|
||||
$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\">";
|
||||
}
|
||||
print "<ul class=\"actions unstyled\">";
|
||||
/* Only admin has the right to remove version in any case or a regular
|
||||
* user if enableVersionDeletion is on
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user