Webgui: improve table summary generation
This commit is contained in:
@@ -1328,6 +1328,19 @@ function get_pagination($script, $param, $page, $lastpage, $small=false) {
|
||||
return $out;
|
||||
}
|
||||
|
||||
function table_rec_summary($start, $end, $total, $cols) {
|
||||
// common summary table footer for data tables
|
||||
echo "<tfoot>\n";
|
||||
echo ' <tr><td colspan="', $cols, '">';
|
||||
if ($total > 0) {
|
||||
echo sprintf(_('Records %d to %d of %d'), $start, $end, $total);
|
||||
} else {
|
||||
echo _('No records found');
|
||||
}
|
||||
echo "</td></tr>\n";
|
||||
echo "</tfoot>\n";
|
||||
}
|
||||
|
||||
function pdf_get_pagecount($filename) {
|
||||
$pages = exec("/usr/bin/mutool show $filename Root/Pages/Count", $output, $retval);
|
||||
// TODO error checking
|
||||
|
||||
Reference in New Issue
Block a user