[% PROCESS inputs; PROCESS class_manip; PROCESS widget_manip; PROCESS logic_header.ttk; INCLUDE logout.ttk; WRAPPER html/html; INCLUDE header.ttk + navbar.ttk title="Basic Report Types"; WRAPPER html/body html.body.onload= "if (document.getElementById('templatename')) {" _ "document.getElementById('templatename').focus();" _ "document.getElementById('templatename').select();}"; 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 classname=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"; FOR dim_link = config.findnodes(dim_xpath); dim_table = dim_link.findvalue('@table'); link_id = dim_link.findvalue('@id'); 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=link_id checked=1; link_label_xpath = '../../fields/field[@name="' _ dim_link.findvalue('@field') _ '"]/label'; dim_link.findvalue(link_label_xpath); ' -- '; dimension.findvalue('label'); ' Dimension'; END; END; INCLUDE widget_selector tableid=link_id; END; END; INCLUDE submit name='button' value='Save'; %]
[% END; %]