Work on webgui and add flags to equipment

This commit is contained in:
2025-07-01 10:48:39 +02:00
parent 1f2af40943
commit d5d754d596
6 changed files with 58 additions and 17 deletions
+6 -2
View File
@@ -85,7 +85,7 @@ if ($action == ACT_DEFAULT):
page_caption_search($pagetitle);
$sql = "SELECT projid, projname, startdate, duration, remarks "
$sql = "SELECT projid, projname, startdate, duration, projstate, remarks "
. "FROM project "
. "WHERE vid=? "
. "ORDER BY projid";
@@ -98,6 +98,7 @@ echo "<tr>";
echo "<th>" . _('Name') . "</th>";
echo "<th>" . _('Start date') . "</th>";
echo "<th>" . _('Duration') . "</th>";
echo "<th>" . _('State') . "</th>";
echo "<th>" . _('Remarks') . "</th>";
echo "<th>&nbsp;</th>";
echo "</tr>\n";
@@ -107,6 +108,7 @@ foreach ($res as $row) {
echo "<td>". $row['projname'] ."</td>\n";
echo "<td>". $row['startdate'] ."</td>\n";
echo "<td>". $row['duration'] ."</td>\n";
echo "<td>". $row['projstate'] ."</td>\n";
echo "<td>". $row['remarks'] ."</td>\n";
// Action buttons
form_action_buttons($g_scriptname, $row['projid']);
@@ -121,7 +123,7 @@ form_add_button($g_scriptname);
echo "<h1>", _('Generic Tasks'), "</h1>\n";
echo "<p>", _('Tasks not assigned to any project'), "</p>\n";
$sql = "SELECT taskid, taskname "
$sql = "SELECT taskid, taskname, taskstate "
. "FROM task "
. "WHERE vid=? AND projid IS NULL "
. "ORDER BY taskid";
@@ -132,11 +134,13 @@ echo '<table class="table table-striped">', "\n";
echo "<thead>\n";
echo "<tr>";
echo "<th>" . _('Name') . "</th>";
echo "<th>" . _('State') . "</th>";
echo "</tr>\n";
echo "</thead>\n";
foreach ($res as $row) {
echo "<tr>\n";
echo "<td>". $row['taskname'] ."</td>\n";
echo "<td>". $row['taskstate'] ."</td>\n";
form_action_buttons('task.php', $row['taskid']);
echo "</tr>\n";
}