Add another layer of tables to the top banner, for IE's benefit.
[irspy-moved-to-github.git] / web / htdocs / chrome / layout.mc
1 %# $Id: layout.mc,v 1.29 2007-04-26 14:38:37 mike Exp $
2 <%args>
3 $debug => undef
4 $title
5 $component
6 </%args>
7 <%once>
8 use URI::Escape qw(uri_escape uri_escape_utf8);
9 use ZOOM;
10 use ZOOM::IRSpy::Web;
11 use ZOOM::IRSpy::Utils qw(isodate xml_encode cql_target cql_quote
12                           irspy_xpath_context modify_xml_document
13                           bib1_access_point);
14 </%once>
15 % $r->content_type("text/html; charset=utf-8");
16 <?xml version="1.0" encoding="UTF-8"?>
17 <!DOCTYPE html 
18      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
19     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
20 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
21  <head>
22   <title>IRSpy: <% xml_encode($title) %></title>
23   <link rel="stylesheet" type="text/css" href="/style.css"/>
24  </head>
25  <body>
26   <table border="0" cellpadding="0" cellspacing="0" width="100%">
27    <tr class="banner">
28     <td>
29      <table width="100%">
30       <tr>
31     <td align="left">
32      <br/>
33      <h1><a class="logo" href="/">IRSpy</a></h1>
34     </td>
35     <td align="right">
36      <br/>
37      <h1 class="title"><% xml_encode($title) %></h1>
38     </td>
39       </table>
40      </tr>
41     </td>
42    </tr>
43   </table>
44   <table border="0" cellpadding="0" cellspacing="0" width="100%">
45    <tr class="panel3">
46     <td align="left">
47      &nbsp; <!-- Force display -->
48      <!-- Lmenu left -->
49     </td>
50     <td>
51      <!-- Lmenu middle -->
52     </td>
53     <td align="right">
54      <!-- Lmenu right -->
55     </td>
56    </tr>
57   </table>
58   <p></p>
59   <table border="0" cellpadding="0" cellspacing="0" width="100%">
60    <tr>
61     <td valign="top" class="panel1">
62      <p>
63       <a href="/"><b>Home</b></a><br/>
64       <a href="/admin/all.html">Test&nbsp;all&nbsp;targets</a><br/>
65       <a href="/find.html">Find a target</a><br/>
66       <a href="/admin/edit.html?op=new">Add a target</a><br/>
67       <a href="/stats.html">Statistics</a><br/>
68      </p>
69      <p>
70       <b>Show targets</b>
71       <br/>
72 % foreach my $i ('a' .. 'z') {
73       <a href="/find.html?dc.title=^<% $i %>*&amp;_sort=dc.title&amp;_count=9999&amp;_search=Search"><tt><% uc($i) %></tt></a>
74 % }
75       <a href="/find.html?cql.allRecords=1+not+dc.title+=/regexp/firstInField+[a-z].*&amp;_sort=dc.title&amp;_count=9999&amp;_search=Search"">[Others]</a>
76      </p>
77 <%perl>
78 my $id = $r->param("id");
79 {
80     # Make up ID for newly created records.  It would be more
81     # rigorously correct, but insanely inefficient, to submit the
82     # record to Zebra and then search for it; but since we know the
83     # formula for IDs anyway, we just build one by hand.
84     my $id = $r->param("id");
85     my $host = $r->param("host");
86     my $port = $r->param("port");
87     my $dbname = $r->param("dbname");
88     #warn "id='$id', host='$host', port='$port', dbname='$dbname'";
89     #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n";
90     if ((!defined $id || $id eq "") &&
91         defined $host && defined $port && defined $dbname) {
92         $id = "$host:$port/$dbname";
93         #warn "id set to '$id'";
94     }
95 }
96 </%perl>
97 % if (defined $id && $r->param("op") ne "copy") {
98      <div class="panel2">
99       <b>This Target</b>
100       <br/>
101       <a href="<% xml_encode("/full.html?id=" . uri_escape($id)) %>">Show details</a>
102       <br/>
103       <a href="<% xml_encode("/admin/edit.html?op=edit&id=" . uri_escape($id)) %>">Edit details</a>
104       <br/>
105       <a href="<% xml_encode("/admin/edit.html?op=copy&id=" . uri_escape($id)) %>">Copy target</a>
106       <br/>
107       <a href="<% xml_encode("/admin/delete.html?id=" . uri_escape($id)) %>">Delete target</a>
108       <p>
109        <a href="<% xml_encode("/admin/check.html?id=" . uri_escape($id)) . "&amp;test=Quick" %>">Quick Test</a>
110        <br/>
111        <a href="<% xml_encode("/admin/check.html?id=" . uri_escape($id)) . "&amp;test=Main" %>">Full Test</a>
112       </p>
113       <p>
114        <a href="<% xml_encode("/raw.html?id=" . uri_escape($id)) %>">XML</a>
115       </p>
116 <%doc><!-- Maybe this would be too heavyweight -->
117       <br/>
118 % my $host = "bagel.indexdata.dk";
119 % my $port = 210;
120       <a href="/find.html?net.host=<% $host %>&net.port=<% $port %>&_search=Search"
121         >All databases on this server</a>
122 </%doc>
123      </div>
124 % }
125      <p>
126       <b>Documentation</b>
127       <br/>
128       <a href="/doc.html">Contents</a>
129      </p>
130      <p>&nbsp;</p>
131      <p>
132       <a href="http://validator.w3.org/check?uri=referer"><img
133         src="/valid-xhtml10.png"
134         alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
135       <br/>
136       <a href="http://jigsaw.w3.org/css-validator/"><img
137         src="/vcss.png"
138         alt="Valid CSS!" height="31" width="88" /></a>
139      </p>
140     </td>
141     <td class="spacer">&nbsp;</td>
142     <td valign="top">
143 <& $component, %ARGS &>
144     </td>
145    </tr>
146   </table>
147   <p/>
148   <hr/>
149   <div class="right">
150    <small>
151     Powered by <a style="text-decoration: none"
152         href="http://indexdata.com/"
153         >Index&nbsp;Data</a>
154    </small>
155   </div>
156  </body>
157 </html>