[if !cgi mv_data_table] [or cgi ui_scrub_table] [calcn] $CGI->{mv_data_table} = $Values->{mv_data_table} = $Config->{ProductFiles}[0]; return; [/calcn] [/if] [if cgi mv_data_table eq 'mv_metadata'] [cgi name=mv_data_table set=__ProductFiles_0__ hide=1] [/if] [set ui_class]Items[/set] [tmp page_title][L]Item editor[/L][/tmp] [if-mm super] [tmp page_banner] [page href="__UI_BASE__/db_metaconfig" secure="[scratch page_secure]" form=' ui_return_to=__UI_BASE__/index ui_table=[cgi mv_data_table] ui_view=item_select start_at=height '][L]Item editor[/L] [/tmp] [/if-mm] [set table_perm]__ProductFiles_0__=v[/set] [set help_name]item.editor[/set] [set icon_name]icon_item.gif[/set] @_UI_STD_HEAD_@ [comment] [/comment] [if cgi deleterecords] [if-mm function="!tables" table="[cgi mv_data_table]"] [set ui_error][msg arg.0="[cgi mv_data_table]"]Not allowed to delete from %s.[/msg][/set] [bounce page="__UI_BASE__/error"] [else] [tmp extra_tables][loop list=` my @tab = grep /\S/, split /[\s,\0]+/, q{__UI_ITEM_TABLES__}; my %seen; for (@tab) { s/:.*//; next if $seen{$_}++; } return join " ", @tab; `][if-mm tables [loop-code]=d][loop-code] [flag type=write table="[loop-code]"][/if-mm][/loop][/tmp] [/else] [/if-mm] [/if] [output name=search_box]
[output name=""] [if-mm !super] [tmp ui_owner][db-hash table="__UI_ACCESS_TABLE__" column="table_control::[cgi mv_data_table]::owner_field" key="[data session username]"][/tmp] [/if-mm] [perl tables="[cgi mv_data_table] __UI_META_TABLE__"] my $tab = $CGI->{mv_data_table}; $CGI->{showinactive} = $Values->{mv_no_hide} = 1; my $view = $CGI->{ui_meta_view} || 'item_select'; my $ref = $Db{$tab}; my $meta = $Tag->meta_record($tab, $view); #Debug("Meta record: " . uneval($meta)); if (! $ref) { $Scratch->{keypos} = 0; return; } elsif (! $meta) { $Scratch->{keypos} = 0; } $meta ||= {}; if($CGI->{ui_flex_key}) { $Scratch->{keypos} = $CGI->{ui_flex_key}; } else { $Scratch->{keyname} = $ref->config('KEY'); $Scratch->{keypos} = $ref->config('KEY_INDEX'); } $Config->{NoSearch} = ''; $ui_text_qualification = $CGI->{ui_text_qualification} and $CGI->{changed_qual} = 1; if ($ui_text_qualification and $CGI->{ui_text_qualification} =~ /[\^]/ ) { if($Scratch->{ui_owner}) { $CGI->{ui_text_qualification} = <