diff options
author | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-08-23 22:25:39 +0000 |
commit | 3ce7691203a7737406bf2d4442f7fd84b81f847e (patch) | |
tree | 90658b097da96772224f04771888ac6ca1a940aa /httemplate/edit/msgcat.cgi | |
parent | 15e561850b61b10a92a46d8f3e316d53d4970087 (diff) |
Will things ever be the same again?
It's the final masonize
Diffstat (limited to 'httemplate/edit/msgcat.cgi')
-rwxr-xr-x | httemplate/edit/msgcat.cgi | 113 |
1 files changed, 57 insertions, 56 deletions
diff --git a/httemplate/edit/msgcat.cgi b/httemplate/edit/msgcat.cgi index ee9b1c6b3..54a340d83 100755 --- a/httemplate/edit/msgcat.cgi +++ b/httemplate/edit/msgcat.cgi @@ -1,58 +1,59 @@ <!-- mason kludge --> -<% +% +% +%print header("Edit Message catalog", menubar( +%# 'Main Menu' => $p, +%)), '<BR>'; +% +%print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !. $cgi->param('error'). +% '</FONT><BR><BR>' +% if $cgi->param('error'); +% +%my $widget = new HTML::Widgets::SelectLayers( +% 'selected_layer' => 'en_US', +% 'options' => { 'en_US'=>'en_US' }, +% 'form_action' => 'process/msgcat.cgi', +% 'layer_callback' => sub { +% my $layer = shift; +% my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!. +% "<BR>Messages for locale $layer<BR>". table(). +% "<TR><TH COLSPAN=2>Code</TH>". +% "<TH>Message</TH>"; +% $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US'; +% $html .= '</TR>'; +% +% #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } +% # qsearch('msgcat', { 'locale' => $layer } ) ) { +% foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { +% $html .= +% '<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'. +% '<TD><INPUT TYPE="text" SIZE=32 '. +% qq! NAME="!. $msgcat->msgnum. '" '. +% qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></TD>!; +% unless ( $layer eq 'en_US' ) { +% my $en_msgcat = qsearchs('msgcat', { +% 'locale' => 'en_US', +% 'msgcode' => $msgcat->msgcode, +% } ); +% $html .= '<TD>'. $en_msgcat->msg. '</TD>'; +% } +% $html .= '</TR>'; +% } +% +% $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="Apply changes">'; +% +% $html; +% }, +% +%); +% +%print $widget->html; +% +%print <<END; +% </TABLE> +% </BODY> +%</HTML> +%END +% +% -print header("Edit Message catalog", menubar( -# 'Main Menu' => $p, -)), '<BR>'; - -print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !. $cgi->param('error'). - '</FONT><BR><BR>' - if $cgi->param('error'); - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => 'en_US', - 'options' => { 'en_US'=>'en_US' }, - 'form_action' => 'process/msgcat.cgi', - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!<INPUT TYPE="hidden" NAME="locale" VALUE="$layer">!. - "<BR>Messages for locale $layer<BR>". table(). - "<TR><TH COLSPAN=2>Code</TH>". - "<TH>Message</TH>"; - $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US'; - $html .= '</TR>'; - - #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } - # qsearch('msgcat', { 'locale' => $layer } ) ) { - foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { - $html .= - '<TR><TD>'. $msgcat->msgnum. '</TD><TD>'. $msgcat->msgcode. '</TD>'. - '<TD><INPUT TYPE="text" SIZE=32 '. - qq! NAME="!. $msgcat->msgnum. '" '. - qq!VALUE="!. ($cgi->param($msgcat->msgnum)||$msgcat->msg). qq!"></TD>!; - unless ( $layer eq 'en_US' ) { - my $en_msgcat = qsearchs('msgcat', { - 'locale' => 'en_US', - 'msgcode' => $msgcat->msgcode, - } ); - $html .= '<TD>'. $en_msgcat->msg. '</TD>'; - } - $html .= '</TR>'; - } - - $html .= '</TABLE><BR><INPUT TYPE="submit" VALUE="Apply changes">'; - - $html; - }, - -); - -print $widget->html; - -print <<END; - </TABLE> - </BODY> -</HTML> -END - -%> |