/
question.html
120 lines (100 loc) · 2.19 KB
/
question.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[if cgi fieldmeta]
[cgi name=item_id set="[cgi fieldmeta]"]
[/if]
[if !cgi item_id]
[bounce page="__UI_BASE__/gentable"]
[/if]
[calc]
my $location = $CGI->{item_id};
my @parts = split /::/, $location;
if($Config->{Database}{$parts[0]}) {
($m_table, $m_col, $m_key) = @parts;
}
else {
($m_view, $m_table, $m_col, $m_key) = @parts;
}
my @frags;
push(@frags,errmsg('Meta field edit') . ':');
push(@frags,errmsg('view=%s', $m_view)) if $m_view;
push(@frags,errmsg('table=%s column=%s', $m_table, $m_col));
push(@frags,errmsg('key=%s', $m_key)) if $m_key;
$Scratch->{page_title} = join(' ',@frags);
my $string = <<EOF;
<B>Meta information edit </b><BR>
<table>
EOF
$string .= <<EOF if $m_view;
<tr>
<td align=right>view:</td>
<td><B>$m_view</b></td>
</tr>
EOF
$string .= <<EOF;
<tr>
<td align=right>table:</td>
<td><B>$m_table</b></td>
</tr>
<tr>
<td align=right>column:</td>
<td><B>$m_col</b></td>
</tr>
</table>
EOF
$Scratch->{page_banner} = $string;
$CGI->{ui_meta_view} = 'metaconfig';
if(! $CGI->{mv_data_table}) {
$CGI->{mv_data_table} = '__UI_META_TABLE__';
}
if(! $CGI->{ui_data_fields}) {
$CGI->{ui_data_fields} = 'code label help help_url type width height options filter lookup field db lookup_exclude outboard pre_filter prepend append';
}
if(! $CGI->{ui_break_before}) {
$CGI->{ui_break_before} = 'help type lookup outboard prepend';
$CGI->{ui_break_before_label} = 'type=Display control, help=Help information, lookup=Database lookup, outboard=Advanced';
}
return;
[/calc]
[set ui_class]Admin[/set]
[set help_name]meta.edit[/set]
[set icon_name][/set]
@_UI_STD_HEAD_@
[table-editor
item_id="[cgi item_id]"
table="[cgi mv_data_table]"
no-table-meta=1
no-meta=1
ui_data_fields="
=Label
code
label
=Widget
type
filter
width
height
options
=Help
help
help_url
=Database lookup
lookup
field
db
lookup_query
lookup_exclude
=Advanced
outboard
pre_filter
prepend
append
=Extended
extended
"
widget.extended="textarea_5_50"
tabbed=1
panel_width=800
panel_height=700
table_width=800
][/table-editor]
@_UI_STD_FOOTER_@
<!-- page: @@MV_PAGE@@ -->