Fourth installment Patron card generation feature
authorChris Nighswonger <cnighswonger@foundations.edu>
Mon, 17 Mar 2008 14:43:54 +0000 (10:43 -0400)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 18 Mar 2008 01:43:06 +0000 (20:43 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/tools-labels-batches-toolbar.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/includes/tools-labels-toolbar.inc
labels/label-print-pdf.pl

index c5a11eb..3a2cc28 100644 (file)
@@ -698,7 +698,7 @@ fieldset.rows .inputnote {
     visibility:visible; /* you propably don't need to change this one */
     display:block;
 }
-#newbiblio a, #addchild a, #newentry a, #newshelf a, #newmenuc .first-child, #newsupplier .first-child, #newlabel a, #newtemplate a, #newbatch a, #newprofile a, #newsubscription a, #newdictionary a, #neworder a {
+#newbiblio a, #addchild a, #newentry a, #newshelf a, #newmenuc .first-child, #newsupplier .first-child, #newlabel a, #newtemplate a, #newlabelbatch a, #newpatroncardbatch a, #newprofile a, #newsubscription a, #newdictionary a, #neworder a {
        padding-left : 34px;
        background-image: url("../../img/toolbar-new.gif");
        background-position : center left;
@@ -1474,4 +1474,4 @@ ul#i18nMenu li.more ul li a {
        display : block;
        color : #999;
        font-style : italic;
-}
\ No newline at end of file
+}
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-labels-batches-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-labels-batches-toolbar.inc
new file mode 100644 (file)
index 0000000..08c8d7c
--- /dev/null
@@ -0,0 +1,35 @@
+<div id="toolbar">
+       <script type="text/javascript">
+       //<![CDATA[
+
+       // prepare DOM for YUI Toolbar
+
+        $(document).ready(function() {
+               $("#additemsc").empty();
+           yuiToolbar();
+        });
+
+       // YUI Toolbar Functions
+
+       function yuiToolbar() {
+               new YAHOO.widget.Button({
+                                            id: "additems", 
+                                            type: "button", 
+                                            label: "Add item(s) to batch", 
+                                            container: "additemsc",
+                                                                                       onclick: {fn:function(){Plugin(<!-- TMPL_VAR NAME="batch_id" -->)}}
+                                        });
+               new YAHOO.widget.Button("deletebatch");
+               new YAHOO.widget.Button("dedup");
+               new YAHOO.widget.Button("generate");
+       }
+
+       //]]>
+       </script>
+       <ul class="toolbar">
+       <li id="additemsc"><a id="additems" href="#" onclick="Plugin(<!-- TMPL_VAR NAME="batch_id" -->); return false;">Add item(s) to batch</a></li>
+       <li><a id="deletebatch" href="/cgi-bin/koha/labels/label-manager.pl?op=delete_batch&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=<!-- TMPL_VAR NAME="batch_type" -->">Delete current batch</a></li>
+                               <!-- FIXME: should use POST to change server state, not GET -->
+       <li><a id="dedup" href="/cgi-bin/koha/labels/label-manager.pl?op=deduplicate&amp;batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=<!-- TMPL_VAR NAME="batch_type" -->">Remove duplicate barcodes</a></li>
+       <li><a id="generate" href="/cgi-bin/koha/labels/label-print-pdf.pl?batch_id=<!-- TMPL_VAR NAME="batch_id" -->&amp;type=<!-- TMPL_VAR NAME="batch_type" -->">Generate PDF for Batch</a></li>
+</ul></div>
index 7a19c52..144b0d6 100644 (file)
@@ -14,7 +14,8 @@
            new YAHOO.widget.Button("newlabel");
            new YAHOO.widget.Button("newtemplate");
            new YAHOO.widget.Button("newprofile");
-           new YAHOO.widget.Button("newbatch");
+           new YAHOO.widget.Button("newlabelbatch");
+           new YAHOO.widget.Button("newpatroncardbatch");
        }
 
        //]]>
@@ -23,5 +24,6 @@
        <li><a id="newlabel" href="/cgi-bin/koha/labels/label-create-layout.pl">New Layout</a></li>
        <li><a id="newtemplate" href="/cgi-bin/koha/labels/label-create-template.pl?op=blank">New Label Template</a></li>
        <li><a id="newprofile" href="/cgi-bin/koha/labels/label-create-profile.pl?op=blank">New Printer Profile</a></li>
-       <li><a id="newbatch" href="/cgi-bin/koha/labels/label-manager.pl?op=add_batch">New Label Batch</a></li>
+       <li><a id="newlabelbatch" href="/cgi-bin/koha/labels/label-manager.pl?op=add_batch&amp;type=labels">New Label Batch</a></li>
+       <li><a id="newpatroncardbatch" href="/cgi-bin/koha/labels/label-manager.pl?op=add_batch&amp;type=patroncards">New Patron Card Batch</a></li>
 </ul></div>
index cb0939c..d21c193 100755 (executable)
@@ -49,7 +49,7 @@ my $units        = $template->{'units'};
 if ($printingtype eq 'PATCRD') {
     @resultsloop = GetPatronCardItems($batch_id);
 } else {
-    @resultsloop = get_label_items($batch_id);
+    @resultsloop = GetLabelItems($batch_id);
 }
 
 #warn "UNITS $units";