mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
indent folders, place folder icon in front of folder name
This commit is contained in:
parent
1c839fd26b
commit
ec46d40194
|
@ -35,9 +35,9 @@ class SeedDMS_View_Indexer_Process_Folder { /* {{{ */
|
|||
$this->numdocs = $this->fulltextservice->Indexer()->count();
|
||||
} /* }}} */
|
||||
|
||||
public function process($folder) { /* {{{ */
|
||||
public function process($folder, $depth=0) { /* {{{ */
|
||||
$lucenesearch = $this->fulltextservice->Search();
|
||||
echo "<div class=\"folder\">".$folder->getId().":".htmlspecialchars($folder->getFolderPathPlain());
|
||||
echo "<div class=\"folder\" style=\"margin-left: ".(($depth+1)*18)."px\"><i class=\"fa fa-folder\"></i> ".$folder->getId().":".htmlspecialchars($folder->getFolderPathPlain());
|
||||
/* If the document wasn't indexed before then just add it */
|
||||
if(($this->numdocs == 0) || !($hit = $lucenesearch->getFolder($folder->getId()))) {
|
||||
echo " <span id=\"status_F".$folder->getID()."\" class=\"indexme indexstatus\" data-docid=\"F".$folder->getID()."\">".getMLText('index_waiting')."</span>";
|
||||
|
@ -65,7 +65,7 @@ class SeedDMS_View_Indexer_Process_Folder { /* {{{ */
|
|||
if($documents) {
|
||||
// echo "<div class=\"folder\">".htmlspecialchars($folder->getFolderPathPlain())."</div>";
|
||||
foreach($documents as $document) {
|
||||
echo "<div class=\"document\">".$document->getId().":".htmlspecialchars($document->getName());
|
||||
echo "<div class=\"document\" style=\"margin-left: ".(($depth+2)*18)."px\">".$document->getId().":".htmlspecialchars($document->getName());
|
||||
/* If the document wasn't indexed before then just add it */
|
||||
if(($this->numdocs == 0) || !($hit = $lucenesearch->getDocument($document->getId()))) {
|
||||
echo " <span id=\"status_D".$document->getID()."\" class=\"indexme indexstatus\" data-docid=\"D".$document->getID()."\">".getMLText('index_waiting')."</span>";
|
||||
|
@ -246,7 +246,7 @@ div.folder {font-weight: bold; line-height: 20px; margin-top: 10px;}
|
|||
<?php
|
||||
$folderprocess = new SeedDMS_View_Indexer_Process_Folder($fulltextservice, $forceupdate);
|
||||
$tree = new SeedDMS_FolderTree($folder, array($folderprocess, 'process'));
|
||||
call_user_func(array($folderprocess, 'process'), $folder);
|
||||
call_user_func(array($folderprocess, 'process'), $folder, -1);
|
||||
echo "</div>";
|
||||
|
||||
$index->commit();
|
||||
|
|
Loading…
Reference in New Issue
Block a user