From: Mike Taylor Date: Wed, 8 Nov 2006 17:42:11 +0000 (+0000) Subject: Clearer reporting. X-Git-Tag: CPAN-v1.02~54^2~766 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=dcaee79b19b1d82da48b7f26c8f9ba0339a56dac;p=irspy-moved-to-github.git Clearer reporting. Still needs stupid second XPath-context like test-xml-update.pl --- diff --git a/web/htdocs/details/edit.mc b/web/htdocs/details/edit.mc index 1657fa4..2fa9a0a 100644 --- a/web/htdocs/details/edit.mc +++ b/web/htdocs/details/edit.mc @@ -1,4 +1,4 @@ -%# $Id: edit.mc,v 1.7 2006-11-06 14:22:22 mike Exp $ +%# $Id: edit.mc,v 1.8 2006-11-08 17:42:11 mike Exp $ <%args> $id @@ -70,11 +70,11 @@ if ($n == 0) { }

<% xml_encode($xc->find("e:databaseInfo/e:title")) %>

-% if (defined $update) { -

The record has been updated (nchanges=<% $nchanges %>).

-% } % if ($nchanges) { -

Changed <% $nchanges %> element<% $nchanges == 1 ? "" : "s" %>.

+

+ The record has been updated.
+ Changed <% $nchanges %> element<% $nchanges == 1 ? "" : "s" %>. +

% }
@@ -102,4 +102,12 @@ if ($n == 0) {
+<%perl> + if ($nchanges) { + my $x = $xc->getContextNode()->toString(); + $x = xml_encode($x); + #$x =~ s/$//gm; + print "
$x
\n"; + } + % }