|
Lines 25-30
Link Here
|
| 25 |
} |
25 |
} |
| 26 |
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'); |
26 |
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 |
} |
27 |
} |
|
|
28 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> |
| 28 |
function confirm_deletion() { |
29 |
function confirm_deletion() { |
| 29 |
var count = <!-- TMPL_VAR NAME="count" -->; |
30 |
var count = <!-- TMPL_VAR NAME="count" -->; |
| 30 |
var is_confirmed; |
31 |
var is_confirmed; |
|
Lines 44-49
function confirm_deletion() {
Link Here
|
| 44 |
return false; |
45 |
return false; |
| 45 |
} |
46 |
} |
| 46 |
} |
47 |
} |
|
|
48 |
<!-- /TMPL_IF --> |
| 49 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" --> |
| 47 |
function confirm_items_deletion() { |
50 |
function confirm_items_deletion() { |
| 48 |
var count = <!-- TMPL_VAR NAME="count" -->; |
51 |
var count = <!-- TMPL_VAR NAME="count" -->; |
| 49 |
if(count > 0){ |
52 |
if(count > 0){ |
|
Lines 54-178
function confirm_items_deletion() {
Link Here
|
| 54 |
} |
57 |
} |
| 55 |
} |
58 |
} |
| 56 |
} |
59 |
} |
|
|
60 |
<!-- /TMPL_IF --> |
| 57 |
// prepare DOM for YUI Toolbar |
61 |
// prepare DOM for YUI Toolbar |
| 58 |
|
62 |
|
| 59 |
$(document).ready(function() { |
63 |
$(document).ready(function() { |
| 60 |
$("#edititems").parent().remove(); |
64 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->$("#edititems").parent().remove(); |
| 61 |
$("#duplicatebiblio").parent().remove(); |
65 |
$("#newitem").parent().remove();<!-- /TMPL_IF --> |
|
|
66 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->$("#duplicatebiblio").parent().remove(); |
| 62 |
$("#deletebiblio").parent().remove(); |
67 |
$("#deletebiblio").parent().remove(); |
| 63 |
$("#newitem").parent().remove(); |
68 |
$("#z3950searchc").empty();<!-- /TMPL_IF --> |
| 64 |
$("#newsub").parent().remove(); |
69 |
<!-- TMPL_IF NAME="CAN_user_serials_create_subscription" -->$("#newsub").parent().remove();<!-- /TMPL_IF --> |
| 65 |
$("#editmenuc").empty(); |
70 |
$("#newbiblio").parent().remove(); |
| 66 |
$("#newmenuc").empty(); |
71 |
$("#editbiblio").parent().remove(); |
| 67 |
$("#addtoshelfc").empty(); |
72 |
$("#addtoshelf").parent().remove(); |
| 68 |
$("#printbiblioc").empty(); |
73 |
$("#printbiblio").parent().remove(); |
|
|
74 |
$("#placehold").parent().remove(); |
| 69 |
$("#export").remove(); |
75 |
$("#export").remove(); |
| 70 |
$("#addtoshelfc").before("<li id=\"savemenuc\"><\/li>"); |
|
|
| 71 |
$("#z3950searchc").empty(); |
| 72 |
yuiToolbar(); |
| 73 |
}); |
76 |
}); |
| 74 |
|
77 |
|
| 75 |
// YUI Toolbar Functions |
78 |
YAHOO.util.Event.onContentReady("cattoolbar", function () { |
| 76 |
|
79 |
// Menu for new record, new item, new subscription |
| 77 |
function yuiToolbar() { |
|
|
| 78 |
var newmenu = [ |
80 |
var newmenu = [ |
| 79 |
{text: _("New Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl" }, |
81 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->{text: _("New Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl" },<!-- /TMPL_IF --> |
| 80 |
{text: _("New Item"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#additema" }, |
82 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->{text: _("New Item"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#additema" },<!-- /TMPL_IF --> |
| 81 |
{text: _("New Subscription"), url: "/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=<!-- TMPL_VAR NAME="biblionumber" -->"}, |
83 |
<!-- TMPL_IF NAME="CAN_user_serials_create_subscription" --> |
|
|
84 |
{text: _("New Subscription"), url: "/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=<!-- TMPL_VAR NAME="biblionumber" -->"},<!-- /TMPL_IF --> |
| 82 |
]; |
85 |
]; |
| 83 |
|
86 |
if(newmenu.length){ |
|
|
87 |
new YAHOO.widget.Button({ |
| 88 |
type: "menu", |
| 89 |
label: _("New"), |
| 90 |
id: "newmenuc", |
| 91 |
name: "newmenubutton", |
| 92 |
menu: newmenu, |
| 93 |
container: this |
| 94 |
}); |
| 95 |
} |
| 84 |
var editmenu = [ |
96 |
var editmenu = [ |
| 85 |
{ text: _("Edit Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=&op=" }, |
97 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->{ text: _("Edit Record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=&op=" },<!-- /TMPL_IF --> |
| 86 |
{ text: _("Edit Items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
98 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->{ text: _("Edit Items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" },<!-- /TMPL_IF --> |
| 87 |
{ text: _("Attach Item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
99 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->{ text: _("Attach Item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" },<!-- /TMPL_IF --> |
| 88 |
{ text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=&op=duplicate" }, |
100 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->{ text: _("Edit as New (Duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode=&op=duplicate" },<!-- /TMPL_IF --> |
| 89 |
{ text: _("Delete Record"), onclick: {fn: confirm_deletion }<!-- TMPL_IF NAME="count" -->,id:'disabled'<!-- /TMPL_IF --> }, |
101 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->{ text: _("Delete Record"), onclick: {fn: confirm_deletion }<!-- TMPL_IF NAME="count" -->,id:'disabled'<!-- /TMPL_IF --> },<!-- /TMPL_IF --> |
| 90 |
{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion }<!-- TMPL_UNLESS NAME="count" -->,id:'disabled'<!-- /TMPL_UNLESS --> } |
102 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" -->{ text: _("Delete all Items"), onclick: {fn: confirm_items_deletion } }<!-- /TMPL_IF --> |
| 91 |
]; |
103 |
]; |
| 92 |
|
104 |
if(editmenu.length){ |
|
|
105 |
new YAHOO.widget.Button({ |
| 106 |
type: "menu", |
| 107 |
label: _("Edit"), |
| 108 |
id: "editmenuc", |
| 109 |
name: "editmenubutton", |
| 110 |
menu: editmenu, |
| 111 |
container: this |
| 112 |
}); |
| 113 |
} |
| 93 |
var savemenu = [ |
114 |
var savemenu = [ |
| 94 |
{ text: _("MODS (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=mods&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
115 |
{ text: _("MODS (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=mods&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
| 95 |
{ text: _("Dublin Core (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=dc&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
116 |
{ text: _("Dublin Core (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=dc&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
| 96 |
{ text: _("MARCXML"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcxml&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
117 |
{ text: _("MARCXML"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcxml&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
| 97 |
{ text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marc8&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
118 |
{ text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marc8&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" }, |
| 98 |
{ text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" } |
119 |
{ text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=<!-- TMPL_VAR NAME="biblionumber" -->" } |
| 99 |
]; |
|
|
| 100 |
|
| 101 |
var addtomenu = [ |
| 102 |
{ text: _("Cart"), onclick: { fn: addToCart } }, |
| 103 |
{ text: _("List"), onclick: { fn: addToShelf } } |
| 104 |
]; |
120 |
]; |
| 105 |
|
121 |
|
| 106 |
new YAHOO.widget.Button({ |
122 |
new YAHOO.widget.Button({ |
| 107 |
type: "menu", |
123 |
type: "menu", |
| 108 |
label: _("Save"), |
124 |
label: _("Save"), |
|
|
125 |
id: "savemenuc", |
| 109 |
name: "savemenubutton", |
126 |
name: "savemenubutton", |
| 110 |
menu: savemenu, |
127 |
menu: savemenu, |
| 111 |
container: "savemenuc" |
128 |
container: this |
| 112 |
}); |
|
|
| 113 |
|
| 114 |
new YAHOO.widget.Button({ |
| 115 |
type: "menu", |
| 116 |
label: _("Edit"), |
| 117 |
name: "editmenubutton", |
| 118 |
menu: editmenu, |
| 119 |
container: "editmenuc" |
| 120 |
}); |
129 |
}); |
| 121 |
|
130 |
|
| 122 |
new YAHOO.widget.Button({ |
131 |
var addtomenu = [ |
| 123 |
type: "menu", |
132 |
{ text: _("Cart"), onclick: { fn: addToCart } }, |
| 124 |
label: _("New"), |
133 |
{ text: _("List"), onclick: { fn: addToShelf } } |
| 125 |
name: "newmenubutton", |
134 |
]; |
| 126 |
menu: newmenu, |
|
|
| 127 |
container: "newmenuc" |
| 128 |
}); |
| 129 |
|
135 |
|
| 130 |
new YAHOO.widget.Button({ |
136 |
new YAHOO.widget.Button({ |
| 131 |
type: "menu", |
137 |
type: "menu", |
| 132 |
label: _("Add to"), |
138 |
label: _("Add to"), |
| 133 |
name: "addtomenubutton", |
139 |
name: "addtomenubutton", |
| 134 |
menu: addtomenu, |
140 |
menu: addtomenu, |
| 135 |
container: "addtoshelfc" |
141 |
container: this |
| 136 |
}); |
142 |
}); |
| 137 |
|
143 |
|
| 138 |
new YAHOO.widget.Button({ |
144 |
new YAHOO.widget.Button({ |
| 139 |
id: "z3950search", |
145 |
id: "printbiblio", |
|
|
146 |
type: "button", |
| 147 |
label: _("Print"), |
| 148 |
container: this, |
| 149 |
onclick: {fn: printBiblio } |
| 150 |
}); |
| 151 |
|
| 152 |
new YAHOO.widget.Button({ |
| 153 |
id: "placehold", |
| 154 |
type: "link", |
| 155 |
label: _("Place hold"), |
| 156 |
container: this, |
| 157 |
href: "/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" |
| 158 |
}); |
| 159 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> |
| 160 |
new YAHOO.widget.Button({ |
| 161 |
id: "z3950search", |
| 140 |
type: "button", |
162 |
type: "button", |
| 141 |
label: _("Z39.50 Search"), |
163 |
label: _("Z39.50 Search"), |
| 142 |
container: "z3950searchc", |
164 |
container: this, |
| 143 |
onclick: {fn:function(){PopupZ3950()}} |
165 |
onclick: {fn:function(){PopupZ3950()}} |
| 144 |
}); |
166 |
}); |
| 145 |
|
167 |
<!-- /TMPL_IF --> |
| 146 |
var printbiblioButton = new YAHOO.widget.Button({ |
168 |
}); |
| 147 |
id: "printbiblio", |
|
|
| 148 |
type: "button", |
| 149 |
label: _("Print"), |
| 150 |
container: "printbiblioc", |
| 151 |
onclick: {fn: printBiblio } |
| 152 |
}); |
| 153 |
|
| 154 |
var newbiblioButton = new YAHOO.widget.Button("newbiblio"); |
| 155 |
var placeholdButton = new YAHOO.widget.Button("placehold"); |
| 156 |
|
| 157 |
} |
| 158 |
|
| 159 |
//]]> |
169 |
//]]> |
| 160 |
</script> |
170 |
</script> |
| 161 |
|
171 |
|
| 162 |
<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();"> |
172 |
<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();"> |
| 163 |
|
173 |
|
| 164 |
<ul class="toolbar"> |
174 |
<ul class="toolbar" id="cattoolbar"> |
|
|
175 |
|
| 165 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> |
176 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> |
| 166 |
<li id="newmenuc"><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New Record</a></li> |
177 |
<li><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New Record</a></li> |
|
|
178 |
<!-- /TMPL_IF --> |
| 179 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" --> |
| 167 |
<li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">New Item</a></li> |
180 |
<li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">New Item</a></li> |
|
|
181 |
<!-- /TMPL_IF --> |
| 182 |
<!-- TMPL_IF NAME="CAN_user_serials_create_subscription" --> |
| 168 |
<li><a id="newsub" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=<!-- TMPL_VAR NAME="biblionumber" -->">New Subscription</a></li> |
183 |
<li><a id="newsub" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=<!-- TMPL_VAR NAME="biblionumber" -->">New Subscription</a></li> |
| 169 |
<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> |
184 |
<!-- /TMPL_IF --> |
|
|
185 |
|
| 186 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> |
| 187 |
<li><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> |
| 188 |
<!-- /TMPL_IF --> |
| 189 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_items" --> |
| 170 |
<li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit Items</a></li> |
190 |
<li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit Items</a></li> |
|
|
191 |
<!-- /TMPL_IF --> |
| 192 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> |
| 171 |
<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> |
193 |
<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> |
|
|
194 |
<!-- /TMPL_IF --> |
| 195 |
<!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" --> |
| 172 |
<li><a id="deletebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Delete</a></li> |
196 |
<li><a id="deletebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Delete</a></li> |
| 173 |
<!-- /TMPL_IF --> |
197 |
<!-- /TMPL_IF --> |
| 174 |
<li id="addtoshelfc"><a id="addtoshelf" href="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Add to shelf</a></li> |
198 |
|
| 175 |
<li id="printbiblioc"><a id="printbiblio" href="/cgi-bin/koha/catalogue/detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Print</a></li> |
199 |
<li><a id="addtoshelf" href="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Add to shelf</a></li> |
|
|
200 |
<li><a id="printbiblio" href="/cgi-bin/koha/catalogue/detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Print</a></li> |
| 176 |
<!-- TMPL_IF NAME="CAN_user_reserveforothers" --> |
201 |
<!-- TMPL_IF NAME="CAN_user_reserveforothers" --> |
| 177 |
<!-- 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 --> |
202 |
<!-- 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 --> |
| 178 |
<!-- /TMPL_IF --> |
203 |
<!-- /TMPL_IF --> |