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