[L]ACL Edit[/L]

[tag flag write]__MINIMATE_META__[/tag]
[if-mm !super] [bounce href="[area @@MM_BASE@@/violation]"] [/if-mm] [if session arg] [seti arg][data session arg][/seti] [elsif value mm_edit_meta] [seti arg][value mm_edit_meta][/seti] [/elsif] [else] [set arg][/set] [/else] [/if] [perl tables="__MINIMATE_META__"] my $table = $Variable->{MINIMATE_META} || 'mv_metadata'; my $key = $Scratch->{arg}; if($key =~ /(\w+)::(.+)/) { $Scratch->{meta_table} = $1; $Scratch->{meta_column} = $2; } my $db = $Db{$table} or do{ Log("meta database $table not present."); return; }; if ($table ne $Values->{mv_data_table}) { $Values->{mvc_data_table} = $Values->{mv_data_table} = $table; } $Values->{mvc_data_key_name} = $db->config('KEY'); my @fields = $db->columns(); $Values->{mvc_data_fields} = join " ", @fields; if( $db->record_exists($key) ) { for(@fields) { $Values->{$_} = $db->field($key, $_); } } else { for(@fields) { delete $Values->{$_}; } } if($table eq delete $Values->{mvc_auto_export}) { return "[seti export_ok][tag export $table][/tag][/seti]"; } else { return '[set export_ok][/set]'; } [/perl] [title-bar 500 6][L]Table[/L] [value mv_data_table][if scratch export_ok](exported)[/if][/title-bar]

[title-bar 200 2][L]Links[/L][/title-bar] [scratch menu] Back to table |

[set process_meta] [tag flag write]__MINIMATE_META__[/tag] [perl tables="__MINIMATE_META__"] my $table = $Values->{mv_data_table}; my $db = $Db{$table}; my $key = $CGI->{$CGI->{mv_data_key}}; $Scratch->{mv_data_enable} = 0; $CGI->{mv_todo} = 'return'; if(! $key) { Log('Tried to write empty meta field'); return; } for($db->columns()) { next unless defined $CGI->{$_}; $CGI->{$_} =~ s/^[\s\0]+//; $CGI->{$_} =~ s/[\s\0]+$//; $CGI->{$_} =~ s/\0+/_/g; $CGI->{$_} =~ s/__+/_/g; $CGI->{$_} =~ s/_ / /g; #$db->set_field($key, $_, $CGI->{$_}); } if($CGI->{lookup} and $CGI->{type} =~ /combo/) { $CGI->{filter} = 'nullselect'; } $CGI->{mv_todo} = 'set'; $CGI->{mv_nextpage} = '@@MM_BASE@@/format_meta'; $Session->{arg} = $table; $Scratch->{mv_data_enable} = 1; return; [/perl] [/set] [title-bar size=3][L]Table[/L]: [scratch meta_table] [L]Column[/L]: [scratch meta_column][/title-bar] [if-key-exists table="[value mv_data_table]" key="[scratch arg]"] [L]Update[/L] [L]Insert[/L] [L]Delete[/L] [L]Yes, delete[/L] [else] [L]Update[/L] [L]Insert[/L] [/else] [/if-key-exists]

[title-bar 200 2]Widget Default is text box, 60 columns[/title-bar] | [title-bar 100 2]Window size multiple select only[/title-bar] | [title-bar 150 2]Box Height Text area or radio/check table[/title-bar] | [title-bar 150 2]Box Width Text box, Text area, or radio/check area[/title-bar]
|  | [perl] delete $Scratch->{mm_type_height}; delete $Scratch->{mm_type_width}; $Values->{type} =~ m{(\d+)(?:_+(\d+))?} or return; $Scratch->{mm_type_height} = $1 || ''; $Scratch->{mm_type_width} = $2 || ''; $Scratch->{mm_type_width} = delete $Scratch->{mm_type_height} if ! $Scratch->{mm_type_width}; return; [/perl] or | or
Field label What should display as field title. |
Fixed list This is a comma-separated list of values to present. It takes the form VALUE=Label text* | [value options] where VALUE is the value to go in the cell, Label text is the label for the selection, and the optional * selects this as a default.
List Lookup Looks up unique values and places in select box. | Table Column (if not [scratch meta_column])
Filter Allows you to filter against common errors. Select as many as wanted. |
Help text Displayed just like this. | [value help]

[calc] my $check = $Values->{mvc_data_fields} || $Tag->db_columns(); return if $check =~ /\b$Values->{mvc_data_key_name}\b/; my $name = $Values->{mvc_data_key_name}; my $val = $Scratch->{arg}; $val =~ s/"/"/g; [/calc]
[if !value mvc_too_large] [L]Auto-export[/L] [/if] [value name=mvc_data_fields set=""]

[L]Edit menu for table[/L] [value mv_data_table]
[L]Upload/download/export menu for table[/L] [value mv_data_table]
[scratch menu]