View Issue Details

IDProjectCategoryView StatusLast Update
993RackTablesdefaultpublic2013-08-05 17:26
Reporterblaza-pl Assigned Toadoom42  
PrioritylowSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Product Version0.20.5 
Target Version0.20.6Fixed in Version0.20.6 
Summary993: Location parents show on Properties page of Rack and Row
DescriptionWhen changing Rack or Row attributes on their Properties page no parent location information is show. When multiple rows have the same name then this makes it hard to choose the proper one.
Additional InformationThis requires the patch from 905
TagsNo tags attached.

Activities

blaza-pl

blaza-pl

2013-08-05 15:07

reporter  

row_and_rack_properties-interface.php.patch (2,056 bytes)   
--- ../../racktables-prod/inc/interface.php	2013-08-01 08:35:20.365529933 +0200
+++ ./interface.php	2013-08-05 14:54:25.885632888 +0200
@@ -736,13 +736,12 @@
         printOpFormIntro ('updateRow');
         echo '<table border=0 align=center>';
         echo "<tr><td>&nbsp;</td><th class=tdright>Location:</th><td class=tdleft>";
-        $locations = array ();
-        $locations[0] = '-- NOT SET --';
-        foreach (listCells ('location') as $id => $locationInfo)
-                $locations[$id] = $locationInfo['name'];
-        natcasesort($locations);
-        printSelect ($locations, array ('name' => 'location_id'), $row['location_id']);
+	echo "<select name=location_id tabindex=100>"; 
+        renderLocationSelectTree($row['location_id']);
         echo "</td></tr>\n";
+
+
+
         echo "<tr><td>&nbsp;</td><th class=tdright>Name (required):</th><td class=tdleft><input type=text name=name value='${row['name']}'></td></tr>
 \n";
         // optional attributes
@@ -1181,12 +1180,19 @@
 	startPortlet ('Attributes');
 	printOpFormIntro ('updateRack');
 	echo '<table border=0 align=center>';
+
 	echo "<tr><td>&nbsp;</td><th class=tdright>Rack row:</th><td class=tdleft>";
 	foreach (getAllRows () as $row_id => $rowInfo)
-		$rows[$row_id] = $rowInfo['name'];
+	{
+		
+		$lparents = getLocationTrail($rowInfo['location_id'],false);
+		$rows[$row_id] = empty($lparents) ? $rowInfo['name'] : $rowInfo['name'] . " [" . $lparents . "]";
+	}
     natcasesort ($rows);
 	printSelect ($rows, array ('name' => 'row_id'), $rack['row_id']);
 	echo "</td></tr>\n";
+
+	echo "</td></tr>\n";
 	echo "<tr><td>&nbsp;</td><th class=tdright>Name (required):</th><td class=tdleft><input type=text name=name value='${rack['name']}'></td></tr>\n";
 	echo "<tr><td>&nbsp;</td><th class=tdright>Height (required):</th><td class=tdleft><input type=text name=height value='${rack['height']}'></td></tr>\n";
 	echo "<tr><td>&nbsp;</td><th class=tdright>Asset tag:</th><td class=tdleft><input type=text name=asset_no value='${rack['asset_no']}'></td></tr>\n";
adoom42

adoom42

2013-08-05 17:26

administrator   ~0001701

Merged, thanks.

Issue History

Date Modified Username Field Change
2013-08-05 15:07 blaza-pl New Issue
2013-08-05 15:07 blaza-pl File Added: row_and_rack_properties-interface.php.patch
2013-08-05 17:26 adoom42 Note Added: 0001701
2013-08-05 17:26 adoom42 Assigned To => adoom42
2013-08-05 17:26 adoom42 Status new => closed
2013-08-05 17:26 adoom42 Resolution open => fixed
2013-08-05 17:26 adoom42 Fixed in Version => 0.20.6
2013-08-05 17:26 adoom42 Target Version => 0.20.6