Eliminate temporary variable.
[irspy-moved-to-github.git] / web / htdocs / details / found.mc
index ebe7367..7df2dff 100644 (file)
@@ -1,7 +1,5 @@
-%# $Id: found.mc,v 1.15 2006-10-20 16:57:23 mike Exp $
+%# $Id: found.mc,v 1.20 2006-11-16 17:10:30 mike Exp $
 <%once>
-use URI::Escape;
-
 sub print_navlink {
     my($params, $cond, $caption, $skip) = @_;
 
@@ -79,10 +77,10 @@ my $first = $skip+1;
 my $last = $first+$count-1;
 $last = $n if $last > $n;
 </%perl>
-     <form method="get" action="">
+     <form method="get" action=""><p>
       <input type="text" name="_query" size="60" value="<% xml_encode($query) %>"/>
       <input type="submit" name="_search" value="Search"/>
-     </form>
+     </p></form>
      <p>
 % if ($n == 0) {
       No matches
@@ -112,8 +110,7 @@ print_navlink(\%params, $last < $n, "Next", $skip+$count);
 % my @ids;
 % foreach my $i ($first .. $last) {
 <%perl>
-my $rec = $rs->record($i-1);
-my $xc = irspy_xpath_context($rec);
+my $xc = irspy_xpath_context($rs->record($i-1));
 my $title = $xc->find("e:databaseInfo/e:title");
 my $author = $xc->find("e:databaseInfo/e:author");
 my $host = $xc->find("e:serverInfo/e:host");
@@ -127,18 +124,18 @@ push @ids, $id;
       <tr style="background: <% ($i % 2) ? '#ffffc0' : 'white' %>">
        <td><% $i %></td>
        <td><a href="<% xml_encode("/full.html?id=" . uri_escape($id))
-               %>"><% xml_encode($title) %></a></td>
-       <td><% xml_encode($author) %></td>
-       <td><% xml_encode($host) %></td>
-       <td><% xml_encode($port) %></td>
-       <td><% xml_encode($db) %></td>
+               %>"><% xml_encode($title, "[untitled]") %></a></td>
+       <td><% xml_encode($author, "") %></td>
+       <td><% xml_encode($host, "") %></td>
+       <td><% xml_encode($port, "") %></td>
+       <td><% xml_encode($db, "") %></td>
        <td>
        <a href="<% xml_encode("/check.html?id=" . uri_escape($id))
-               %>" title="Test this target"><b>T</b></a
+               %>" title="Test this target">Test</a
        >&nbsp;<a href="<% xml_encode("/edit.html?id=" . uri_escape($id))
-               %>" title="Edit this target's record"><b>E</b></a
+               %>" title="Edit this target's record">Edit</a
        >&nbsp;<a href="<% xml_encode("/raw.html?id=" . uri_escape($id))
-               %>" title="Raw XML record"><b>X</b></a>
+               %>" title="Raw XML record">XML</a>
        </td>
       </tr>
 % }