[18/30] Patron Card Creator toolbar
authorChris Nighswonger <cnighswonger@foundations.edu>
Tue, 3 Nov 2009 14:19:38 +0000 (09:19 -0500)
committerChris Nighswonger <cnighswonger@foundations.edu>
Mon, 11 Jan 2010 23:21:14 +0000 (18:21 -0500)
Code for the toolbar which appears at the top of most screens within the
    Patron Card Creator.

koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-toolbar.inc [new file with mode: 0644]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-toolbar.inc
new file mode 100644 (file)
index 0000000..65ee1ea
--- /dev/null
@@ -0,0 +1,75 @@
+<script type="text/javascript">
+    //<![CDATA[
+    // prepare DOM for YUI Toolbar
+    $(document).ready(function() {
+        $("#layoutsc").empty();
+        $("#templatesc").empty();
+        $("#profilesc").empty();
+        $("#batches").empty();
+        yuiToolbar();
+     });
+
+    // YUI Toolbar Functions
+    function yuiToolbar() {
+        var layouts = [
+                {text: _("Manage Layouts"), url: "/cgi-bin/koha/patroncards/manage.pl?card_element=layout" },
+                {text: _("New Layout"), url: "/cgi-bin/koha/patroncards/edit-layout.pl?op=new" }
+        ];
+
+        var templates = [
+                {text: _("Manage Templates"), url: "/cgi-bin/koha/patroncards/manage.pl?card_element=template" },
+                {text: _("New Template"), url: "/cgi-bin/koha/patroncards/edit-template.pl?op=new" }
+        ];
+
+        var profiles = [
+                {text: _("Manage Profiles"), url: "/cgi-bin/koha/patroncards/manage.pl?card_element=profile" },
+                {text: _("New Profile"), url: "/cgi-bin/koha/patroncards/edit-profile.pl?op=new" }
+        ];
+
+        var batches = [
+                {text: _("Manage Batches"), url: "/cgi-bin/koha/patroncards/manage.pl?card_element=batch" },
+                {text: _("New Batch"), url: "/cgi-bin/koha/patroncards/edit-batch.pl?op=new" }
+        ];
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Layouts"),
+            name: "layouts",
+            menu: layouts,
+            container: "layoutsc"
+        });
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Templates"),
+            name: "templates",
+            menu: templates,
+            container: "templatesc"
+        });
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Profiles"),
+            name: "profiles",
+            menu: profiles,
+            container: "profilesc"
+        });
+
+        new YAHOO.widget.Button({
+            type: "menu",
+            label: _("Batches"),
+            name: "batches",
+            menu: batches,
+            container: "batchesc"
+        });
+    }
+//]]>
+</script>
+<div id="toolbar">
+    <ul class="toolbar">
+        <li id="layoutsc"><a id="layouts" href="#">Layouts</a></li>
+        <li id="templatesc"><a id="templates" href="#">Templates</a></li>
+        <li id="profilesc"><a id="profiles" href="#">Profiles</a></li>
+        <li id="batchesc"><a id="batches" href="#">Batches</a></li>
+    </ul>
+</div>