diff --git a/styles/bootstrap/application.js b/styles/bootstrap/application.js index 2a2447af3..f64899780 100644 --- a/styles/bootstrap/application.js +++ b/styles/bootstrap/application.js @@ -985,6 +985,9 @@ $(document).ready(function() { /* {{{ */ $("body").on("click", "span.openpopupbox i", function(e) { $(e.target).parent().click(); }); + $("body").on("click", "span.openpopupbox span", function(e) { + $(e.target).parent().click(); + }); $("body").on("click", "span.closepopupbox", function(e) { $(this).parent().hide(); }); diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 913e4da04..7a042f336 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2346,7 +2346,7 @@ $(document).ready( function() { * @param object $previewer * @param boolean $skipcont set to true if embrasing tr shall be skipped */ - function documentListRow($document, $previewer, $skipcont=false, $version=0) { /* {{{ */ + function documentListRow($document, $previewer, $skipcont=false, $version=0, $extracontent=array()) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; $showtree = $this->params['showtree']; @@ -2416,10 +2416,14 @@ $(document).ready( function() { $content .= ""; $content .= "" . htmlspecialchars($document->getName()) . ""; + if(isset($extracontent['below_title'])) + $content .= $extracontent['below_title']; $content .= "
".getMLText('owner').": ".htmlspecialchars($owner->getFullName()).", ".getMLText('creation_date').": ".date('Y-m-d', $document->getDate()).", ".getMLText('version')." ".$version." - ".date('Y-m-d', $latestContent->getDate())."".($document->expires() ? ", ".getMLText('expires').": ".getReadableDate($document->getExpires())."" : "").""; if($comment) { $content .= "
".htmlspecialchars($comment).""; } + if(!empty($extracontent['bottom_title'])) + $content .= $extracontent['bottom_title']; $content .= "\n"; $content .= ""; @@ -2494,7 +2498,7 @@ $(document).ready( function() { return $content; } /* }}} */ - function folderListRow($subFolder) { /* {{{ */ + function folderListRow($subFolder, $extracontent=array()) { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; // $folder = $this->params['folder']; @@ -2515,6 +2519,8 @@ $(document).ready( function() { if($comment) { $content .= "
".htmlspecialchars($comment).""; } + if(isset($extracontent['bottom_title'])) + $content .= $extracontent['bottom_title']; $content .= "\n"; // $content .= "".htmlspecialchars($owner->getFullName()).""; $content .= ""; diff --git a/views/bootstrap/class.Search.php b/views/bootstrap/class.Search.php index adca958b9..cf5b0c337 100644 --- a/views/bootstrap/class.Search.php +++ b/views/bootstrap/class.Search.php @@ -565,7 +565,7 @@ $(document).ready( function() { print "\n\n"; print "\n"; print "".getMLText("name")."\n"; - print "".getMLText("attributes")."\n"; + //print "".getMLText("attributes")."\n"; print "".getMLText("status")."\n"; print "".getMLText("action")."\n"; print "\n\n\n"; @@ -590,6 +590,42 @@ $(document).ready( function() { else $comment = htmlspecialchars($document->getComment()); if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "..."; + + $belowtitle = "
".getMLText('in_folder').": /"; + $folder = $document->getFolder(); + $path = $folder->getPath(); + for ($i = 1; $i < count($path); $i++) { + $belowtitle .= htmlspecialchars($path[$i]->getName())."/"; + } + $belowtitle .= ""; + $lcattributes = $lc->getAttributes(); + $attrstr = ''; + if($lcattributes) { + $attrstr .= "\n"; + $attrstr .= ""; + foreach($lcattributes as $lcattribute) { + $attrdef = $lcattribute->getAttributeDefinition(); + $attrstr .= "\n"; + } + $attrstr .= "
".getMLText('name')."".getMLText('attribute_value')."
".htmlspecialchars($attrdef->getName())."".htmlspecialchars(implode(', ', $lcattribute->getValueAsArray()))."
\n"; + } + $docttributes = $document->getAttributes(); + if($docttributes) { + $attrstr .= "\n"; + $attrstr .= ""; + foreach($docttributes as $docttribute) { + $attrdef = $docttribute->getAttributeDefinition(); + $attrstr .= "\n"; + } + $attrstr .= "
".getMLText('name')."".getMLText('attribute_value')."
".htmlspecialchars($attrdef->getName())."".htmlspecialchars(implode(', ', $docttribute->getValueAsArray()))."
\n"; + } + $extracontent = array(); + $extracontent['below_title'] = $belowtitle; + if($attrstr) + $extracontent['bottom_title'] = '
'.$this->printPopupBox(''.getMLText('attributes').'', $attrstr, true); + print $this->documentListRow($document, $previewer, false, 0, $extracontent); + + if(0) { print "getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">"; if (in_array(2, $searchin)) { $docName = $this->markQuery(htmlspecialchars($document->getName()), "i"); @@ -668,6 +704,7 @@ $(document).ready( function() { print ""; print ""; print "\n"; + } } } elseif(get_class($entry) == $dms->getClassname('folder')) { $folder = $entry; @@ -677,6 +714,23 @@ $(document).ready( function() { } else { $folderName = htmlspecialchars($folder->getName()); } + + $attrstr = ''; + $folderattributes = $folder->getAttributes(); + if($folderattributes) { + $attrstr .= "\n"; + $attrstr .= ""; + foreach($folderattributes as $folderattribute) { + $attrdef = $folderattribute->getAttributeDefinition(); + $attrstr .= "\n"; + } + $attrstr .= "
".getMLText('name')."".getMLText('attribute_value')."
".htmlspecialchars($attrdef->getName())."".htmlspecialchars(implode(', ', $folderattribute->getValueAsArray()))."
"; + } + $extracontent = array(); + if($attrstr) + $extracontent['bottom_title'] = '
'.$this->printPopupBox(''.getMLText('attributes').'', $attrstr, true); + print $this->folderListRow($folder, $extracontent); + if(0) { print "getID()."\" draggable=\"true\" rel=\"folder_".$folder->getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">"; print "getID()."\">imgpath."folder.png\" width=\"24\" height=\"24\" border=0>"; print "getID()."\">"; @@ -733,6 +787,7 @@ $(document).ready( function() { print ""; print ""; print "\n"; + } } } print "\n";