[set page_perm]gentable[/set] [set page_title][L]Table Manager[/L][/set] [set ui_class]Admin[/set] [set help_name]genconfig.main[/set] [set icon_name]icon_config.gif[/set] @_UI_STD_HEAD_@
[L]Database tables[/L]
[loop list="[list-databases]"] [loop-sub db_action] sub { #Log("args=" . $Tag->uneval({ ref => \@_ })); my $name = shift; return if $admin{$name}; my $rec = shift; my $tab = $rec->[0]; if(! $admin_done++) { # Set up hidden tables %admin = map { ($_, 1) } split /[\s.\0]+/, $Variable->{UI_ADMIN_TABLES}; # To build the links to hidden tables $Scratch->{ui_tmp_admin} = join " ", sort keys %admin; } return '' if $admin{$tab}; #Log("name=$name tab=$tab"); $name = $tab if ! $name; my $url = "$Config->{VendURL}/__UI_BASE__"; my $froot = sub { my $fn = shift; $fn =~ s#^$Config->{VendRoot}/##o; return $fn; }; my $ref = { upload => { img => 'up.gif', url => $Tag->area( '__UI_BASE__/upload_file', $froot->(join "/", ($Config->{Database}{$tab}{dir} || $Config->{ProductDir}), $Config->{Database}{$tab}{file} ), { form => 'ui_return_to=@@MV_PAGE@@' } ), }, download => { img => 'down.gif', url => $Tag->area( { href => 'ui_download/' . $froot->( join "/", ( $Config->{Database}{$tab}{dir} || $Config->{ProductDir} ), $Config->{Database}{$tab}{file} ), form => 'filler=1', }, ), }, import => { img => 'left.gif', url => $Tag->area( { href => '__UI_BASE__/import_table', form => "mv_data_table=$tab", } ), }, export => { img => 'right.gif', url => $Tag->area( { href => '__UI_BASE__/export_table', form => "mv_data_table=$tab", } ), }, config => { img => 'icon_config.gif', url => $Tag->area( { href => '__UI_BASE__/dbconfig', form => "mv_data_table=$tab", } ), }, edit => { img => 'layout.gif', url => $Tag->area( { href => '__UI_BASE__/flex_select', form => "mv_data_table=$tab", } ), }, }; my $out = ''; if(! $dblist_done_one++) { $out .= ''; #### Uncomment this "for" and comment out the one below to experiment #### with dbconfig (which is not working yet) #for('[L]edit[/L]', '[L]import[/L]', '[L]export[/L]', '[L]upload[/L]', '[L]download[/L]', '[L]config[/L]', '[L]Table name[/L] ([L]description[/L])') { # Add "report" for('[L]edit[/L]', '[L]import[/L]', '[L]export[/L]', '[L]upload[/L]', '[L]download[/L]', '[L]Table name[/L] ([L]description[/L])') { # Add "report" $out .= qq{}; } $out .= ""; } $out .= ''; #### Uncomment this "for" and comment out the one below to experiment #### with dbconfig (which is not working yet) #for(qw/edit import export upload download config/) { # Add "report" for(qw/edit import export upload download/) { # Add "report" my $line = $ref->{$_}; $out .= <$_ $tab EOF } $out .= qq{}; return $out; } [/loop-sub] [loop-exec db_action][loop-data __UI_META_TABLE__ label][/loop-exec] [/loop]
$_
 $name}; my $desc = tag_data('__UI_META_TABLE__', 'name', $name); $out .= qq{ ($desc)} if $desc; $out .= q{
[if-mm super]
[L]Hidden admin tables[/L]:
[calc] return join ', ', map { $Tag->page( { href => '__UI_BASE__/flex_select', form => "mv_data_table=$_", } ) . $_ . '' } split / /, $Scratch->{ui_tmp_admin} ; [/calc]
[/if-mm] @_UI_STD_FOOTER_@