r2077 + display tags for networks in search results as well
authorDenis Ovsienko <infrastation@yandex.ru>
Thu, 24 Jul 2008 15:17:36 +0000 (15:17 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Thu, 24 Jul 2008 15:17:36 +0000 (15:17 +0000)
inc/interface.php

index 4602301d42f4094718d52c2f8f38e0f9745f0f1a..4bbe974339cee7dfef5c8f2024b35559c53c2aa1 100644 (file)
@@ -3001,12 +3001,19 @@ function renderSearchResults ()
                                case 'ipv4network':
                                        startPortlet ("<a href='${root}?page=ipv4space'>IPv4 networks</a>");
                                        echo '<table border=0 cellpadding=5 cellspacing=0 align=center class=cooltable>';
-                                       echo '<tr><th>Network</th><th>Descritpion</th></tr>';
+                                       echo '<tr><th>network</th><th>name/tags</th></tr>';
                                        foreach ($what as $net)
                                        {
-                                               echo "<tr class=row_${order}><td class=tdleft><a href='${root}?page=iprange&id=${net['id']}'>${net['ip']}";
+                                               $prefixtags = loadIPv4PrefixTags ($net['id']);
+                                               echo "<tr class=row_${order} valign=top><td class=tdleft><a href='${root}?page=iprange&id=${net['id']}'>${net['ip']}";
                                                echo '/' . $net['mask'] . '</a></td>';
-                                               echo "<td class=tdleft>${net['name']}</td></tr>";
+                                               echo "<td class=tdleft>${net['name']}";
+                                               if (count ($prefixtags))
+                                               {
+                                                       echo "<br>";
+                                                       echo serializeTags ($prefixtags, "${root}?page=ipv4space&");
+                                               }
+                                               echo "</td></tr>";
                                                $order = $nextorder[$order];
                                        }
                                        echo '</table>';