6 PROCESS logic_header.ttk;
9 INCLUDE header.ttk title="Basic Report Types";
10 WRAPPER html/body html.body.onload=
11 "if (document.getElementById('templatename')) {" _
12 "document.getElementById('templatename').focus();" _
13 "document.getElementById('templatename').select();}";
16 IF CGI.param('detail');
17 %]|<a href="?detail=0">No Details (All)</a>[%
19 %]|<a href="?detail=1">Details (All)</a>[%
32 #=============================================================================
37 CGI.url('-absolute',1,'-path_info',1,'-query',1)
38 .replace('[&\?;]?id=[\w\.]+','')
39 .replace('[&\?;]?create_stage2=1','');
43 '/reporter/tables/table[@id="' _
44 CGI.param('id') _ '"]';
45 table = config.findnodes(table_xpath);
47 fact_table = table.findvalue('@id');
50 INCLUDE class_table class=table;
52 INCLUDE stage2_new IF CGI.param('create_stage2') == 1;
62 FOR tab IN config.findnodes("//tables/table[@fact-table='true']");
64 fact_table = tab.findvalue("@id");
65 logme("Fact Table is $fact_table");
69 INCLUDE class_table class=tab;
71 IF loop.count != loop.size;
83 col_xpath = "/reporter/tables/table[@id='" _ fact_table _ "']/fields/field[@core='true']";
86 %]<br/><form id="stage2_new" name="stage2_new" action="stage2" method="POST">
87 <input type="hidden" name="action" value="save">
88 <input type="hidden" name="stage1" value="[% CGI.param('id') %]">
89 <input type="text" name="templatename" id="templatename"
90 size="40" value="Template name (required)"><br/>
91 <input type="checkbox" name="publictemplate" value="t">
92 Public template<br><br>[%
95 WRAPPER html/table width="100%" style='border-top: 1px solid black';
98 WRAPPER html/table + html/row width='100%';
99 INCLUDE html/cell content='<b>Report Base</b>';
101 WRAPPER html/table + html/row width='100%';
102 INCLUDE html/cell content='<b>Attribute</b>' align='right';
105 INCLUDE html/cell content='<b>Widget</b>' align='center';
108 WRAPPER html/cell colspan=2;
109 # hidden input here ...
110 table = config.findnodes("/reporter/tables/table[@id='$fact_table']");
111 INCLUDE hidden name="filter" value=fact_table;
112 table.findvalue('label');
116 INCLUDE widget_selector tableid=fact_table columns=config.findnodes(col_xpath) force=1;
119 dim_xpath = "/reporter/tables/table[@id='$fact_table']/links/link/@table";
120 FOR dim_table IN config.findnodes(dim_xpath);
121 dim_table = dim_table.value();
122 dimension = config.findnodes("/reporter/tables/table[@id='$dim_table']");
126 WRAPPER html/table width="100%" style='border-top: 1px solid black';
129 WRAPPER html/table + html/row width='100%';
130 INCLUDE html/cell content='<b>Dimension</b>';
132 WRAPPER html/table + html/row width='100%';
133 INCLUDE html/cell content='<b>Attribute</b>' align='right';
136 INCLUDE html/cell content='<b>Widget</b>' align='center';
139 WRAPPER html/cell colspan=2;
140 # checkbox input here ...
141 INCLUDE checkbox name="filter" value=dim_table checked=1;
142 dimension.findvalue('label');
146 INCLUDE widget_selector tableid=dim_table;
150 INCLUDE submit name='button' value='Save';