623fb579826a66d125313cf9c14fabaf93680bc8
[irspy-moved-to-github.git] / web / htdocs / chrome / menu.mc
1 %# $Id: menu.mc,v 1.20 2006-12-04 16:47:27 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?op=new">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 && $r->param("op") ne "copy") {
36      <div class="panel2">
37       <b>This Target</b>
38       <br/>
39       <a href="<% xml_encode("/full.html?id=" . uri_escape($id)) %>">Show details</a>
40       <br/>
41       <a href="<% xml_encode("/edit.html?op=edit&id=" . uri_escape($id)) %>">Edit details</a>
42       <br/>
43       <a href="<% xml_encode("/edit.html?op=copy&id=" . uri_escape($id)) %>">Copy target</a>
44       <p>
45        <a href="<% xml_encode("/check.html?id=" . uri_escape($id)) . "&amp;test=Quick" %>">Quick Test</a>
46        <br/>
47        <a href="<% xml_encode("/check.html?id=" . uri_escape($id)) . "&amp;test=Main" %>">Full Test</a>
48       </p>
49       <p>
50        <a href="<% xml_encode("/raw.html?id=" . uri_escape($id)) %>">XML</a>
51       </p>
52 <%doc><!-- Maybe this would be too heavyweight -->
53       <br/>
54 % my $host = "bagel.indexdata.dk";
55 % my $port = 210;
56       <a href="/find.html?net.host=<% $host %>&net.port=<% $port %>&_search=Search"
57         >All databases on this server</a>
58 </%doc>
59      </div>
60 % }
61      <p>
62       <b>Documentation</b>
63       <br/>
64       <a href="/doc.html">Contents</a>
65      </p>
66      <p>&nbsp;</p>
67      <p>
68       <a href="http://validator.w3.org/check?uri=referer"><img
69         src="/valid-xhtml10.png"
70         alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
71       <br/>
72       <a href="http://jigsaw.w3.org/css-validator/"><img
73         src="/vcss.png"
74         alt="Valid CSS!" height="31" width="88" /></a>
75      </p>