Ongoing webgui work

This commit is contained in:
2025-04-01 14:49:03 +02:00
parent 0c09ce2916
commit c293ca1caa
20 changed files with 572 additions and 166 deletions
+5 -1
View File
@@ -167,7 +167,7 @@ $listname = $sth->fetchColumn();
echo '<h2>', sprintf(_('View List: %s'), $listname), "</h2>\n";
$sql = "SELECT ddval, ddtext, ddshort, color, sort FROM dropdown WHERE ddid=?";
$sql = "SELECT ddval, ddtext, ddshort, color, sort, flags FROM dropdown WHERE ddid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
@@ -179,11 +179,14 @@ echo '<th>', _('Name'), "</th>";
echo '<th>', _('Short'), "</th>";
echo '<th>', _('Color'), "</th>";
echo '<th>', _('Sort'), "</th>";
echo '<th>', _('Flags'), "</th>";
echo "<th></th>\n";
echo "</tr>\n";
echo "</thead>\n";
foreach ($sth->fetchAll() as $row) {
$flags = explode(',', $row['flags']);
$fixed = in_array('fixed', $flags);
echo '<tr>';
echo '<td>', $row['ddval'],'</td>';
echo '<td>', $row['ddtext'], '</td>';
@@ -194,6 +197,7 @@ foreach ($sth->fetchAll() as $row) {
echo '<td></td>';
}
echo '<td>', $row['sort'], '</td>';
echo '<td>', ($fixed ? '<i class="bi bi-lock"></i>' : ''), '</td>';
echo "</tr>\n";
}
echo "</table>\n";