mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-22 17:41:48 +00:00
call hook documentListItem if available
This commit is contained in:
parent
c53c81880b
commit
ee318b643a
|
@ -280,7 +280,10 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
|
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
|
||||||
foreach($documents as $document) {
|
foreach($documents as $document) {
|
||||||
|
$txt = $this->callHook('documentListItem', $document, $previewer);
|
||||||
|
if(is_string($txt))
|
||||||
|
echo $txt;
|
||||||
|
else {
|
||||||
$owner = $document->getOwner();
|
$owner = $document->getOwner();
|
||||||
$comment = $document->getComment();
|
$comment = $document->getComment();
|
||||||
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
||||||
|
@ -323,7 +326,7 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
||||||
print "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
print "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||||
}
|
}
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
// print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
// print "<td>".htmlspecialchars($owner->getFullName())."</td>";
|
||||||
print "<td nowrap>";
|
print "<td nowrap>";
|
||||||
$attentionstr = '';
|
$attentionstr = '';
|
||||||
if ( $document->isLocked() ) {
|
if ( $document->isLocked() ) {
|
||||||
|
@ -340,35 +343,36 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
||||||
if(count($links))
|
if(count($links))
|
||||||
print count($links)." ".getMLText("linked_documents")."<br />";
|
print count($links)." ".getMLText("linked_documents")."<br />";
|
||||||
print getOverallStatusText($status["status"])."</small></td>";
|
print getOverallStatusText($status["status"])."</small></td>";
|
||||||
// print "<td>".$version."</td>";
|
// print "<td>".$version."</td>";
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print "<div class=\"list-action\">";
|
print "<div class=\"list-action\">";
|
||||||
if($document->getAccessMode($user) >= M_ALL) {
|
if($document->getAccessMode($user) >= M_ALL) {
|
||||||
?>
|
?>
|
||||||
<a class_="btn btn-mini" href="../out/out.RemoveDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-remove"></i></a>
|
<a class_="btn btn-mini" href="../out/out.RemoveDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-remove"></i></a>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<span style="padding: 2px; color: #CCC;"><i class="icon-remove"></i></span>
|
<span style="padding: 2px; color: #CCC;"><i class="icon-remove"></i></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if($document->getAccessMode($user) >= M_READWRITE) {
|
if($document->getAccessMode($user) >= M_READWRITE) {
|
||||||
?>
|
?>
|
||||||
<a href="../out/out.EditDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-edit"></i></a>
|
<a href="../out/out.EditDocument.php?documentid=<?php echo $docID; ?>"><i class="icon-edit"></i></a>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<span style="padding: 2px; color: #CCC;"><i class="icon-edit"></i></span>
|
<span style="padding: 2px; color: #CCC;"><i class="icon-edit"></i></span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a class="addtoclipboard" rel="<?php echo "D".$docID; ?>" msg="<?php printMLText('splash_added_to_clipboard'); ?>" _href="../op/op.AddToClipboard.php?folderid=<?php echo $folder->getID(); ?>&type=document&id=<?php echo $docID; ?>" title="<?php printMLText("add_to_clipboard");?>"><i class="icon-copy"></i></a>
|
<a class="addtoclipboard" rel="<?php echo "D".$docID; ?>" msg="<?php printMLText('splash_added_to_clipboard'); ?>" _href="../op/op.AddToClipboard.php?folderid=<?php echo $folder->getID(); ?>&type=document&id=<?php echo $docID; ?>" title="<?php printMLText("add_to_clipboard");?>"><i class="icon-copy"></i></a>
|
||||||
<?php
|
<?php
|
||||||
print "</div>";
|
print "</div>";
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((count($subFolders) > 0)||(count($documents) > 0)) echo "</tbody>\n</table>\n";
|
if ((count($subFolders) > 0)||(count($documents) > 0)) echo "</tbody>\n</table>\n";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user