mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
fix error in calling hook showDocumentContentAttribute, show if document was checked out
This commit is contained in:
parent
5c94655bd7
commit
d5e9c7532a
|
@ -210,6 +210,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$cachedir = $this->params['cachedir'];
|
$cachedir = $this->params['cachedir'];
|
||||||
$previewwidthlist = $this->params['previewWidthList'];
|
$previewwidthlist = $this->params['previewWidthList'];
|
||||||
$previewwidthdetail = $this->params['previewWidthDetail'];
|
$previewwidthdetail = $this->params['previewWidthDetail'];
|
||||||
|
$checkoutdir = $this->params['checkOutDir'];
|
||||||
$documentid = $document->getId();
|
$documentid = $document->getId();
|
||||||
|
|
||||||
$versions = $document->getContent();
|
$versions = $document->getContent();
|
||||||
|
@ -272,6 +273,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
<div class="span3">
|
<div class="span3">
|
||||||
<?php
|
<?php
|
||||||
$this->contentHeading(getMLText("document_infos"));
|
$this->contentHeading(getMLText("document_infos"));
|
||||||
|
if($document->isCheckedOut()) {
|
||||||
|
echo "<div class=\"alert alert-info\">";
|
||||||
|
$checkoutpath = sprintf($checkoutdir, preg_replace('/[^A-Za-z0-9_-]/', '', $user->getLogin()));
|
||||||
|
echo "<a href=\"file://".$checkoutpath.urldecode($latestContent->getOriginalFileName())."\">".getMLText('copied_to_checkout_as', array('filename'=>$latestContent->getOriginalFileName()))."</a>";
|
||||||
|
echo "</div>";
|
||||||
|
}
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
$txt = $this->callHook('documentInfos', $document);
|
$txt = $this->callHook('documentInfos', $document);
|
||||||
if(is_string($txt))
|
if(is_string($txt))
|
||||||
|
@ -501,7 +508,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$attributes = $latestContent->getAttributes();
|
$attributes = $latestContent->getAttributes();
|
||||||
if($attributes) {
|
if($attributes) {
|
||||||
foreach($attributes as $attribute) {
|
foreach($attributes as $attribute) {
|
||||||
$arr = $this->callHook('showDocumentContentAttribute', $latestcontent, $attribute);
|
$arr = $this->callHook('showDocumentContentAttribute', $latestContent, $attribute);
|
||||||
if(is_array($arr)) {
|
if(is_array($arr)) {
|
||||||
print "<li>".$arr[0].": ".$arr[1]."</li>\n";
|
print "<li>".$arr[0].": ".$arr[1]."</li>\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user