use ZOOM
[irspy-moved-to-github.git] / web / htdocs / chrome / layout.mc
1 %# $Id: layout.mc,v 1.17 2006-11-16 11:49:30 mike Exp $
2 <%args>
3 $debug => undef
4 $title
5 $component
6 </%args>
7 <%perl>
8 {
9     # Make up ID for newly created records.  It would be more
10     # rigorously correct, but insanely inefficient, to submit the
11     # record to Zebra and then search for it; but since we know the
12     # formula for IDs anyway, we just build one by hand.
13     my $id = $r->param("id");
14     my $host = $r->param("host");
15     my $port = $r->param("port");
16     my $dbname = $r->param("dbname");
17     #warn "id='$id', host='$host', port='$port', dbname='$dbname'";
18     #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n";
19     if ((!defined $id || $id eq "") &&
20         defined $host && defined $port && defined $dbname) {
21         $id = "$host:$port/$dbname";
22         $r->param(id => $id);
23         $ARGS{id} = $id;
24         #warn "id set to '$id'";
25     }
26 }
27 </%perl>
28 <%once>
29 use URI::Escape;
30 use ZOOM;
31 use ZOOM::IRSpy::Web;
32 use ZOOM::IRSpy::Utils qw(irspy_xpath_context xml_encode modify_xml_document);
33 </%once>
34 <& /chrome/head.mc, title => $title &>
35   <table border="0" cellpadding="0" cellspacing="0" width="100%">
36 <& /chrome/bannerrow.mc, title => $title &>
37   </table>
38   <table border="0" cellpadding="0" cellspacing="0" width="100%">
39 <& /chrome/lmenu.mc &>
40   </table>
41   <p></p>
42   <table border="0" cellpadding="0" cellspacing="0" width="100%">
43    <tr>
44     <td valign="top" class="panel1">
45 <& /chrome/menu.mc &>
46     </td>
47     <td class="spacer">&nbsp;</td>
48     <td valign="top">
49 <& $component, %ARGS &>
50     </td>
51    </tr>
52   </table>
53 <& /chrome/tail.mc &>