[value scratch=1 name=mv_data_table set="[value mvc_data_table]" hide=1] [if-mm !tables] [bounce href="[area @@MM_BASE@@/violation]"] [/if-mm]
[if session arg] [seti arg][data session arg][/seti] [else] [set arg]1[/set] [/else] [/if] [title-bar][L]Spreadsheet[/L]: [value mv_data_table][if scratch export_ok] ([L]exported[/L])[/if][/title-bar]

[L]Edit menu for table[/L] [value mv_data_table]
[if-mm upload] [L]Upload/download/export menu for table[/L] [value mv_data_table]
[/if-mm] [scratch menu]

[if scratch mm_failure] Error: [scratch mm_failure] [set mm_failure][/set] [/if] [perl tables="[value mvc_data_table]"] my $table = $Values->{mvc_data_table}; $Values->{mvc_data_key_name} = $Db{$table}->config('KEY'); if ($table ne $Values->{mv_data_table}) { $Values->{mv_data_table} = $table; } $Values->{mvc_data_fields} = $CGI->{mvc_data_fields} || $Values->{"$table:mvc_data_fields"} || '' ; return; [/perl] [if !value mvc_spreadsheet_rows] [value name=mvc_spreadsheet_rows set=10 hide=1] [/if] [comment] [rotate-table rotate="0"] [/comment] [search-region arg=" ra=yes ml=[value mvc_spreadsheet_rows] rf=[value mvc_data_key_name] tf=[value mvc_data_key_name] st=db sp=@@MM_BASE@@/spread_results fi=[value mvc_data_table] "] [rotate-table reparse=0 rotate="[value mvc_rotate_spread]" interpolate=1]

[with param=table value="[value mvc_data_table]"]
[row-edit columns="[value mvc_data_fields]"]
[search-list] [if-mm keys [item-code]]
[page href="@@MM_BASE@@/edit_record" arg="[item-code]"]Edit [row-edit key="[item-code]" size="[value mvc_spread_size]" columns="[value mvc_data_fields]"]
[/if-mm] [set row_number][item-increment][/set] [/search-list]

[/rotate-table]

[more-list]

### More pages: [more]

[/more-list] [/search-region]
[set Submit] mv_todo=set mv_nextpage=@@MM_BASE@@/spread [/set] [if !value mvc_too_large] [L]Auto-export[/L] [/if] [L]Edit/Insert row[/L]:

[title-bar 400 2][L]Limit fields to display (changes above will not be made)[/L][/title-bar] [set name=mvc_data_fields_name int][value mv_data_table]:mvc_data_fields[/set]

[L]Column width[/L] |  | [set Display All Fields][scratch mvc_data_fields_name]= mv_todo=return mv_nextpage=@@MV_PAGE@@ [/set] [widget name="[scratch mvc_data_fields_name]" type="checkbox left 2" data="=ALL,[db-columns joiner=',']" ] [/widget]
Number of rows |
[L]Decode HTML entities[/L] |

[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]