mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
add new method getListRowPath()
This commit is contained in:
parent
801e5fd6ac
commit
06962e39c2
|
@ -2743,6 +2743,26 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Return HTML containing the path of a document or folder
|
||||
*
|
||||
* This is used for showing the path of a document/folder below the title
|
||||
* in document/folder lists like on the search page.
|
||||
*
|
||||
* @param object $object
|
||||
* @return string
|
||||
*/
|
||||
function getListRowPath($object) { /* {{{ */
|
||||
$belowtitle = "<br /><span style=\"font-size: 85%;\">".getMLText('in_folder').": /";
|
||||
$folder = $object->getParent();
|
||||
$path = $folder->getPath();
|
||||
for ($i = 1; $i < count($path); $i++) {
|
||||
$belowtitle .= htmlspecialchars($path[$i]->getName())."/";
|
||||
}
|
||||
$belowtitle .= "</span>";
|
||||
return $belowtitle;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Start the row for a folder in list of documents and folders
|
||||
*
|
||||
|
@ -2976,6 +2996,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= "<td style=\"cursor: pointer;\">" . "<b title=\"Id:".$subFolder->getId()."\">".htmlspecialchars($subFolder->getName())."</b>";
|
||||
else
|
||||
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
|
||||
if(isset($extracontent['below_title']))
|
||||
$content .= $extracontent['below_title'];
|
||||
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666;\">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $subFolder->getDate())."</b></span>";
|
||||
if($comment) {
|
||||
$content .= "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
|
|
|
@ -643,13 +643,6 @@ foreach($facets as $facetname=>$values) {
|
|||
$comment = htmlspecialchars($document->getComment());
|
||||
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
|
||||
|
||||
$belowtitle = "<br /><span style=\"font-size: 85%;\">".getMLText('in_folder').": /";
|
||||
$folder = $document->getFolder();
|
||||
$path = $folder->getPath();
|
||||
for ($i = 1; $i < count($path); $i++) {
|
||||
$belowtitle .= htmlspecialchars($path[$i]->getName())."/";
|
||||
}
|
||||
$belowtitle .= "</span>";
|
||||
$lcattributes = $lc ? $lc->getAttributes() : null;
|
||||
$attrstr = '';
|
||||
if($lcattributes) {
|
||||
|
@ -694,7 +687,7 @@ foreach($facets as $facetname=>$values) {
|
|||
$attrstr .= "</table>\n";
|
||||
}
|
||||
$extracontent = array();
|
||||
$extracontent['below_title'] = $belowtitle;
|
||||
$extracontent['below_title'] = $this->getListRowPath($document);
|
||||
if($attrstr)
|
||||
$extracontent['bottom_title'] = '<br />'.$this->printPopupBox('<span class="btn btn-mini btn-secondary">'.getMLText('attributes').'</span>', $attrstr, true);
|
||||
print $this->documentListRow($document, $previewer, false, 0, $extracontent);
|
||||
|
|
|
@ -2781,6 +2781,26 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Return HTML containing the path of a document or folder
|
||||
*
|
||||
* This is used for showing the path of a document/folder below the title
|
||||
* in document/folder lists like on the search page.
|
||||
*
|
||||
* @param object $object
|
||||
* @return string
|
||||
*/
|
||||
function getListRowPath($object) { /* {{{ */
|
||||
$belowtitle = "<br /><span style=\"font-size: 85%;\">".getMLText('in_folder').": /";
|
||||
$folder = $object->getParent();
|
||||
$path = $folder->getPath();
|
||||
for ($i = 1; $i < count($path); $i++) {
|
||||
$belowtitle .= htmlspecialchars($path[$i]->getName())."/";
|
||||
}
|
||||
$belowtitle .= "</span>";
|
||||
return $belowtitle;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Start the row for a folder in list of documents and folders
|
||||
*
|
||||
|
@ -3018,6 +3038,8 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
|
|||
$content .= "<td style=\"cursor: pointer;\">" . "<b title=\"Id:".$subFolder->getId()."\">".htmlspecialchars($subFolder->getName())."</b>";
|
||||
else
|
||||
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
|
||||
if(isset($extracontent['below_title']))
|
||||
$content .= $extracontent['below_title'];
|
||||
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666;\">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $subFolder->getDate())."</b></span>";
|
||||
if($comment) {
|
||||
$content .= "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||
|
|
Loading…
Reference in New Issue
Block a user