From ae83c012c0c7c92ce5145c70cd9dac783ff911ff Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 8 Feb 2006 22:03:00 +0000 Subject: [PATCH] big ol reporter cleanup for the meeting git-svn-id: svn://svn.open-ils.org/ILS/trunk@3013 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/reporter/tables.example.xml | 16 +- Open-ILS/src/reporter/templates/dashboard.ttk | 61 +++--- Open-ILS/src/reporter/templates/header.ttk | 186 ++++++++++++++++++ Open-ILS/src/reporter/templates/stage2.ttk | 17 +- Open-ILS/src/reporter/templates/stage3.ttk | 59 ++++++ .../widgets/comparative-timerange.month | 6 + .../templates/widgets/lib-choose.dropdown | 7 + .../templates/widgets/lib-choose.multiselect | 10 + .../templates/widgets/relative-timerange.day | 5 + .../widgets/relative-timerange.month | 7 + .../widgets/relative-timerange.quarter | 5 + .../templates/widgets/relative-timerange.week | 5 + .../templates/widgets/relative-timerange.year | 5 + .../templates/widgets/specific-timerange.any | 6 + .../templates/widgets/specific-timerange.day | 6 + .../widgets/specific-timerange.month | 9 + .../widgets/specific-timerange.multimonth | 18 ++ .../widgets/specific-timerange.multiquarter | 8 + .../widgets/specific-timerange.multiweek | 6 + .../widgets/specific-timerange.multiyear | 7 + .../widgets/specific-timerange.quarter | 6 + .../templates/widgets/specific-timerange.week | 7 + .../templates/widgets/specific-timerange.year | 7 + .../templates/widgets/string-choose.dropdown | 6 + .../widgets/string-choose.multiselect | 6 + .../templates/widgets/string-input.exact | 7 + .../widgets/string-input.initial-substring | 8 + .../widgets/string-input.multistring | 8 + 28 files changed, 465 insertions(+), 39 deletions(-) diff --git a/Open-ILS/src/reporter/tables.example.xml b/Open-ILS/src/reporter/tables.example.xml index 5043a5f87e..25c276d359 100644 --- a/Open-ILS/src/reporter/tables.example.xml +++ b/Open-ILS/src/reporter/tables.example.xml @@ -146,9 +146,9 @@ key="date" type="has_a"/> - - Unique Library ID + + Globally Unique Library Identifier - - Library Name + + Friendly Library Name

'; + WRAPPER html/cell valign='top' style='height:200px'; + INCLUDE my_completed_reports limit=5; END; END; WRAPPER html/row; INCLUDE html/cell - content=link(content='Active reports',href='dashboard?detail=mycompletereports') + content=link(content='Manage scheduled reports',href='dashboard?detail=myreports') align='center' style='border-bottom:1px solid black'; END; WRAPPER html/row; WRAPPER html/cell valign='top' style='height:200px'; - INCLUDE my_completed_reports limit=5; + INCLUDE my_scheduled_reports limit=5; END; END; WRAPPER html/row; INCLUDE html/cell - content=link(content='Manage scheduled reports',href='dashboard?detail=myreports') + colspan=2 align='center' + content=link(content='Schedule a new report',href='dashboard?detail=report_template_tree') style='border-bottom:1px solid black'; END; WRAPPER html/row; - WRAPPER html/cell valign='top' style='height:200px'; - INCLUDE my_scheduled_reports limit=5; + WRAPPER html/cell colspan=2 valign='top'; + INCLUDE report_template_tree; + '


