X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fmsgcat.cgi;h=b46cdfd469db246d04f956dfbcc77eadc04788b6;hp=54a340d833e4dbe59f943429910c4a7311f153fc;hb=15777da47bab33e8f0021e6dd9aa6b434fa9be30;hpb=655b4043942c7d361224d283accb4c2a02ef7359 diff --git a/httemplate/edit/msgcat.cgi b/httemplate/edit/msgcat.cgi index 54a340d83..b46cdfd46 100755 --- a/httemplate/edit/msgcat.cgi +++ b/httemplate/edit/msgcat.cgi @@ -1,59 +1,57 @@ - -% -% -%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 -% -% +<% header("Edit Message catalog" ) %> +
+% if ( $cgi->param('error') ) { + Error: <% $cgi->param('error') %> +

+% } + +<% $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' }, + '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; + }, + +); + +