diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index 70877fb47..38b68f4b2 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -109,11 +109,15 @@ $(document).ready( function() { function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $showtree = $this->params['showtree']; + $enableRecursiveCount = $this->params['enableRecursiveCount']; + $maxRecursiveCount = $this->params['maxRecursiveCount']; $fullsearch = $this->params['fullsearch']; $totaldocs = $this->params['totaldocs']; $totalfolders = $this->params['totalfolders']; $limit = $this->params['limit']; $attrdefs = $this->params['attrdefs']; + $attrdefgrps = $this->params['attrdefgrps']; $allCats = $this->params['allcategories']; $allUsers = $this->params['allusers']; $mode = $this->params['mode']; @@ -182,10 +186,13 @@ $(document).ready( function() { ?>
+
contentContainerStart(); ?> @@ -256,7 +263,33 @@ $(document).ready( function() { getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_all), SeedDMS_Core_AttributeDefinitionGroup::show_search)) { + echo ""; + foreach($attrdefs as $attrdefarr) { + $attrdef = $attrdefarr['attrdef']; + if(!in_array($attrdef->getID(), $attrdefids)) { + ?> + + + + + getID(); + } else { + ?> + + + + + getObjType() == SeedDMS_Core_AttributeDefinition::objtype_all) { @@ -279,9 +312,9 @@ $(document).ready( function() {
".htmlspecialchars($attrdefgrp->getName())."
getName()); ?>:printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '') ?>
getName()); ?>getID()]) ? $attributes[$attrdef->getID()] : ''; ?>
contentContainerEnd(); -// }}} -?> - getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_document, SeedDMS_Core_AttributeDefinition::objtype_documentcontent), SeedDMS_Core_AttributeDefinitionGroup::show_search)) { + echo "".htmlspecialchars($attrdefgrp->getName()).""; + foreach($attrdefs as $attrdefarr) { + $attrdef = $attrdefarr['attrdef']; + if(!in_array($attrdef->getID(), $attrdefids)) { + ?> + + getName()); ?>: + printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '') ?> + + getID(); + } else { + ?> + + getName()); ?> + getID()]) ? $attributes[$attrdef->getID()] : ''; ?> + + getObjType() == SeedDMS_Core_AttributeDefinition::objtype_document || $attrdef->getObjType() == SeedDMS_Core_AttributeDefinition::objtype_documentcontent) { @@ -420,6 +479,9 @@ $(document).ready( function() {
getAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_folder), SeedDMS_Core_AttributeDefinitionGroup::show_search)) { + echo ""; + foreach($attrdefs as $attrdefarr) { + $attrdef = $attrdefarr['attrdef']; + if(!in_array($attrdef->getID(), $attrdefids)) { + ?> + + + + + getID(); + } else { + ?> + + + + + getObjType() == SeedDMS_Core_AttributeDefinition::objtype_folder) { @@ -467,6 +555,10 @@ $(document).ready( function() { \n"; $this->contentContainerStart(); @@ -529,12 +621,13 @@ $(document).ready( function() { $this->contentContainerEnd(); echo "\n"; } + // }}} ?> - + \n"; echo "
\n"; -// Search Result {{{ + // Search Result {{{ $foldercount = $doccount = 0; if($entries) { /* @@ -550,14 +643,18 @@ $(document).ready( function() { $this->pageList($pageNumber, $totalpages, "../out/out.Search.php", $urlparams); // $this->contentContainerStart(); - print "
".htmlspecialchars($attrdefgrp->getName())."
getName()); ?>:printAttributeEditField($attrdef, isset($attributes[$attrdef->getID()]) ? $attributes[$attrdef->getID()] : '') ?>
getName()); ?>getID()]) ? $attributes[$attrdef->getID()] : ''; ?>
"; - print "\n\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n\n\n"; + $txt = $this->callHook('folderListHeader', null, null); + if(is_string($txt)) + echo $txt; + else { + print "
".getMLText("name")."".getMLText("attributes")."".getMLText("status")."".getMLText("action")."
"; + print "\n\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n\n\n"; + } $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout); $previewer->setConverters($previewconverters); @@ -567,6 +664,8 @@ $(document).ready( function() { if(is_string($txt)) echo $txt; else { + echo $this->documentListRow($entry, $previewer, false, 0, SeedDMS_Core_AttributeDefinitionGroup::show_searchlist); +/* $document = $entry; $owner = $document->getOwner(); $lc = $document->getLatestContent(); @@ -655,8 +754,11 @@ $(document).ready( function() { print ""; print ""; print "\n"; +*/ } } elseif(get_class($entry) == $dms->getClassname('folder')) { + echo $this->folderListRow($entry, SeedDMS_Core_AttributeDefinitionGroup::show_list); + /* $folder = $entry; $owner = $folder->getOwner(); if (in_array(2, $searchin)) { @@ -719,9 +821,14 @@ $(document).ready( function() { print ""; print ""; print "\n"; + */ } } - print "
".getMLText("name")."".getMLText("status")."".getMLText("action")."
\n"; + $txt = $this->callHook('folderListFooter', null); + if(is_string($txt)) + echo $txt; + else + print "\n"; // $this->contentContainerEnd(); $this->pageList($pageNumber, $totalpages, "../out/out.Search.php", $_GET); } else {