Push UID into title tag
authorJoey Schulze <joey@infodrom.org>
Sat, 20 Nov 2021 23:08:10 +0000 (00:08 +0100)
committerJoey Schulze <joey@infodrom.org>
Sat, 20 Nov 2021 23:08:10 +0000 (00:08 +0100)
src/InfoCon/buch/list.wml

index 3bc7198..d80f886 100644 (file)
@@ -39,7 +39,7 @@ if ($_POST["submit"] == "List") {
     $where[] = "price < 0.0";
   }
 
-  $query = "SELECT nr,date,billing_date,category,description,price FROM $table ";
+  $query = "SELECT nr,date,billing_date,category,description,price,uid FROM $table ";
   if (count($where) > 0) {
     $query .= " WHERE " . implode ($where, " AND ");
   }
@@ -64,7 +64,8 @@ if ($_POST["submit"] == "List") {
     printf ("<td width=\"10%%\" align=\"right\">%s</td>", $date);
     printf ("<td width=\"10%%\" align=\"right\">%s</td>", $billing_date);
     printf ("<td width=\"10%%\" align=\"center\">%s</td>", $row['category']);
-    printf ("<td width=\"2%%\" align=\"center\"><img src=\"<root_prefix>pix/if_europeanunion_4618.png\" class=\"eu\" alt=\"\" item_id=\"%d\"></td>",
+    printf ("<td width=\"2%%\" align=\"center\"><img src=\"<root_prefix>pix/if_europeanunion_4618.png\" %s alt=\"\" item_id=\"%d\"></td>",
+           $row['uid'] ? "class=\"eu\" title=\"{$row['uid']}\"" : "class=\"eu\"",
            $row['nr']);
     printf ("<td width=\"58%%\"><span class=\"edit\" route=\"Sales/EditDescription\" item_id=\"%d\">%s</span></td>",
       $row['nr'], $row['description']);