X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=web%2Fhtdocs%2Fchrome%2Flayout.mc;h=adaac28067059d5599117e8c9321af549385607f;hb=1096fc15fbdeb947e5c0c5c14ff39630e0a23e35;hp=d00a496145d90bbb3b1f4748833badff5ce2cea9;hpb=d5476aa3bc98a17d8c7a5d91ebe6a872a2519896;p=irspy-moved-to-github.git diff --git a/web/htdocs/chrome/layout.mc b/web/htdocs/chrome/layout.mc index d00a496..adaac28 100644 --- a/web/htdocs/chrome/layout.mc +++ b/web/htdocs/chrome/layout.mc @@ -1,16 +1,35 @@ -%# $Id: layout.mc,v 1.2 2006-09-15 16:49:05 mike Exp $ +%# $Id: layout.mc,v 1.16 2006-11-14 16:21:08 mike Exp $ <%args> $debug => undef $title $component -<%once> -use lib "/usr/local/src/cvs/irspy/lib"; -use ZOOM::IRSpy; - <%perl> -my $text = $m->scomp($component, %ARGS); +{ + # Make up ID for newly created records. It would be more + # rigorously correct, but insanely inefficient, to submit the + # record to Zebra and then search for it; but since we know the + # formula for IDs anyway, we just build one by hand. + my $id = $r->param("id"); + my $host = $r->param("host"); + my $port = $r->param("port"); + my $dbname = $r->param("dbname"); + #warn "id='$id', host='$host', port='$port', dbname='$dbname'"; + #warn "%ARGS = {\n" . join("", map { "\t'$_' => '" . $ARGS{$_} . ",'\n" } sort keys %ARGS) . "}\n"; + if ((!defined $id || $id eq "") && + defined $host && defined $port && defined $dbname) { + $id = "$host:$port/$dbname"; + $r->param(id => $id); + $ARGS{id} = $id; + #warn "id set to '$id'"; + } +} +<%once> +use URI::Escape; +use ZOOM::IRSpy::Web; +use ZOOM::IRSpy::Utils qw(irspy_xpath_context xml_encode modify_xml_document); + <& /chrome/head.mc, title => $title &> <& /chrome/bannerrow.mc, title => $title &> @@ -24,14 +43,9 @@ my $text = $m->scomp($component, %ARGS); - + - -
<& /chrome/menu.mc &>   - <% $text %> - - -<& /chrome/pmenu.mc &> +<& $component, %ARGS &>