r1340 + fix rack sorting to group racks by row in the rack multiselect
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 29 Nov 2007 22:54:10 +0000 (22:54 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 29 Nov 2007 22:54:10 +0000 (22:54 +0000)
inc/database.php
inc/interface.php

index 0b242d8037dea92dbb2a7e81e51c622590d04392..df2c576d949f65ccfc7a1abb1580f20f40c4b163 100644 (file)
@@ -82,7 +82,7 @@ function getRacksForRow ($row_id = 0)
 {
        global $dbxlink;
        $query =
-               "select Rack.id, Rack.name, height, Rack.comment, row_id, dict_value as row_name " .
+               "select Rack.id, concat(dict_value, ': ', Rack.name) as name, height, Rack.comment, row_id, dict_value as row_name " .
                "from Rack left join Dictionary on row_id = dict_key natural join Chapter " .
                "where chapter_name = 'RackRow' and Rack.deleted = 'no' " .
                (($row_id == 0) ? "" : "and row_id = ${row_id} ") .
index 00d7fc8addfa6c5987d3b2189775bebc10cc9456..043b923e6b71d0ab4dba0ef86f6af7a7c9b76d77 100644 (file)
@@ -870,7 +870,7 @@ function renderRackMultiSelect ($sname, $racks, $selected)
                echo "<option value=${rack['id']}";
                if (!(array_search ($rack['id'], $selected) === FALSE))
                        echo ' selected';
-               echo">${rack['row_name']}:${rack['name']}</option>\n";
+               echo">${rack['name']}</option>\n";
        }
        echo "</select>\n";
 }