Fix "new" link.
[irspy-moved-to-github.git] / web / htdocs / chrome / menu.mc
1 %# $Id: menu.mc,v 1.18 2006-11-24 18:01:51 mike Exp $
2      <p>
3       <a href="/"><b>Home</b></a><br/>
4       <a href="/all.html">Test&nbsp;all&nbsp;targets</a><br/>
5       <a href="/find.html">Find a target</a><br/>
6       <a href="/edit.html?new=1">Add a target</a><br/>
7      </p>
8      <p>
9       <b>Show targets</b>
10       <br/>
11 % foreach my $i ('a' .. 'z') {
12       <a href="/find.html?dc.title=^<% $i %>*&amp;_sort=dc.title&amp;_count=9999&amp;_search=Search"><tt><% uc($i) %></tt></a>
13 % }
14      </p>
15 <%perl>
16 my $id = $r->param("id");
17 {
18     # Make up ID for newly created records.  It would be more
19     # rigorously correct, but insanely inefficient, to submit the
20     # record to Zebra and then search for it; but since we know the
21     # formula for IDs anyway, we just build one by hand.
22     my $id = $r->param("id");
23     my $host = $r->param("host");
24     my $port = $r->param("port");
25     my $dbname = $r->param("dbname");
26     #warn "id='$id', host='$host', port='$port', dbname='$dbname'";
27     #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n";
28     if ((!defined $id || $id eq "") &&
29         defined $host && defined $port && defined $dbname) {
30         $id = "$host:$port/$dbname";
31         #warn "id set to '$id'";
32     }
33 }
34 </%perl>
35 % if (defined $id) {
36      <div class="panel2">
37       <b>This Target</b>
38       <a href="<% xml_encode("/full.html?id=" . uri_escape($id)) %>">Show details</a>
39       <br/>
40       <a href="<% xml_encode("/edit.html?id=" . uri_escape($id)) %>">Edit details</a>
41       <br/>
42       <a href="<% xml_encode("/edit.html?id=" . uri_escape($id)) . "&amp;copy=1" %>">Copy target</a>
43       <p>
44        <a href="<% xml_encode("/check.html?id=" . uri_escape($id)) . "&amp;test=Quick" %>">Quick Test</a>
45        <br/>
46        <a href="<% xml_encode("/check.html?id=" . uri_escape($id)) . "&amp;test=Main" %>">Full Test</a>
47       </p>
48       <p>
49        <a href="<% xml_encode("/raw.html?id=" . uri_escape($id)) %>">XML</a>
50       </p>
51 <%doc><!-- Maybe this would be too heavyweight -->
52       <br/>
53 % my $host = "bagel.indexdata.dk";
54 % my $port = 210;
55       <a href="/find.html?net.host=<% $host %>&net.port=<% $port %>&_search=Search"
56         >All databases on this server</a>
57 </%doc>
58      </div>
59 % }
60      <p>
61       <b>Documentation</b>
62       <br/>
63       <a href="/doc.html">Contents</a>
64      </p>
65      <p>&nbsp;</p>
66      <p>
67       <a href="http://validator.w3.org/check?uri=referer"><img
68         src="/valid-xhtml10.png"
69         alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
70       <br/>
71       <a href="http://jigsaw.w3.org/css-validator/"><img
72         src="/vcss.png"
73         alt="Valid CSS!" height="31" width="88" /></a>
74      </p>