3 <script type="text/javascript">
5 <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
6 /* this function open a popup to search on z3950 server. */
7 function PopupZ3950() {
8 var strQuery = GetZ3950Terms();
10 window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"+strQuery,"z3950search",'width=740,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes');
14 /* provide Z3950 search points */
15 function GetZ3950Terms(){
16 var strQuery="&frameworkcode=";
17 <!-- TMPL_LOOP NAME='z3950_search_params' -->
18 strQuery += "&" + "<!-- TMPL_VAR NAME="name" -->" + "=" + "<!-- TMPL_VAR NAME="encvalue" -->";
23 function addToShelf() { window.open('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->','Add_to_virtualshelf','width=500,height=400,toolbar=false,scrollbars=yes');
25 function printBiblio() {window.open('/cgi-bin/koha/catalogue/detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->','Print_Biblio','width=700,height=500,toolbar=false,scrollbars=yes');
27 function confirm_deletion() {
28 var count = <!-- TMPL_VAR NAME="count" -->;
31 is_confirmed= alert(_('There are [ '+ count +' ] item(s) attached to this record \n You must delete all items before deleting this record.'));
33 is_confirmed= confirm(_('Are you sure you want to delete this record? '));
38 // window.location="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->";
40 window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->";
46 function confirm_items_deletion() {
47 var count = <!-- TMPL_VAR NAME="count" -->;
49 if(confirm(_('Are you sure you want to delete the ' + count + ' attached items? '))){
50 window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->";
56 // prepare DOM for YUI Toolbar
58 $(document).ready(function() {
59 $("#edititems").parent().remove();
60 $("#duplicatebiblio").parent().remove();
61 $("#deletebiblio").parent().remove();
62 $("#newitem").parent().remove();
63 $("#newsub").parent().remove();
64 $("#editmenuc").empty();
65 $("#newmenuc").empty();
66 $("#addtoshelfc").empty();
67 $("#printbiblioc").empty();
68 $("#export").remove();
69 $("#addtoshelfc").before("<li id=\"savemenuc\"><\/li>");
70 $("#z3950searchc").empty();
74 // YUI Toolbar Functions
76 function yuiToolbar() {
78 {text: _("New Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl" },
79 {text: _("New Item"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#additema" },
80 {text: _("New Subscription"), url: "/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=<!-- TMPL_VAR NAME="biblionumber" -->"},
84 { text: _("Edit Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=&op=" },
85 { text: _("Edit Items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" },
86 { text: _("Attach Item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" },
87 { text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=&op=duplicate" },
88 { text: _("Delete Record"), onclick: {fn: confirm_deletion }<!-- TMPL_IF NAME="count" -->,id:'disabled'<!-- /TMPL_IF --> },
89 { text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } }
93 { text: _("MODS (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=mods&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" },
94 { text: _("Dublin Core (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=dc&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" },
95 { text: _("MARCXML"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcxml&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" },
96 { text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marc8&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" },
97 { text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }
100 new YAHOO.widget.Button({
103 name: "savemenubutton",
105 container: "savemenuc"
108 new YAHOO.widget.Button({
111 name: "editmenubutton",
113 container: "editmenuc"
116 new YAHOO.widget.Button({
119 name: "newmenubutton",
121 container: "newmenuc"
124 new YAHOO.widget.Button({
127 label: _("z39.50 Search"),
128 container: "z3950searchc",
129 onclick: {fn:function(){PopupZ3950()}}
132 var addtoshelfButton = new YAHOO.widget.Button({
135 label: _("Add to List"),
136 container: "addtoshelfc",
137 onclick: {fn: addToShelf }
140 var printbiblioButton = new YAHOO.widget.Button({
144 container: "printbiblioc",
145 onclick: {fn: printBiblio }
148 var newbiblioButton = new YAHOO.widget.Button("newbiblio");
149 var placeholdButton = new YAHOO.widget.Button("placehold");
156 <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();">
159 <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
160 <li id="newmenuc"><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New Record</a></li>
161 <li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">New Item</a></li>
162 <li><a id="newsub" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=<!-- TMPL_VAR NAME="biblionumber" -->">New Subscription</a></li>
163 <li id="editmenuc"><a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=<!--TMPL_VAR Name="current_framework" -->&op=">Edit Record</a></li>
164 <li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit Items</a></li>
165 <li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=<!--TMPL_VAR Name="current_framework" -->&op=duplicate">Duplicate Record</a></li>
166 <li><a id="deletebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Delete</a></li>
168 <li id="addtoshelfc"><a id="addtoshelf" href="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Add to shelf</a></li>
169 <li id="printbiblioc"><a id="printbiblio" href="/cgi-bin/koha/catalogue/detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Print</a></li>
170 <!-- TMPL_IF NAME="CAN_user_reserveforothers" -->
171 <!-- TMPL_UNLESS name="bi_notforloan" -->
172 <!-- TMPL_UNLESS NAME="norequests" --><li><a id="placehold" href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Place Hold</a></li><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS -->
174 <!-- TMPL_IF NAME="CAN_user_editcatalogue" --><li id="z3950searchc"><input type="button" id="z3950search" value="z39.50 Search" onclick="PopupZ3950(); return false;" /></li><!-- /TMPL_IF -->