mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +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();
|
$this->numdocs = $this->fulltextservice->Indexer()->count();
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function process($folder) { /* {{{ */
|
public function process($folder, $depth=0) { /* {{{ */
|
||||||
$lucenesearch = $this->fulltextservice->Search();
|
$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 the document wasn't indexed before then just add it */
|
||||||
if(($this->numdocs == 0) || !($hit = $lucenesearch->getFolder($folder->getId()))) {
|
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>";
|
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) {
|
if($documents) {
|
||||||
// echo "<div class=\"folder\">".htmlspecialchars($folder->getFolderPathPlain())."</div>";
|
// echo "<div class=\"folder\">".htmlspecialchars($folder->getFolderPathPlain())."</div>";
|
||||||
foreach($documents as $document) {
|
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 the document wasn't indexed before then just add it */
|
||||||
if(($this->numdocs == 0) || !($hit = $lucenesearch->getDocument($document->getId()))) {
|
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>";
|
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
|
<?php
|
||||||
$folderprocess = new SeedDMS_View_Indexer_Process_Folder($fulltextservice, $forceupdate);
|
$folderprocess = new SeedDMS_View_Indexer_Process_Folder($fulltextservice, $forceupdate);
|
||||||
$tree = new SeedDMS_FolderTree($folder, array($folderprocess, 'process'));
|
$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>";
|
echo "</div>";
|
||||||
|
|
||||||
$index->commit();
|
$index->commit();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user