Commit 7e572dde authored by David Johnson's avatar David Johnson

Show more metadata about locations, including contact info for the node if

user is admin.
parent 4cebea8c
......@@ -497,9 +497,13 @@ class Node
isset($row["floor"]) && isset($row["building"])) {
$floor = $row["floor"];
$building = $row["building"];
$room = $row["room"];
$loc_x = $row["loc_x"];
$loc_y = $row["loc_y"];
$orient = $row["orientation"];
$contact = $row["contact"];
$email = $row["email"];
$phone = $row["phone"];
$query_result =
DBQueryFatal("select * from floorimages ".
......@@ -628,9 +632,22 @@ class Node
#
# Location info.
#
if (isset($building)) {
echo "<tr>
<td>Location (bldg/floor/room):</td>
<td class=left>$building";
if (isset($floor)) {
echo "/$floor";
}
if (isset($room)) {
echo "/$room";
}
echo "</td>
</tr>\n";
}
if (isset($meters_x) && isset($meters_y)) {
echo "<tr>
<td>Location:</td>
<td>Location Coordinates:</td>
<td class=left>x=$meters_x, y=$meters_y meters";
if (isset($orientation)) {
echo " (o=$orientation degrees)";
......@@ -638,6 +655,23 @@ class Node
echo "</td>
</tr>\n";
}
if (OPSGUY() && (isset($contact) || isset($email))) {
$lcstr = "";
if (isset($contact)) {
$lcstr .= "$contact:";
}
if (isset($email)) {
$lcstr .= " <a href='mailto:$email'>$email</a>";
}
if (isset($phone)) {
$lcstr .= " $phone";
}
echo "<tr>
<td>Location Contact:</td>
<td class=left>$lcstr
</td>
</tr>\n";
}
}
if (!$short && !$noperm) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment