split printList() in printListHeader(), printListFooter() and printList()

This commit is contained in:
Uwe Steinmann 2017-01-17 15:15:40 +01:00
parent 56e7f567c7
commit 24624f6136

View File

@ -54,9 +54,7 @@ $(document).ready( function() {
<?php
} /* }}} */
protected function printList($resArr, $previewer, $order=false) { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
protected function printListHeader($resArr, $previewer, $order=false) { /* {{{ */
$orderby = $this->params['orderby'];
$orderdir = $this->params['orderdir'];
@ -73,7 +71,17 @@ $(document).ready( function() {
print "<th>".getMLText("status")."</th>\n";
print "<th>".getMLText("action")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n";
} /* }}} */
protected function printListFooter() { /* {{{ */
echo "</tbody>\n</table>";
} /* }}} */
protected function printList($resArr, $previewer, $order=false) { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$this->printListHeader($resArr, $previewer, $order);
$noaccess = 0;
foreach ($resArr as $res) {
$document = $dms->getDocument($res["id"]);
@ -90,7 +98,7 @@ $(document).ready( function() {
}
}
}
echo "</tbody>\n</table>";
$this->printListFooter();
if($noaccess) {
$this->warningMsg(getMLText('list_contains_no_access_docs', array('count'=>$noaccess)));