diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php
index adecc665c..ab359bd3d 100644
--- a/views/bootstrap/class.Search.php
+++ b/views/bootstrap/class.Search.php
@@ -327,95 +327,100 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
$previewer = new SeedDMS_Preview_Previewer($cachedir, 40);
foreach ($entries as $entry) {
if(get_class($entry) == 'SeedDMS_Core_Document') {
- $document = $entry;
- $owner = $document->getOwner();
- $lc = $document->getLatestContent();
- $version = $lc->getVersion();
- $previewer->createPreview($lc);
+ $txt = $this->callHook('documentListItem', $entry, $previewer);
+ if(is_string($txt))
+ echo $txt;
+ else {
+ $document = $entry;
+ $owner = $document->getOwner();
+ $lc = $document->getLatestContent();
+ $version = $lc->getVersion();
+ $previewer->createPreview($lc);
- if (in_array(3, $searchin))
- $comment = $this->markQuery(htmlspecialchars($document->getComment()));
- else
- $comment = htmlspecialchars($document->getComment());
- if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
- print "
";
- //print " | ";
- if (in_array(2, $searchin)) {
- $docName = $this->markQuery(htmlspecialchars($document->getName()), "i");
- } else {
- $docName = htmlspecialchars($document->getName());
- }
- print "getID()."\">";
- if($previewer->hasPreview($lc)) {
- print " getID()."&version=".$lc->getVersion()."&width=40\" title=\"".htmlspecialchars($lc->getMimeType())."\">";
- } else {
- print " getMimeIcon($lc->getFileType())."\" title=\"".htmlspecialchars($lc->getMimeType())."\">";
- }
- print " | ";
- print "getID()."\">/";
- $folder = $document->getFolder();
- $path = $folder->getPath();
- for ($i = 1; $i < count($path); $i++) {
- print htmlspecialchars($path[$i]->getName())."/";
- }
- print $docName;
- print "";
- print " ".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $document->getDate()).", ".getMLText('version')." ".$version." - ".date('Y-m-d', $lc->getDate())."";
- if($comment) {
- print " ".htmlspecialchars($comment)."";
- }
- print " | ";
-
- print "";
- print "\n";
- $lcattributes = $lc->getAttributes();
- if($lcattributes) {
- foreach($lcattributes as $lcattribute) {
- $attrdef = $lcattribute->getAttributeDefinition();
- print "- ".htmlspecialchars($attrdef->getName()).": ".htmlspecialchars($lcattribute->getValue())."
\n";
+ if (in_array(3, $searchin))
+ $comment = $this->markQuery(htmlspecialchars($document->getComment()));
+ else
+ $comment = htmlspecialchars($document->getComment());
+ if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
+ print "";
+ //print " | ";
+ if (in_array(2, $searchin)) {
+ $docName = $this->markQuery(htmlspecialchars($document->getName()), "i");
+ } else {
+ $docName = htmlspecialchars($document->getName());
}
- }
- print "\n";
- print " \n";
+ $display_status=$lc->getStatus();
+ print "".getOverallStatusText($display_status["status"]). " | ";
+ print "";
+ print " | ";
+
+ print " |
\n";
+ }
} elseif(get_class($entry) == 'SeedDMS_Core_Folder') {
$folder = $entry;
$owner = $folder->getOwner();