View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 845 | RackTables | default | public | 2013-05-07 15:09 | 2013-05-11 21:19 |
| Reporter | blaza-pl | Assigned To | adoom42 | ||
| Priority | low | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.20.4 | ||||
| Target Version | 0.20.5 | Fixed in Version | 0.20.5 | ||
| Summary | 845: Display parent location on Rackspace -> Browse | ||||
| Description | It would be useful to display parent locations on Rackspace -> Browse. As Locations create a tree this makes use of parent child relations. I have created a patch for that. | ||||
| Steps To Reproduce | Create a Location "Country" Create a Location "City" with parent location "Country" Create a Location "Street" with parent "City Create a Row "Row1" in Location Street so that Row1 is displayed on Rackspace -> Browse tab Now with this patch the Column Location would be: Country » City » Street | ||||
| Tags | No tags attached. | ||||
| Attached Files | location-browse-tree.patch (1,106 bytes)
--- ../../racktables-test/inc/interface.php 2013-04-16 11:30:24.753325827 +0200
+++ interface.php 2013-04-16 13:14:11.985286286 +0200
@@ -372,8 +372,16 @@
continue;
$rackListIdx = 0;
echo "<tr class=row_${order}><th class=tdleft>";
- if ($location_id)
- echo "<a href='".makeHref(array('page'=>'location', 'location_id'=>$location_id))."${cellfilter['urlextra']}'>${row['location_name']}</a>";
+ $locationTree = "";
+ while ($location_id)
+ {
+ $parentLocation = spotEntity('location',$location_id);
+ $locationTree = "» <a href='".makeHref(array('page'=>'location', 'location_id'=>$parentLocation['id']))."${cellfilter['urlextra']}'>${parentLocation['name']}</a> " . $locationTree;
+ $location_id = $parentLocation['parent_id'];
+ }
+ $locationTree = substr($locationTree,8);
+ echo $locationTree;
+
echo "</th><th class=tdleft><a href='".makeHref(array('page'=>'row', 'row_id'=>$row_id))."${cellfilter['urlextra']}'>${row_name}</a></th>";
echo "<th class=tdleft><table border=0 cellspacing=5><tr>";
if (!count ($rackList))
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-05-07 15:09 | blaza-pl | New Issue | |
| 2013-05-07 15:09 | blaza-pl | File Added: location-browse-tree.patch | |
| 2013-05-11 21:19 | adoom42 | Note Added: 0001395 | |
| 2013-05-11 21:19 | adoom42 | Assigned To | => adoom42 |
| 2013-05-11 21:19 | adoom42 | Status | new => closed |
| 2013-05-11 21:19 | adoom42 | Resolution | open => fixed |
| 2013-05-11 21:19 | adoom42 | Fixed in Version | => 0.20.5 |
| 2013-05-11 21:19 | adoom42 | Target Version | => 0.20.5 |