6 PROCESS logic_header.ttk;
10 INCLUDE header.ttk + navbar.ttk title="Basic Report Types";
11 WRAPPER html/body html.body.onload=
12 "if (document.getElementById('templatename')) {" _
13 "document.getElementById('templatename').focus();" _
14 "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 classname=table;
52 INCLUDE stage2_new IF CGI.param('create_stage2') == 1;
62 FOR tab = config.findnodes("/reporter/tables/table[@fact-table='true']");
64 fact_table = tab.findvalue("@id");
65 logme("Fact Table is $fact_table");
69 INCLUDE class_table classname=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";
120 FOR dim_link = config.findnodes(dim_xpath);
121 dim_table = dim_link.findvalue('@table');
122 link_id = dim_link.findvalue('@id');
123 dimension = config.findnodes("/reporter/tables/table[@id='$dim_table']");
127 WRAPPER html/table width="100%" style='border-top: 1px solid black';
130 WRAPPER html/table + html/row width='100%';
131 INCLUDE html/cell content='<b>Dimension</b>';
133 WRAPPER html/table + html/row width='100%';
134 INCLUDE html/cell content='<b>Attribute</b>' align='right';
137 INCLUDE html/cell content='<b>Widget</b>' align='center';
140 WRAPPER html/cell colspan=2;
141 # checkbox input here ...
142 INCLUDE checkbox name="filter" value=link_id checked=1;
144 link_label_xpath = '../../fields/field[@name="' _ dim_link.findvalue('@field') _ '"]/label';
145 dim_link.findvalue(link_label_xpath);
148 dimension.findvalue('label');
152 INCLUDE widget_selector tableid=link_id;
156 INCLUDE submit name='button' value='Save';