checking in Mike's stage 3 / widget work from yesterday
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Oct 2005 14:48:12 +0000 (14:48 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 13 Oct 2005 14:48:12 +0000 (14:48 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1911 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/reporter/templates/logic_header.ttk
Open-ILS/src/reporter/templates/stage2.ttk
Open-ILS/src/reporter/templates/widgets/specific-timerange.any
Open-ILS/src/reporter/templates/widgets/specific-timerange.month

index 2fc450d..b8e05dd 100644 (file)
@@ -28,4 +28,7 @@ DBI.connect(dsn,d_u,d_p);
 
 stage2_insert = 'INSERT INTO reporter.stage2 (stage1, params, owner, pub)' _
                                                ' VALUES ( ?,?,?,? )';
+
+stage3_insert = 'INSERT INTO reporter.stage3 (stage2, params, owner, pub, runtime)' _
+                                               ' VALUES ( ?,?,?,?,? )';
 %]
index 663bff0..e865eb8 100644 (file)
@@ -189,6 +189,8 @@ BLOCK run_stage2;
 
    %]<br/><form id="stage3_new" name="stage3_new" action="stage3" method="POST">[%
 
+       INCLUDE hidden name='stage2' value=CGI.param('id');
+
        WRAPPER html/table border=0 width='100%';
                WRAPPER html/row;
                        WRAPPER html/cell colspan=4 align='center';
@@ -208,7 +210,6 @@ BLOCK run_stage2;
                        logme([f_table]);
                        table = config.findnodes( "/reporter/tables/table[@id='$f_table']");
                        WRAPPER html/row;
-                               INCLUDE html/cell;
                                INCLUDE html/cell colspan=3 align='left' content=table.findvalue( 'label' );
                        END;
 
@@ -225,7 +226,7 @@ BLOCK run_stage2;
                                                widget = fam.findnodes( "widget[@name='$f_widget']" );
 
                                                w_file = 'widgets/' _ fam.findvalue('@name') _ '.' _ widget.findvalue('@name');
-                                               INCLUDE html/cell colspan=2;
+                                               INCLUDE html/cell;
                                                INCLUDE html/cell align='right' content=field.findvalue( 'label' );
 
                                                WRAPPER html/cell align='center';
@@ -235,7 +236,7 @@ BLOCK run_stage2;
                                                                        widgetname = widget.findvalue('@name');
                                                                        famname = fam.findvalue('@name');
 
-                                                                       input_prefix = "$famname:$widgetname:$classname:$fieldname";
+                                                                       input_prefix = "filter:$famname:$widgetname:$classname:$fieldname";
 
                                                                        INCLUDE $w_file widget_family=fam;
                                                        CATCH;
@@ -248,42 +249,66 @@ BLOCK run_stage2;
                END;
 
                WRAPPER html/row;
-                       INCLUDE html/cell colspan=5 content="<br>";
+                       INCLUDE html/cell colspan=4 content="<br>";
                END;
 
                WRAPPER html/row;
-                       INCLUDE html/cell colspan=5 content="<b>Attributes Available for Output</b>";
+                       INCLUDE html/cell colspan=4 content="<b>Attributes Available for Output</b>";
                END;
 
                FOR f_table IN params.dims.keys;
                        table = config.findnodes( "/reporter/tables/table[@id='$f_table']");
+                       classname = table.findvalue( "@id" );
                        tname = table.findvalue( "label" );
                        tdesc = table.findvalue( "desription" );
-
-                       NEXT IF table.findvalue('@fact-table') == 'true';
                        
                        WRAPPER html/row;
-                               INCLUDE html/cell;
                                INCLUDE html/cell colspan=4 align='left' content=tname;
                        END;
 
 
-                       FOR field IN table.findnodes('fields/field[not(@primary) or @primary != "true"]');
+                       fields_xpath =
+                               'fields/field[not(@primary) or @primary != "true"]';
+                       FOR field IN table.findnodes(fields_xpath);
+                               link_test = '../../links/link[@field="' _ field.findvalue('@name') _ '"]';
+                               logme(['link_test',link_test]);
+                               NEXT IF field.findnodes( link_test );
+
                                fname = field.findvalue( "label" );
+                               fid = field.findvalue( "@name" );
 
                                WRAPPER html/row;
 
-                                       INCLUDE html/cell colspan=2;
+                                       WRAPPER html/cell align='right';
+                                               INCLUDE checkbox name="output:$classname:$fid" value="include";
+                                       END;
                                        INCLUDE html/cell align='right' content=fname;
                                        WRAPPER html/cell align='center';
+                                               'Output Transformation: ';
+                                               dtype = field.findvalue('@datatype');
+                                               WRAPPER select name="xform:type:$classname:$fid";
+                                                       INCLUDE option value='' content='None' selected=1;
+                                                       FOR xform IN dtype_xform_map.$dtype;
+                                                               xform_label = dtype_xforms.$xform.label;
+                                                               IF dtype_xforms.$xform.param;
+                                                                       xform_label = "$xform_label (*)";
+                                                               END;
+                                                               INCLUDE option value=xform content=xform_label;
+                                                       END;
+                                               END;
+                                               '<br/>';
+                                               '<small><super>*</super>Output Tranformation Parameter: </small>';
+                                               INCLUDE text name="xform:param:$classname:$fid";
                                        END;
                                END;
                        END;
                END;
-
        END;
 
-       INCLUDE submit name="action" value="schedule";
+       INCLUDE checkbox name="publicreport" value="t";
+       'Public Report<br>';
+       INCLUDE submit name="action" value="Run Now";
+       INCLUDE submit name="action" value="Schedule";
 
        %]</form>[%
 END;
index 28dd313..0f6c3be 100644 (file)
@@ -22,22 +22,22 @@ WRAPPER html/table ;
 
        WRAPPER html/row;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:year' size=4 value=start.year;
+                       INCLUDE text name=input_prefix _ ':start-year' size=4 value=start.year;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:month' size=4 value=start.month;
+                       INCLUDE text name=input_prefix _ ':start-month' size=4 value=start.month;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:day' size=4 value=start.day;
+                       INCLUDE text name=input_prefix _ ':start-day' size=4 value=start.day;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:hour' size=4 value=start.hour;
+                       INCLUDE text name=input_prefix _ ':start-hour' size=4 value=start.hour;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:minute' size=4 value=start.minute;
+                       INCLUDE text name=input_prefix _ ':start-minute' size=4 value=start.minute;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:second' size=4 value=start.second;
+                       INCLUDE text name=input_prefix _ ':start-second' size=4 value=start.second;
                END;
        END;
 
@@ -56,22 +56,22 @@ WRAPPER html/table ;
 
        WRAPPER html/row;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:year' size=4 value=end.year;
+                       INCLUDE text name=input_prefix _ ':end-year' size=4 value=end.year;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:month' size=4 value=end.month;
+                       INCLUDE text name=input_prefix _ ':end-month' size=4 value=end.month;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:day' size=4 value=end.day;
+                       INCLUDE text name=input_prefix _ ':end-day' size=4 value=end.day;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:hour' size=4 value=end.hour;
+                       INCLUDE text name=input_prefix _ ':end-hour' size=4 value=end.hour;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:minute' size=4 value=end.minute;
+                       INCLUDE text name=input_prefix _ ':end-minute' size=4 value=end.minute;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:second' size=4 value=end.second;
+                       INCLUDE text name=input_prefix _ ':end-second' size=4 value=end.second;
                END;
        END;
 END;
index 75cabbb..65f2dd9 100644 (file)
@@ -7,9 +7,6 @@ USE end = DateTime(now = 1);
 PROCESS inputs;
 
 WRAPPER html/table ;
-       WRAPPER html/row;
-               INCLUDE html/cell colspan=2 align='center' content='Start time';
-       END;
 
        WRAPPER html/row;
                INCLUDE html/cell content='Year';
@@ -18,30 +15,13 @@ WRAPPER html/table ;
 
        WRAPPER html/row;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:year' size=4 value=start.year;
+                       INCLUDE text name=input_prefix _ ':start-year' size=4 value=start.year;
                END;
                WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':start:month' size=4 value=start.month;
+                       INCLUDE text name=input_prefix _ ':start-month' size=4 value=start.month;
                END;
        END;
 
-       WRAPPER html/row;
-               INCLUDE html/cell colspan=2 align='center' content='End time';
-       END;
-
-       WRAPPER html/row;
-               INCLUDE html/cell content='Year';
-               INCLUDE html/cell content='Month';
-       END;
-
-       WRAPPER html/row;
-               WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:year' size=4 value=end.year;
-               END;
-               WRAPPER html/cell;
-                       INCLUDE text name=input_prefix _ ':end:month' size=4 value=end.month;
-               END;
-       END;
 END;
 
 %]