X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fmsgcat.cgi;h=dbe0990d52402353f4c318e514ef6a39a1a8aa93;hp=54a340d833e4dbe59f943429910c4a7311f153fc;hb=ac8410cdb67639afeb84c84e975fffadf3e6cce1;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0 diff --git a/httemplate/edit/msgcat.cgi b/httemplate/edit/msgcat.cgi index 54a340d83..dbe0990d5 100755 --- a/httemplate/edit/msgcat.cgi +++ b/httemplate/edit/msgcat.cgi @@ -1,59 +1,54 @@ - -% -% -%print header("Edit Message catalog", menubar( -%# 'Main Menu' => $p, -%)), '
'; -% -%print qq!Error: !. $cgi->param('error'). -% '

' -% 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!!. -% "
Messages for locale $layer
". table(). -% "Code". -% "Message"; -% $html .= "en_US Message" unless $layer eq 'en_US'; -% $html .= ''; -% -% #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } -% # qsearch('msgcat', { 'locale' => $layer } ) ) { -% foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { -% $html .= -% ''. $msgcat->msgnum. ''. $msgcat->msgcode. ''. -% '!; -% unless ( $layer eq 'en_US' ) { -% my $en_msgcat = qsearchs('msgcat', { -% 'locale' => 'en_US', -% 'msgcode' => $msgcat->msgcode, -% } ); -% $html .= ''. $en_msgcat->msg. ''; -% } -% $html .= ''; -% } -% -% $html .= '
'; -% -% $html; -% }, -% -%); -% -%print $widget->html; -% -%print < -% -% -%END -% -% +<& /elements/header-popup.html, emt("Edit Message catalog") &> +
+<& /elements/error.html &> + +<% $widget->html %> + + + + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $widget = new HTML::Widgets::SelectLayers( + 'selected_layer' => 'en_US', + 'options' => { 'en_US'=>'en_US', 'iw_IL' => 'iw_IL', }, + 'form_action' => 'process/msgcat.cgi', + 'layer_callback' => sub { + my $layer = shift; + my $html = qq!!. + "
".emt("Messages for locale [_1]",$layer)."
". table(). + "".emt('Code')."". + "".emt('Message').""; + $html .= "en_US Message" unless $layer eq 'en_US'; + $html .= ''; + + #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } + # qsearch('msgcat', { 'locale' => $layer } ) ) { + foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { + $html .= + ''. $msgcat->msgnum. ''. $msgcat->msgcode. ''. + '!; + unless ( $layer eq 'en_US' ) { + my $en_msgcat = qsearchs('msgcat', { + 'locale' => 'en_US', + 'msgcode' => $msgcat->msgcode, + } ); + $html .= ''. $en_msgcat->msg. '' if $en_msgcat; + } + $html .= ''; + } + + $html .= '
'; + + $html; + }, + +); + +