'; END; END; END; @@ -85,7 +85,7 @@ END; BLOCK my_scheduled_reports; q = "SELECT * FROM reporter.stage3 WHERE owner = " _ user.id() _ - " AND runtime > now() ORDER BY runtime DESC"; + " AND runtime > now() ORDER BY runtime"; IF limit > 0; q = q _ ' LIMIT ' _ limit; END; @@ -97,11 +97,12 @@ BLOCK my_scheduled_reports; END; BLOCK show_complete_reports; - WRAPPER html/table width='100%'; + WRAPPER html/table width='100%' class='sortable' id='show_complete_reports'; WRAPPER html/row; - INCLUDE html/cell content='Run status' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; - INCLUDE html/cell content='Report name' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; - INCLUDE html/cell content='Run time' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + INCLUDE html/cell content='Status' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + INCLUDE html/cell content='Base Template' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + INCLUDE html/cell content='Report Defintion' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + INCLUDE html/cell content='Last Action Time' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; END; FOR output = DBI.query(q); rid = output.stage3; @@ -133,7 +134,7 @@ BLOCK show_complete_reports; END; name_link = link(content=p.reportname,href="stage3?id=$rid#$output.id"); - name_link = t.templatename _ ' :: ' _ name_link; + #name_link = t.templatename _ ' :: ' _ name_link; WRAPPER html/row; INCLUDE html/cell @@ -142,13 +143,17 @@ BLOCK show_complete_reports; content=state col=bg style='padding:5px; border:solid gray 1px;'; + INCLUDE html/cell + content=t.templatename + col=bg + style='border:solid gray 1px;'; INCLUDE html/cell content=name_link col=bg style='border:solid gray 1px;'; INCLUDE html/cell nowrap='nowrap' - content=runtime.chunk(19).0 + content=runtime.chunk(16).0 col=bg style='border:solid gray 1px;'; END; @@ -158,13 +163,14 @@ END; BLOCK show_reports; - WRAPPER html/table width='100%'; + WRAPPER html/table width='100%' class='sortable' id='show_reports'; WRAPPER html/row; + INCLUDE html/cell content='Runs' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; INCLUDE html/cell content='Public' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; - INCLUDE html/cell content='Report name' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; - INCLUDE html/cell content='Create date and time' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; - INCLUDE html/cell content='Scheduled run time' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; - INCLUDE html/cell content='Number of runs' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + INCLUDE html/cell content='Base Template' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + INCLUDE html/cell content='Report Definition' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + #INCLUDE html/cell content='Create date' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; + INCLUDE html/cell content='Scheduled Run Time' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;'; END; FOR report = DBI.query(q); rid = report.id; @@ -190,23 +196,24 @@ BLOCK show_reports; t = utils.JSON2perl( template.params ); - rtime = report.runtime.chunk(19).0; + rtime = report.runtime.chunk(16).0; IF report.disable; rtime = rtime _ '
(Disabled)'; END; name_link = link(content=p.reportname,href="stage3?id=$rid"); - name_link = t.templatename _ ' :: ' _ name_link; + #name_link = t.templatename _ ' :: ' _ name_link; + INCLUDE html/cell content=run_count.get.count col=bg style='text-align: center; border:solid gray 1px;'; INCLUDE html/cell content=(report.pub ? 'Y' : 'N') col=bg style='border:solid gray 1px;' align='center'; + INCLUDE html/cell content=t.templatename col=bg style='border:solid gray 1px;'; INCLUDE html/cell content=name_link col=bg style='border:solid gray 1px;'; - INCLUDE html/cell nowrap='nowrap' content=report.create_date.chunk(19).0 col=bg style='border:solid gray 1px;'; + #INCLUDE html/cell nowrap='nowrap' content=report.create_date.chunk(16).0 col=bg style='border:solid gray 1px;'; INCLUDE html/cell nowrap='nowrap' content=rtime col=bg - style='border:solid gray 1px;'; - INCLUDE html/cell content=run_count.get.count col=bg style='border:solid gray 1px;'; + style='text-align: center; border:solid gray 1px;'; END; END; END; diff --git a/Open-ILS/src/reporter/templates/header.ttk b/Open-ILS/src/reporter/templates/header.ttk index 3361d2448d..53c9db34e5 100644 --- a/Open-ILS/src/reporter/templates/header.ttk +++ b/Open-ILS/src/reporter/templates/header.ttk @@ -32,6 +32,192 @@ .navbar { border-bottom: 1px solid gray; padding-right: 20px; padding-left: 5px; } + [% content %] diff --git a/Open-ILS/src/reporter/templates/stage2.ttk b/Open-ILS/src/reporter/templates/stage2.ttk index 6dff0fefa3..d6d26d308b 100644 --- a/Open-ILS/src/reporter/templates/stage2.ttk +++ b/Open-ILS/src/reporter/templates/stage2.ttk @@ -278,7 +278,7 @@ BLOCK run_stage2; END; END; - '

'; + '

