Webgui: More mobile friendly touch and much more improvements
This commit is contained in:
+16
-8
@@ -126,10 +126,12 @@ try {
|
||||
$g_error->Add($e->getMessage());
|
||||
$g_error->Add($sql);
|
||||
$g_error->Add(print_r($p, true));
|
||||
$g_error->PrintOut();
|
||||
}
|
||||
$numrows = $sth->fetchColumn();
|
||||
$lastpage = ceil($numrows/$g_rows_pp);
|
||||
$page = gpc_get_int($_REQUEST, 'p', 1);
|
||||
$rows_pp = gpc_get_int($_REQUEST, 'n', $g_rows_pp);
|
||||
$lastpage = ceil($numrows/$rows_pp);
|
||||
|
||||
$sql = "SELECT compid, compname, comptype, remarks "
|
||||
. "FROM company";
|
||||
@@ -156,7 +158,7 @@ $opt_special = array(
|
||||
?>
|
||||
<form method="post" action="<?=$g_scriptname?>">
|
||||
<div id="filter" class="card">
|
||||
<div class="card-header">Filter</div>
|
||||
<div class="card-header"><i class="bi bi-funnel me-2"></i>Filter</div>
|
||||
<div class="card-body">
|
||||
<label for="flt_type">Type</label>
|
||||
<select id="flt_type" name="flt_type">
|
||||
@@ -187,27 +189,33 @@ echo $pagination;
|
||||
echo '<table class="table table-striped">', "\n";
|
||||
echo "<thead>\n";
|
||||
echo "<tr>";
|
||||
echo '<th>#</th>';
|
||||
echo "<th>" . _('Name') . "</th>";
|
||||
echo "<th>" . _('Type') . "</th>";
|
||||
echo "<th>" . _('Remarks') . "</th>";
|
||||
echo "<th> </th>";
|
||||
echo "</tr>\n";
|
||||
echo "</thead>\n";
|
||||
$i = ($page - 1) * $rows_pp;
|
||||
$i0 = $i + 1;
|
||||
foreach ($res as $row) {
|
||||
$i++; // record number
|
||||
echo "<tr>\n";
|
||||
echo "<td>". $row['compname'] ."</td>\n";
|
||||
echo "<td>". $opt_comptype[$row['comptype']] ."</td>\n";
|
||||
echo "<td>". $row['remarks'] ."</td>\n";
|
||||
// Action buttons
|
||||
echo '<td>', $i;
|
||||
echo '<a title="', _('View'), '" href="', $g_scriptname, '?f=view&id=', $row['compid'], '"><i class="bi bi-eye ms-2"></i></a>', "\n";
|
||||
echo "</td>\n";
|
||||
echo "<td>", $row['compname'], "</td>\n";
|
||||
echo "<td>", $opt_comptype[$row['comptype']], "</td>\n";
|
||||
echo "<td>", $row['remarks'], "</td>\n";
|
||||
// Edit current record button
|
||||
echo "<td>";
|
||||
echo '<a title="', _('View'), '" href="', $g_scriptname, '?f=view&id=', $row['compid'], '"><i class="bi-eye"></i></a>', "\n";
|
||||
echo '<a title="', _('Edit'), '" href="', $g_scriptname, '?f=edit&id=', $row['compid'], '"><i class="bi-pencil"></i></a>';
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
// Table summary
|
||||
echo "<tfoot>\n";
|
||||
echo '<tr><td colspan="6">', sprintf(_('%d records out of total %d'), count($res), $grandtotal), '</td></tr>', "\n";
|
||||
echo '<tr><td colspan="6">', sprintf(_('Records %d to %d of %d'), $i0, $i, $numrows), '</td></tr>', "\n";
|
||||
echo "</tfoot>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user