committing mike's templates
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Nov 2005 20:53:36 +0000 (20:53 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Nov 2005 20:53:36 +0000 (20:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1936 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/reporter/templates/dashboard.ttk
Open-ILS/src/reporter/templates/stage2.ttk
Open-ILS/src/reporter/templates/stage3.ttk

index 09f2700..56edd33 100644 (file)
@@ -7,6 +7,7 @@ PROCESS logic_header.ttk;
 
 pagetype = CGI.param('detail');
 
+%] <style> table {border-collapse:collapse;}</style> [%
 
 SWITCH pagetype;
        CASE 'myreports';
@@ -78,7 +79,7 @@ BLOCK summary;
                                style='border-bottom:1px solid black';
                END;
                WRAPPER html/row;
-                       WRAPPER html/cell colspan=2 valign='top' style='height:200px';
+                       WRAPPER html/cell colspan=2 valign='top';
                                INCLUDE fact_tables;
                        END;
                END;
@@ -114,11 +115,11 @@ END;
 BLOCK show_reports;
        WRAPPER html/table width='100%';
                WRAPPER html/row;
-                       INCLUDE html/cell content='Public' nowrap='nowrap' col='lightgray';
-                       INCLUDE html/cell content='Report Name' nowrap='nowrap' col='lightgray';
-                       INCLUDE html/cell content='Created at' nowrap='nowrap' col='lightgray';
-                       INCLUDE html/cell content='Scheduled Run Date' nowrap='nowrap' col='lightgray';
-                       INCLUDE html/cell content='Recurrence' nowrap='nowrap' col='lightgray';
+                       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='Created at' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
+                       INCLUDE html/cell content='Scheduled Run Date' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
+                       INCLUDE html/cell content='Recurrence' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
                END;
                FOR report = DBI.query(q);
                        bg='lightblue';
@@ -127,11 +128,11 @@ BLOCK show_reports;
                        END;
                        WRAPPER html/row;
                                p = utils.JSON2perl( report.params );
-                               INCLUDE html/cell content=(report.pub ? 'Y' : 'N') col=bg;
-                               INCLUDE html/cell content=p.reportname col=bg;
-                               INCLUDE html/cell content=report.create_date.chunk(10).0 col=bg;
-                               INCLUDE html/cell content=report.runtime.chunk(10).0 col=bg;
-                               INCLUDE html/cell content=report.recurrence col=bg;
+                               INCLUDE html/cell content=(report.pub ? 'Y' : 'N') col=bg style='border:solid gray 1px;' align='center';
+                               INCLUDE html/cell content=p.reportname col=bg style='border:solid gray 1px;';
+                               INCLUDE html/cell content=report.create_date.chunk(10).0 col=bg style='border:solid gray 1px;';
+                               INCLUDE html/cell content=report.runtime.chunk(10).0 col=bg style='border:solid gray 1px;';
+                               INCLUDE html/cell content=report.recurrence col=bg style='border:solid gray 1px;';
                        END;
                END;
        END;
@@ -164,11 +165,11 @@ BLOCK public_templates;
 END;
 
 BLOCK show_templates;
-       WRAPPER html/table width='100%';
+       WRAPPER html/table width='100%' class='withborder';
                WRAPPER html/row;
-                       INCLUDE html/cell content='Public' nowrap='nowrap' col='lightgray';
-                       INCLUDE html/cell content='Template Name' nowrap='nowrap' col='lightgray';
-                       INCLUDE html/cell content='Created at' nowrap='nowrap' col='lightgray';
+                       INCLUDE html/cell content='Public' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
+                       INCLUDE html/cell content='Template Name' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
+                       INCLUDE html/cell content='Created at' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
                END;
                FOR template = DBI.query(q);
                        tid = template.id;
@@ -178,20 +179,19 @@ BLOCK show_templates;
                        END;
                        WRAPPER html/row;
                                p = utils.JSON2perl( template.params );
-                               INCLUDE html/cell content=(template.pub ? 'Y' : 'N') col=bg;
-                               INCLUDE html/cell content=link(content=p.templatename,href="stage2?id=$tid") col=bg;
-                               INCLUDE html/cell content=template.create_date.chunk(10).0 col=bg;
-                               INCLUDE html/cell content=template.recurrence col=bg;
+                               INCLUDE html/cell content=(template.pub ? 'Y' : 'N') col=bg style='border:solid gray 1px;' align='center';
+                               INCLUDE html/cell content=link(content=p.templatename,href="stage2?id=$tid") col=bg style='border:solid gray 1px;';
+                               INCLUDE html/cell content=template.create_date.chunk(10).0 col=bg style='border:solid gray 1px;';
                        END;
                END;
        END;
 END;
 
 BLOCK fact_tables;
-       WRAPPER html/table width='100%';
+       WRAPPER html/table width='100%' class='withborder';
                WRAPPER html/row;
-                       INCLUDE html/cell content='Fact table' nowrap='nowrap' col='lightgray';
-                       INCLUDE html/cell content='Description' nowrap='nowrap' col='lightgray';
+                       INCLUDE html/cell content='Fact table' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
+                       INCLUDE html/cell content='Description' nowrap='nowrap' col='lightgray' style='border:solid gray 1px;';
                END;
                FOR tab IN config.findnodes("/reporter/tables/table[@fact-table='true']");
                        tid = tab.findvalue('@id');
@@ -203,8 +203,8 @@ BLOCK fact_tables;
                                p = utils.JSON2perl( template.params );
                                INCLUDE html/cell
                                        col=bg
-                                       content=link(content=tab.findvalue('tablename'),href="stage1?id=$tid");
-                               INCLUDE html/cell content=tab.findvalue('description');
+                                       content=link(content=tab.findvalue('tablename'),href="stage1?id=$tid") style='border:solid gray 1px;';
+                               INCLUDE html/cell content=tab.findvalue('description') style='border:solid gray 1px;';
                        END;
                END;
    END;
index 5b1f3a6..3928e7c 100644 (file)
@@ -191,7 +191,7 @@ BLOCK run_stage2;
        WRAPPER form id="stage3_new" name="stage3_new" action="stage3" method="POST";
                INCLUDE hidden name='stage2' value=CGI.param('id');
 
-               '<br>Name:';
+               '<br>Report Name:';
                INCLUDE text name='reportname';
 
                WRAPPER html/table border=0 width='100%';
@@ -269,6 +269,20 @@ BLOCK run_stage2;
                                        INCLUDE html/cell colspan=4 align='left' content=tname;
                                END;
 
+                               IF loop.first;
+                                       pkey_field = table.findnodes('fields/field[@primary = "true"]');
+                                       pid = pkey_field.findvalue('@name');
+                                       plabel = pkey_field.findvalue('label');
+                                       
+                                       WRAPPER html/row;
+                                               WRAPPER html/cell align='right';
+                                                       INCLUDE checkbox checked='checked' name="output:$classname:$pid" value="include";
+                                                       INCLUDE hidden name="xform:type:$classname:$pid" value="count_dist";
+                                               END;
+                                               INCLUDE html/cell align='right' content="Per group count of $plabel";
+                                               INCLUDE html/cell align='center';
+                                       END;
+                               END;
 
                                fields_xpath =
                                        'fields/field[not(@primary) or @primary != "true"]';
index 4e251b7..16fd804 100644 (file)
@@ -42,15 +42,15 @@ END;
 BLOCK schedule_stage3;
        WRAPPER form method='POST';
                'Run Date:';
-               INCLUDE text name='runtime' value='yyyy/mm/dd';
+               INCLUDE text name='runtime' value='yyyy-mm-dd';
                '<br>';
 
                'Optional Recurrence:';
                INCLUDE text name='recurrence-count' value='0';
                WRAPPER select name='recurrence-interval';
                        INCLUDE option value='days' content='Day(s)';
-                       INCLUDE option value='weeks' content='Weeks(s)';
-                       INCLUDE option value='months' content='Months(s)';
+                       INCLUDE option value='weeks' content='Week(s)';
+                       INCLUDE option value='months' content='Month(s)';
                END;
 
                FOR p IN CGI.param();