View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
847 | RackTables | default | public | 2013-05-07 15:13 | 2013-05-11 21:40 |
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 | 847: Display parent and child location on Location view page | ||||
Description | Currently on Location view page there is no information about this Location parent or childs. There is only info about Child locations count. This patch adds to Location Summary portlet info about parent Location. And it adds a new portlet "Child Locations" which lists all child Locations. | ||||
Tags | No tags attached. | ||||
location-view-tree.patch (1,200 bytes)
--- ../../racktables-test/inc/interface.php 2013-04-09 11:10:21.633224423 +0200 +++ interface.php 2013-04-15 14:50:29.033196148 +0200 @@ -3831,6 +3831,8 @@ echo "<td class=pcleft>"; $summary = array(); $summary['Name'] = $locationData['name']; + if (!empty($locationData['parent_id'])) + $summary['Parent location'] = "<a href='" . makeHref(array('page'=>'location', 'location_id'=>$locationData['parent_id'])) . "'>" . $locationData['parent_name']; $summary['Child locations'] = count($locationData['locations']); $summary['Rows'] = count($locationData['rows']); if ($locationData['has_problems'] == 'yes') @@ -3852,6 +3854,14 @@ echo "<tr><td><a href='".makeHref(array('page'=>'row', 'row_id'=>$row_id))."'>".$name."</td></tr>\n"; echo "</table>\n"; finishPortlet(); + + startPortlet ('Child Locations (' . count($locationData['locations']) . ')'); + echo "<table border=0 cellspacing=0 cellpadding=5 align=center>\n"; + foreach ($locationData['locations'] as $loc_id => $name) + echo "<tr><td><a href='".makeHref(array('page'=>'location', 'location_id'=>$loc_id))."'>".$name."</td></tr>\n"; + echo "</table>\n"; + finishPortlet(); + echo '</td>'; echo '</tr></table>'; } |
|
Thanks for the patch. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-05-07 15:13 | blaza-pl | New Issue | |
2013-05-07 15:13 | blaza-pl | File Added: location-view-tree.patch | |
2013-05-11 21:40 | adoom42 | Note Added: 0001397 | |
2013-05-11 21:40 | adoom42 | Assigned To | => adoom42 |
2013-05-11 21:40 | adoom42 | Status | new => closed |
2013-05-11 21:40 | adoom42 | Resolution | open => fixed |
2013-05-11 21:40 | adoom42 | Fixed in Version | => 0.20.5 |
2013-05-11 21:40 | adoom42 | Target Version | => 0.20.5 |