[% PROCESS inputs; PROCESS class_manip; PROCESS widget_manip; PROCESS logic_header.ttk; WRAPPER html/html; INCLUDE header.ttk title="Basic Report Types"; WRAPPER html/body html.body.onload= "if (document.getElementById('templatename')) {" _ "document.getElementById('templatename').focus();" _ "document.getElementById('templatename').select();}"; INCLUDE logout.ttk; IF !CGI.param('id'); IF CGI.param('detail'); %]|No Details (All)[% ELSE; %]|Details (All)[% END; INCLUDE all_stage1; ELSE; INCLUDE one_stage1; END; END; INCLUDE footer.ttk; END; #============================================================================= BLOCK one_stage1; %]|Show all[% table_xpath = '/reporter/tables/table[@id="' _ CGI.param('id') _ '"]'; table = config.findnodes(table_xpath); fact_table = table.findvalue('@id'); logme(fact_table); INCLUDE class_table class=table; INCLUDE stage2_new IF CGI.param('create_stage2') == 1; END; BLOCK all_stage1; ''; END; BLOCK stage2_new; col_xpath = "/reporter/tables/table[@id='" _ fact_table _ "']/fields/field[@core='true']"; logme(col_xpath); %]

Public template

[% WRAPPER html/table width="100%" style='border-top: 1px solid black'; WRAPPER html/row; WRAPPER html/cell; WRAPPER html/table + html/row width='100%'; INCLUDE html/cell content='Report Base'; END; WRAPPER html/table + html/row width='100%'; INCLUDE html/cell content='Attribute' align='right'; END; END; INCLUDE html/cell content='Widget' align='center'; END; WRAPPER html/row; WRAPPER html/cell colspan=2; # hidden input here ... table = config.findnodes("/reporter/tables/table[@id='$fact_table']"); INCLUDE hidden name="filter" value=fact_table; table.findvalue('label'); ' Core Columns'; END; END; INCLUDE widget_selector tableid=fact_table columns=config.findnodes(col_xpath) force=1; END; dim_xpath = "/reporter/tables/table[@id='$fact_table']/links/link/@table"; FOR dim_table IN config.findnodes(dim_xpath); dim_table = dim_table.value(); dimension = config.findnodes("/reporter/tables/table[@id='$dim_table']"); '

'; WRAPPER html/table width="100%" style='border-top: 1px solid black'; WRAPPER html/row; WRAPPER html/cell; WRAPPER html/table + html/row width='100%'; INCLUDE html/cell content='Dimension'; END; WRAPPER html/table + html/row width='100%'; INCLUDE html/cell content='Attribute' align='right'; END; END; INCLUDE html/cell content='Widget' align='center'; END; WRAPPER html/row; WRAPPER html/cell colspan=2; # checkbox input here ... INCLUDE checkbox name="filter" value=dim_table checked=1; dimension.findvalue('label'); ' Dimension'; END; END; INCLUDE widget_selector tableid=dim_table; END; END; INCLUDE submit name='button' value='Save'; %]
[% END; %]