'; WRAPPER html/table border=0 width='100%'; WRAPPER html/row; @@ -477,7 +477,8 @@ BLOCK run_stage2; current_value = report.filter.$t.$fieldname.$famname.$widgetname; logme(current_value); - INCLUDE $w_file widget_family=fam; + PROCESS $w_file widget_family=fam; + PROCESS editor; CATCH; %]ARG!! Couldn't render widget [% $w_file %] ([% error.info %])!!![% END; @@ -554,6 +555,14 @@ BLOCK run_stage2; END; END; + %] +
+ + [% INCLUDE checkbox name="publicreport" value="t" checked=(report.publicreport == 't' ? 'checked' : ''); 'Public Report
'; diff --git a/Open-ILS/src/reporter/templates/stage3.ttk b/Open-ILS/src/reporter/templates/stage3.ttk index 138dec8218..6a4e83349f 100644 --- a/Open-ILS/src/reporter/templates/stage3.ttk +++ b/Open-ILS/src/reporter/templates/stage3.ttk @@ -282,6 +282,65 @@ BLOCK view_stage3; INCLUDE html/cell content="Recurrence Interval" style="border:solid gray 1px;"; INCLUDE html/cell content=rpt.recurrence style="border:solid gray 1px;"; END; + WRAPPER html/row; + INCLUDE html/cell content="Selection Criteria" style="border:solid gray 1px; vertical-align: top;"; + WRAPPER html/cell style="border:solid gray 1px;"; + WRAPPER html/table width="100%" style="border-collapse:collapse;"; + FOR t = params.filter.keys; + FOR c = params.filter.$t.keys; + FOR wf = params.filter.$t.$c.keys; + FOR w = params.filter.$t.$c.$wf.keys; + WRAPPER html/row; + xpath = '/reporter/tables/table[@id="' _ t _ '" and @fact-table="true"]'; + table = config.findnodes(xpath); + IF !table; + xpath = '/reporter/tables/table[@id=//link[@id="' _ t _ '"]/@table]'; + table = config.findnodes(xpath); + END; + + INCLUDE html/cell + content = table.findvalue('label') + style="border:solid gray 1px; top; font-weight:bold;"; + + xpath = 'fields/field[@name="' _ c _ '"]/label'; + INCLUDE html/cell + content = table.findvalue(xpath) + style="border:solid gray 1px; font-weight:bold;"; + + WRAPPER html/cell + style="border:solid gray 1px; vertical-align: top;"; + w_file = 'widgets/' _ wf _ '.' _ w; + current_value = params.filter.$t.$c.$wf.$w; + PROCESS $w_file; + PROCESS display; + END; + END; + END; + END; + END; + END; + END; + END; + END; + WRAPPER html/row; + INCLUDE html/cell content="Output Attributes" style="border:solid gray 1px; vertical-align: top;"; + WRAPPER html/cell style="border:solid gray 1px;"; + FOR t = params.output.keys; + FOR c = params.output.$t.keys; + xpath = '/reporter/tables/table[@id="' _ t _ '" and @fact-table="true"]'; + table = config.findnodes(xpath); + IF !table; + xpath = '/reporter/tables/table[@id=//link[@id="' _ t _ '"]/@table]'; + table = config.findnodes(xpath); + END; + + xpath = 'fields/field[@name="' _ c _ '"]/label'; + table.findvalue('label') _ ' -- ' _ table.findvalue(xpath) _ '
'; + + END; + END; + END; + END; WRAPPER html/row; INCLUDE html/cell content="Actions" style="border:solid gray 1px;"; WRAPPER html/cell style="border:solid gray 1px;"; diff --git a/Open-ILS/src/reporter/templates/widgets/comparative-timerange.month b/Open-ILS/src/reporter/templates/widgets/comparative-timerange.month index bf1e97980f..c1025c6c41 100644 --- a/Open-ILS/src/reporter/templates/widgets/comparative-timerange.month +++ b/Open-ILS/src/reporter/templates/widgets/comparative-timerange.month @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; WRAPPER select name=input_prefix _ ":target"; count = 1; def = 1; @@ -28,5 +29,10 @@ WRAPPER select name=input_prefix _ ":compare"; END; END; ' months before target'; +END; + +BLOCK display; +current_value.compare _' months before runtime compared to ' _ current_value.compare _ ' months before target'; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/lib-choose.dropdown b/Open-ILS/src/reporter/templates/widgets/lib-choose.dropdown index 4d27a51cc2..29e4ff1d62 100644 --- a/Open-ILS/src/reporter/templates/widgets/lib-choose.dropdown +++ b/Open-ILS/src/reporter/templates/widgets/lib-choose.dropdown @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; root = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou IS NULL ORDER BY name;'; q = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou = ? ORDER BY name;'; @@ -36,6 +37,7 @@ WRAPPER select id=input_prefix name=input_prefix onchange='change_hier_' _ table INCLUDE next_level parent_ou = f.id depth; END; END; +END; BLOCK next_level; @@ -72,4 +74,9 @@ BLOCK next_level; END; END; +BLOCK display; +org_units = DBI.tie('actor.org_unit', 'id') +ou = org_units.$current_value; +ou.name; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/lib-choose.multiselect b/Open-ILS/src/reporter/templates/widgets/lib-choose.multiselect index eb0d8fa6b9..af69d5d7ec 100644 --- a/Open-ILS/src/reporter/templates/widgets/lib-choose.multiselect +++ b/Open-ILS/src/reporter/templates/widgets/lib-choose.multiselect @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; root = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou IS NULL ORDER BY name;'; q = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' WHERE parent_ou = ? ORDER BY name;'; @@ -43,6 +44,7 @@ WRAPPER select name=input_prefix multi="multi" onchange='change_multihier_' _ ta INCLUDE next_level parent_ou = f.id; END; END; +END; BLOCK next_level; depth = depth + 1; @@ -80,4 +82,12 @@ BLOCK next_level; END; END; +BLOCK display; + org_units = DBI.tie('actor.org_unit', 'id'); + list = []; + FOR o = current_value; + list.push(org_units.$o.name); + END; + list.join('
'); +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/relative-timerange.day b/Open-ILS/src/reporter/templates/widgets/relative-timerange.day index 8dc510c736..cc3db6a541 100644 --- a/Open-ILS/src/reporter/templates/widgets/relative-timerange.day +++ b/Open-ILS/src/reporter/templates/widgets/relative-timerange.day @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; WRAPPER select name=input_prefix; count = 1; def = 1; @@ -14,5 +15,9 @@ WRAPPER select name=input_prefix; END; END; ' days before runtime'; +END; +BLOCK display; +current_value _ ' days before runtime'; +END %] diff --git a/Open-ILS/src/reporter/templates/widgets/relative-timerange.month b/Open-ILS/src/reporter/templates/widgets/relative-timerange.month index cc48031e2a..f583a85709 100644 --- a/Open-ILS/src/reporter/templates/widgets/relative-timerange.month +++ b/Open-ILS/src/reporter/templates/widgets/relative-timerange.month @@ -2,6 +2,8 @@ PROCESS inputs; +BLOCK editor; + WRAPPER select name=input_prefix; count = 1; IF current_value; @@ -13,5 +15,10 @@ WRAPPER select name=input_prefix; END; END; ' months before runtime'; +END; + +BLOCK display; +current_value _ ' months before runtime'; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/relative-timerange.quarter b/Open-ILS/src/reporter/templates/widgets/relative-timerange.quarter index 303b96e985..850bac673a 100644 --- a/Open-ILS/src/reporter/templates/widgets/relative-timerange.quarter +++ b/Open-ILS/src/reporter/templates/widgets/relative-timerange.quarter @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; WRAPPER select name=input_prefix; count = 1; WHILE count < 37; @@ -10,5 +11,9 @@ WRAPPER select name=input_prefix; END; END; ' (calendar) quarters before runtime'; +END; +BLOCK display; +current_value _ ' (calendar) quarters before runtime'; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/relative-timerange.week b/Open-ILS/src/reporter/templates/widgets/relative-timerange.week index 04efe7d55d..cbe2ac9799 100644 --- a/Open-ILS/src/reporter/templates/widgets/relative-timerange.week +++ b/Open-ILS/src/reporter/templates/widgets/relative-timerange.week @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; WRAPPER select name=input_prefix; count = 1; IF current_value; @@ -13,5 +14,9 @@ WRAPPER select name=input_prefix; END; END; ' weeks before runtime'; +END; +BLOCK display; +current_value _ ' weeks before runtime'; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/relative-timerange.year b/Open-ILS/src/reporter/templates/widgets/relative-timerange.year index d60ff1b238..0387aded9b 100644 --- a/Open-ILS/src/reporter/templates/widgets/relative-timerange.year +++ b/Open-ILS/src/reporter/templates/widgets/relative-timerange.year @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; WRAPPER select name=input_prefix; count = 1; IF current_value; @@ -13,5 +14,9 @@ WRAPPER select name=input_prefix; END; END; ' years before runtime'; +END; +BLOCK display; +current_value _ ' years before runtime'; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.any b/Open-ILS/src/reporter/templates/widgets/specific-timerange.any index 0f6c3be678..b6767c1b88 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.any +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.any @@ -6,6 +6,7 @@ USE end = DateTime(now = 1); PROCESS inputs; +BLOCK editor; WRAPPER html/table ; WRAPPER html/row; INCLUDE html/cell colspan=6 align='center' content='Start time'; @@ -76,4 +77,9 @@ WRAPPER html/table ; END; END; +END; + +BLOCK display; +END; + %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.day b/Open-ILS/src/reporter/templates/widgets/specific-timerange.day index 17d017d033..d856271f13 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.day +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.day @@ -5,6 +5,7 @@ USE start = DateTime(now = 1); PROCESS inputs; +BLOCK editor; WRAPPER html/table ; WRAPPER html/row; INCLUDE html/cell content='Year'; @@ -29,5 +30,10 @@ WRAPPER html/table ; END; END; +END; + +BLOCK display; +current_value.year _ '-' _ current_value.month _ '-' _ current_value.day; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.month b/Open-ILS/src/reporter/templates/widgets/specific-timerange.month index 408da28729..0b2d6cc794 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.month +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.month @@ -6,6 +6,8 @@ USE end = DateTime(now = 1); PROCESS inputs; +BLOCK editor; + WRAPPER html/table ; WRAPPER html/row; @@ -33,5 +35,12 @@ WRAPPER html/table ; END; END; +END; +BLOCK display; +f = 'start-year'; +current_value.$f _ '-'; +f = 'start-month'; +current_value.$f; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multimonth b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multimonth index 40264db767..a3a77538fc 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multimonth +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multimonth @@ -6,6 +6,8 @@ USE end = DateTime(now = 1); PROCESS inputs; +BLOCK editor; + WRAPPER html/table ; WRAPPER html/row; INCLUDE html/cell colspan=2 align='center' content='Start time'; @@ -53,5 +55,21 @@ WRAPPER html/table ; END; END; END; +END; + +BLOCK display; + syl = 'start-year'; + sml = 'start-month'; + eyl = 'end-year'; + eml = 'end-month'; + + sy = (current_value.$syl ? current_value.$syl : start.year); + sm = (current_value.$sml ? current_value.$sml : start.month); + ey = (current_value.$eyl ? current_value.$eyl : end.year); + em = (current_value.$eml ? current_value.$eml : end.month); + + sy _ '-' _ sm _ ' through ' _ ey _ '-' _ em; + +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiquarter b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiquarter index 2ffe1b022f..f229fb2ef0 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiquarter +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiquarter @@ -5,6 +5,8 @@ USE start = DateTime(now = 1); PROCESS inputs; +BLOCK editor; + WRAPPER html/table ; WRAPPER html/row; @@ -32,4 +34,10 @@ WRAPPER html/table ; END; +END; + +BLOCK display; +'Year: ' _ current_value.year _ ', Quarter: ' _ current_value.quarter; +END; + %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiweek b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiweek index 642a1275a6..4785422892 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiweek +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiweek @@ -5,6 +5,8 @@ USE start = DateTime(now = 1); PROCESS inputs; +BLOCK editor; + WRAPPER html/table; WRAPPER html/row; @@ -48,6 +50,10 @@ WRAPPER html/table; END; END; END; +END; +BLOCK display; +current_value.year _ ', weeks ' _ current_value.start _ ' through ' _ current_value.end; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiyear b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiyear index c845134e96..017a46ed3b 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiyear +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.multiyear @@ -5,6 +5,7 @@ USE start = DateTime(now = 1); PROCESS inputs; +BLOCK editor; WRAPPER html/table ; WRAPPER html/row; @@ -24,5 +25,11 @@ WRAPPER html/table ; END; END; +END; + +BLOCK display; +ycl = 'year-count'; +current_value.year _ ' through ' _ current_value.year + current_value.$ycl; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.quarter b/Open-ILS/src/reporter/templates/widgets/specific-timerange.quarter index 9bacd82f4d..4f5afd1b36 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.quarter +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.quarter @@ -5,6 +5,7 @@ USE start = DateTime(now = 1); PROCESS inputs; +BLOCK editor; WRAPPER html/table ; WRAPPER html/row; @@ -26,5 +27,10 @@ WRAPPER html/table ; END; END; +END; + +BLOCK display; +'Year: ' _ current_value.year _ ', Quarter: ' _ current_value.quarter; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.week b/Open-ILS/src/reporter/templates/widgets/specific-timerange.week index ec7537669e..3b24f37fa0 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.week +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.week @@ -5,6 +5,8 @@ PROCESS inputs; USE date; USE start = DateTime(now = 1); +BLOCK editor; + 'Year: '; INCLUDE name=input_prefix _ ':year' text size=4 value=start.year; @@ -21,5 +23,10 @@ WRAPPER select name=input_prefix _ ':week'; count = count + 1; END; END; +END; + +BLOCK display; +'Year: ' _ current_value.year _ ', Week: ' _ current_value.week; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/specific-timerange.year b/Open-ILS/src/reporter/templates/widgets/specific-timerange.year index 34bd3388dc..706ed8ac7e 100644 --- a/Open-ILS/src/reporter/templates/widgets/specific-timerange.year +++ b/Open-ILS/src/reporter/templates/widgets/specific-timerange.year @@ -5,6 +5,8 @@ USE start = DateTime(now = 1); PROCESS inputs; +BLOCK editor; + WRAPPER html/table ; WRAPPER html/row; @@ -18,5 +20,10 @@ WRAPPER html/table ; END; END; +END; + +BLOCK display; +current_value; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/string-choose.dropdown b/Open-ILS/src/reporter/templates/widgets/string-choose.dropdown index d7d923cb1c..01856f94ee 100644 --- a/Open-ILS/src/reporter/templates/widgets/string-choose.dropdown +++ b/Open-ILS/src/reporter/templates/widgets/string-choose.dropdown @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; q = 'SELECT * FROM ' _ table.findvalue('tablename') _ ' ORDER BY ' _ fieldname _ ';'; ''; @@ -17,5 +18,10 @@ WRAPPER select name=input_prefix; INCLUDE option value=f.$fieldname; END; END; +END; + +BLOCK display; +current_value; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/string-choose.multiselect b/Open-ILS/src/reporter/templates/widgets/string-choose.multiselect index 158962d2ec..edd6fc0188 100644 --- a/Open-ILS/src/reporter/templates/widgets/string-choose.multiselect +++ b/Open-ILS/src/reporter/templates/widgets/string-choose.multiselect @@ -2,6 +2,7 @@ PROCESS inputs; +BLOCK editor; q = 'SELECT DISTINCT ' _ fieldname _ ' FROM ' _ table.findvalue('tablename') _ ' ORDER BY ' _ fieldname _ ';'; ''; @@ -18,5 +19,10 @@ WRAPPER select name=input_prefix multi=1 size=10; INCLUDE option value=f.$fieldname; END; END; +END; + +BLOCK display; +current_value; +END; %] diff --git a/Open-ILS/src/reporter/templates/widgets/string-input.exact b/Open-ILS/src/reporter/templates/widgets/string-input.exact index 1dae31a731..36d357c0d4 100644 --- a/Open-ILS/src/reporter/templates/widgets/string-input.exact +++ b/Open-ILS/src/reporter/templates/widgets/string-input.exact @@ -1,4 +1,11 @@ [% PROCESS inputs; +BLOCK editor; INCLUDE text name=input_prefix size=20 value=current_value; +END; + +BLOCK display; +current_value; +END; + %] diff --git a/Open-ILS/src/reporter/templates/widgets/string-input.initial-substring b/Open-ILS/src/reporter/templates/widgets/string-input.initial-substring index 1dae31a731..a3dfb6096a 100644 --- a/Open-ILS/src/reporter/templates/widgets/string-input.initial-substring +++ b/Open-ILS/src/reporter/templates/widgets/string-input.initial-substring @@ -1,4 +1,12 @@ [% PROCESS inputs; + +BLOCK editor; INCLUDE text name=input_prefix size=20 value=current_value; +END; + +BLOCK display; +current_value; +END; + %] diff --git a/Open-ILS/src/reporter/templates/widgets/string-input.multistring b/Open-ILS/src/reporter/templates/widgets/string-input.multistring index 3cece2d101..48ef829d2b 100644 --- a/Open-ILS/src/reporter/templates/widgets/string-input.multistring +++ b/Open-ILS/src/reporter/templates/widgets/string-input.multistring @@ -1,4 +1,12 @@ [% PROCESS inputs; + +BLOCK editor; INCLUDE textarea name=input_prefix value=current_value; +END; + +BLOCK display; +current_value; +END; + %] -- 2.43.2