Webgui: improve table summary generation

This commit is contained in:
2026-07-18 09:07:17 +02:00
parent 631f1cd2cf
commit 90bfdbc569
19 changed files with 357 additions and 61 deletions
+13
View File
@@ -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