add stage3s to the template tree for clone+edit
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Dec 2005 23:37:24 +0000 (23:37 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Dec 2005 23:37:24 +0000 (23:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2558 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index c1e9421..63f3c20 100644 (file)
@@ -292,6 +292,23 @@ BLOCK report_template_tree;
                                        '$p.templatename'
                                );
                        </script>";
+
+                       q3 = "SELECT * FROM reporter.stage3 WHERE (pub is true" _
+                               " or owner = " _ user.id() _ ") and stage2 = '$s2id' ORDER BY create_date DESC";
+                       FOR report = DBI.query(q3);
+                               p = utils.JSON2perl( report.params );
+                               s3id = report.id;
+                               "<script language='javascript'>
+                                       tree_" _ counter _ ".addNode(
+                                               'r_$report.id',
+                                               $template.id,
+                                               '$p.reportname',
+                                               'stage2?action=edit&id=$s2id&report=$s3id',
+                                               '$p.reportname'
+                                       );
+                               </script>";
+                       END;
+
                END;
        END;
 END;