Lines 1-5
Link Here
|
1 |
<div id="toolbar"> |
|
|
2 |
|
3 |
<script type="text/javascript"> |
1 |
<script type="text/javascript"> |
4 |
//<![CDATA[ |
2 |
//<![CDATA[ |
5 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
3 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
Lines 74-259
Link Here
|
74 |
} |
72 |
} |
75 |
} |
73 |
} |
76 |
[% END %] |
74 |
[% END %] |
77 |
// prepare DOM for YUI Toolbar |
|
|
78 |
|
79 |
$(document).ready(function() { |
75 |
$(document).ready(function() { |
80 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]$("#edititems").parent().remove(); |
76 |
$("#z3950copy").click(function(){ |
81 |
$("#newitem").parent().remove();[% END %] |
77 |
PopupZ3950(); |
82 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]$("#duplicatebiblio").parent().remove(); |
78 |
return false; |
83 |
$("#deletebiblio").parent().remove(); |
79 |
}); |
84 |
$("#z3950searchc").empty();[% END %] |
80 |
$("#deletebiblio").click(function(){ |
85 |
[% IF ( CAN_user_serials_create_subscription ) %]$("#newsub").parent().remove();[% END %] |
81 |
confirm_deletion(); |
86 |
$("#newbiblio").parent().remove(); |
82 |
return false; |
87 |
$("#editbiblio").parent().remove(); |
83 |
}); |
88 |
$("#addtoshelf").parent().remove(); |
84 |
$("#deleteallitems").click(function(){ |
89 |
$("#printbiblio").parent().remove(); |
85 |
confirm_items_deletion(); |
90 |
$("#placehold").parent().remove(); |
86 |
return false; |
91 |
$("#export").remove(); |
87 |
}); |
|
|
88 |
$("#printbiblio").click(function(){ |
89 |
printBiblio(); |
90 |
return false; |
91 |
}); |
92 |
$("#addtocart").click(function(){ |
93 |
addToCart(); |
94 |
$(".btn-group").removeClass("open"); |
95 |
return false; |
96 |
}); |
97 |
$("#addtoshelf").click(function(){ |
98 |
addToShelf(); |
99 |
$(".btn-group").removeClass("open"); |
100 |
return false; |
101 |
}); |
102 |
$("#export").remove(); // Hide embedded export form if JS menus available |
92 |
}); |
103 |
}); |
|
|
104 |
//]]> |
105 |
</script> |
106 |
|
107 |
<div id="toolbar" class="btn-toolbar"> |
93 |
|
108 |
|
94 |
YAHOO.util.Event.onContentReady("cattoolbar", function () { |
109 |
<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();"> |
95 |
// Menu for new record, new item, new subscription |
110 |
|
96 |
var newmenu = [ |
111 |
[% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || |
97 |
[% IF CAN_user_editcatalogue_edit_catalogue %] |
112 |
CAN_user_serials_create_subscription ) %] |
98 |
{text: _("New record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl" }, |
113 |
<div class="btn-group"> |
|
|
114 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New <span class="caret"></span></button> |
115 |
<ul class="dropdown-menu"> |
116 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
117 |
<li><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New record</a></li> |
99 |
[% END %] |
118 |
[% END %] |
100 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
119 |
|
101 |
{text: _("New item"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]#additema" }, |
120 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
|
|
121 |
<li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]#additema">New item</a></li> |
102 |
[% END %] |
122 |
[% END %] |
103 |
[% IF ( CAN_user_serials_create_subscription ) %] |
123 |
[% IF ( CAN_user_serials_create_subscription ) %] |
104 |
{text: _("New subscription"), url: "/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber %]"}, |
124 |
<li><a id="newsub" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber %]">New subscription</a></li> |
105 |
[% END %] |
125 |
[% END %] |
|
|
126 |
|
106 |
[% IF ( EasyAnalyticalRecords && CAN_user_editcatalogue_edit_catalogue ) %] |
127 |
[% IF ( EasyAnalyticalRecords && CAN_user_editcatalogue_edit_catalogue ) %] |
107 |
{text: _("Analyze items"), url: "/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&analyze=1" }, |
128 |
<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]&analyze=1">Analyze items</a></li> |
108 |
[% END %] |
129 |
[% END %] |
109 |
[% IF CAN_user_editcatalogue_edit_catalogue %] |
130 |
[% IF CAN_user_editcatalogue_edit_catalogue %] |
110 |
{text: _("New child record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?parentbiblionumber=[% biblionumber %]" }, |
131 |
<li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?parentbiblionumber=[% biblionumber %]">New child record</a></li> |
111 |
[% END %] |
132 |
[% END %] |
112 |
]; |
133 |
</ul> |
113 |
if(newmenu.length){ |
134 |
</div> |
114 |
new YAHOO.widget.Button({ |
135 |
[% END %] |
115 |
type: "menu", |
|
|
116 |
label: _("New"), |
117 |
id: "newmenuc", |
118 |
name: "newmenubutton", |
119 |
menu: newmenu, |
120 |
container: this |
121 |
}); |
122 |
} |
123 |
var editmenu = [ |
124 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit record"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=" },[% END %] |
125 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Edit items"), url: "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]" },[% END %] |
126 |
[% IF ( CAN_user_tools_items_batchmod ) %]{ text: _("Edit items in batch"), url: "/cgi-bin/koha/tools/batchMod.pl?op=show&biblionumber=[% biblionumber %]&src=CATALOGUING" },[% END %] |
127 |
[% IF ( CAN_user_tools_items_batchdel ) %]{ text: _("Delete items in batch"), url: "/cgi-bin/koha/tools/batchMod.pl?del=1&op=show&biblionumber=[% biblionumber %]&src=CATALOGUING" },[% END %] |
128 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Attach item"), url: "/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]" },[% END %] |
129 |
[% IF ( EasyAnalyticalRecords ) %][% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Link to host item"), url: "/cgi-bin/koha/cataloguing/linkitem.pl?biblionumber=[% biblionumber %]" },[% END %][% END %] |
130 |
[% IF ( LocalCoverImages || OPACLocalCoverImages) %][% IF ( CAN_user_tools_upload_local_cover_images ) %]{ text: _("Upload image"), url: "/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image" },[% END %][% END %] |
131 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as new (duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=duplicate" },[% END %] |
132 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %] |
133 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete record"), onclick: {fn: confirm_deletion }[% IF ( count || holdcount ) %],id:'disabled'[% END %] },[% END %] |
134 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all items"), onclick: {fn: confirm_items_deletion }[% IF ( count < 1 || holdcount ) %],id:'disabled2'[% END %] },[% END %] |
135 |
]; |
136 |
if(editmenu.length){ |
137 |
new YAHOO.widget.Button({ |
138 |
type: "menu", |
139 |
label: _("Edit"), |
140 |
id: "editmenuc", |
141 |
name: "editmenubutton", |
142 |
menu: editmenu, |
143 |
container: this |
144 |
}); |
145 |
} |
146 |
var savemenu = [ |
147 |
{ text: _("MODS (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=mods&op=export&bib=[% biblionumber %]" }, |
148 |
{ text: _("Dublin Core (XML)"), url: "/cgi-bin/koha/catalogue/export.pl?format=dc&op=export&bib=[% biblionumber %]" }, |
149 |
{ text: _("MARCXML"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcxml&op=export&bib=[% biblionumber %]" }, |
150 |
{ text: _("MARC (non-Unicode/MARC-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marc8&op=export&bib=[% biblionumber %]" }, |
151 |
{ text: _("MARC (Unicode/UTF-8)"), url: "/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=[% biblionumber %]" }, |
152 |
{ text: _("MARC (Unicode/UTF-8, Standard)"), url: "/cgi-bin/koha/catalogue/export.pl?format=marcstd&op=export&bib=[% biblionumber %]" } |
153 |
]; |
154 |
|
155 |
new YAHOO.widget.Button({ |
156 |
type: "menu", |
157 |
label: _("Save"), |
158 |
id: "savemenuc", |
159 |
name: "savemenubutton", |
160 |
menu: savemenu, |
161 |
container: this |
162 |
}); |
163 |
|
136 |
|
164 |
var addtomenu = [ |
137 |
<div class="btn-group"> |
165 |
{ text: _("Cart"), onclick: { fn: addToCart } }, |
138 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-pencil"></i> Edit <span class="caret"></span></button> |
166 |
{ text: _("List"), onclick: { fn: addToShelf } } |
139 |
<ul class="dropdown-menu"> |
167 |
]; |
140 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
|
|
141 |
<li><a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=">Edit record</a></li> |
142 |
[% END %] |
168 |
|
143 |
|
169 |
new YAHOO.widget.Button({ |
144 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
170 |
type: "menu", |
145 |
<li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]">Edit items</a></li> |
171 |
label: _("Add to"), |
146 |
[% END %] |
172 |
name: "addtomenubutton", |
|
|
173 |
menu: addtomenu, |
174 |
container: this |
175 |
}); |
176 |
|
147 |
|
177 |
new YAHOO.widget.Button({ |
148 |
[% IF ( CAN_user_tools_items_batchmod ) %]<li><a href="/cgi-bin/koha/tools/batchMod.pl?op=show&biblionumber=[% biblionumber %]&src=CATALOGUING">Edit items in batch</a></li>[% END %] |
178 |
id: "printbiblio", |
|
|
179 |
type: "button", |
180 |
label: _("Print"), |
181 |
container: this, |
182 |
onclick: {fn: printBiblio } |
183 |
}); |
184 |
[% IF ( CAN_user_reserveforothers ) %][% UNLESS ( norequests ) %] |
185 |
[% IF ( holdfor ) %] |
186 |
// Create an array of YAHOO.widget.MenuItem configuration properties |
187 |
var onButtonClick = function () { |
188 |
location.href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]"; |
189 |
} |
190 |
var HoldForButtonMenu = [ |
191 |
{ text: _("Place hold"), url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" }, |
192 |
{ text: _("Place hold for")+ " [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])", url: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]" } |
193 |
]; |
194 |
|
149 |
|
195 |
// Instantiate a Split Button using the array of YAHOO.widget.MenuItem |
150 |
[% IF ( CAN_user_tools_items_batchdel ) %]<li><a href="/cgi-bin/koha/tools/batchMod.pl?del=1&op=show&biblionumber=[% biblionumber %]&src=CATALOGUING">Delete items in a batch</a></li>[% END %] |
196 |
// configuration properties as the value for the "menu" |
|
|
197 |
// configuration attribute. |
198 |
|
151 |
|
199 |
var HoldForButton = new YAHOO.widget.Button({ |
152 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]<li><a href="/cgi-bin/koha/cataloguing/moveitem.pl?biblionumber=[% biblionumber %]">Attach item</a></li>[% END %] |
200 |
id: "holdfor", |
|
|
201 |
type: "split", |
202 |
label: _("Place hold"), |
203 |
name: "holdfor", |
204 |
menu: HoldForButtonMenu, |
205 |
container: this, |
206 |
onclick: { fn: onButtonClick } |
207 |
}); |
208 |
[% ELSE %] |
209 |
new YAHOO.widget.Button({ |
210 |
id: "placehold", |
211 |
type: "link", |
212 |
label: _("Place hold"), |
213 |
container: this, |
214 |
href: "/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]" |
215 |
}); |
216 |
[% END %] |
217 |
[% END %][% END %] |
218 |
|
153 |
|
219 |
}); |
154 |
[% IF ( EasyAnalyticalRecords ) %][% IF ( CAN_user_editcatalogue_edit_items ) %]<li><a href="/cgi-bin/koha/cataloguing/linkitem.pl?biblionumber=[% biblionumber %]">Link to host item</a>[% END %][% END %] |
220 |
//]]> |
155 |
[% IF ( LocalCoverImages || OPACLocalCoverImages) %][% IF ( CAN_user_tools_upload_local_cover_images ) %]<li><a href="/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image">Upload image</a>[% END %][% END %] |
221 |
</script> |
|
|
222 |
|
223 |
<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" onsubmit="return Check();"> |
224 |
|
156 |
|
225 |
<ul class="toolbar" id="cattoolbar"> |
157 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
|
|
158 |
<li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=duplicate">Edit as new (duplicate)</a></li> |
159 |
<li><a href="#" id="z3950copy">Replace record via Z39.50</a></li> |
226 |
|
160 |
|
227 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
161 |
[% IF ( count ) %]<li class="disabled">[% ELSE %]<li>[% END %] |
228 |
<li><a id="newbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl">New record</a></li> |
162 |
<a id="deletebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=[% biblionumber %]">Delete record</a></li> |
229 |
[% END %] |
163 |
[% END %] |
230 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
|
|
231 |
<li><a id="newitem" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]">New item</a></li> |
232 |
[% END %] |
233 |
[% IF ( CAN_user_serials_create_subscription ) %] |
234 |
<li><a id="newsub" href="/cgi-bin/koha/serials/subscription-add.pl?biblionumber_for_new_subscription=[% biblionumber %]">New subscription</a></li> |
235 |
[% END %] |
236 |
|
164 |
|
237 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
165 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
238 |
<li><a id="editbiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=">Edit record</a></li> |
166 |
[% UNLESS ( count ) %]<li class="disabled">[% ELSE %]<li>[% END %]<li> |
239 |
[% END %] |
167 |
<a href="#" id="deleteallitems">Delete all items</a></li> |
240 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
168 |
[% END %] |
241 |
<li><a id="edititems" href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% biblionumber %]">Edit items</a></li> |
|
|
242 |
[% END %] |
243 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
244 |
<li><a id="duplicatebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=[% current_framework %]&op=duplicate">Duplicate record</a></li> |
245 |
[% END %] |
246 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] |
247 |
<li><a id="deletebiblio" href="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=[% biblionumber %]">Delete</a></li> |
248 |
[% END %] |
249 |
|
169 |
|
250 |
<li><a id="addtoshelf" href="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=[% biblionumber %]">Add to shelf</a></li> |
|
|
251 |
<li><span id="printbiblio"></span></li> |
252 |
[% IF ( CAN_user_reserveforothers ) %] |
253 |
[% UNLESS ( norequests ) %]<li><a id="placehold" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">Place hold</a></li>[% END %] |
254 |
[% END %] |
255 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<li id="z3950searchc"><input type="button" id="z3950search" value="Z39.50 Search" onclick="PopupZ3950Confirmed(); return false;" /></li>[% END %] |
256 |
</ul> |
170 |
</ul> |
|
|
171 |
</div> |
172 |
|
173 |
<div class="btn-group"> |
174 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-download-alt"></i> Save <span class="caret"></span></button> |
175 |
<ul class="dropdown-menu"> |
176 |
<li><a href="/cgi-bin/koha/catalogue/export.pl?format=mods&op=export&bib=[% biblionumber %]">MODS (XML)</a></li> |
177 |
<li><a href="/cgi-bin/koha/catalogue/export.pl?format=dc&op=export&bib=[% biblionumber %] |
178 |
">Dublic Core (XML)</a></li> |
179 |
<li><a href="/cgi-bin/koha/catalogue/export.pl?format=marcxml&op=export&bib=[% biblionumber %]">MARCXML</a></li> |
180 |
<li><a href="/cgi-bin/koha/catalogue/export.pl?format=marc8&op=export&bib=[% biblionumber %]">MARC (non-Unicode/MARC-8)</a></li> |
181 |
<li><a href="/cgi-bin/koha/catalogue/export.pl?format=utf8&op=export&bib=[% biblionumber %]">MARC (Unicode/UTF-8</a></li> |
182 |
<li><a href="/cgi-bin/koha/catalogue/export.pl?format=marcstd&op=export&bib=[% biblionumber %]">MARC (Unicode/UTF-8, Standard)</a></li> |
183 |
</ul> |
184 |
</div> |
185 |
|
186 |
[% IF ( virtualshelves && intranetbookbag ) %] |
187 |
<div class="btn-group"> |
188 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">Add to <span class="caret"></span></button> |
189 |
<ul class="dropdown-menu"> |
190 |
<li><a href="#" id="addtocart">Cart</a></li> |
191 |
<li><a id="addtoshelf" href="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=[% biblionumber %]">List</a></li> |
192 |
</ul> |
193 |
</div> |
194 |
[% ELSIF ( virtualshelves ) %] |
195 |
<div class="btn-group"><a id="addtoshelf" class="btn btn-small" href="/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?biblionumber=[% biblionumber %]"><i class="icon-list"></i> Add to list</a> </div> |
196 |
[% ELSIF ( intranetbookbag ) %] |
197 |
<div class="btn-group"><a id="addtocart" class="btn btn-small"><i class="icon-shopping-cart"></i> Add to cart</a> </div> |
198 |
[% END %] |
199 |
|
200 |
<div class="btn-group"><a id="printbiblio" class="btn btn-small"><i class="icon-print"></i> Print</a></div> |
201 |
|
202 |
[% IF ( CAN_user_reserveforothers ) %] |
203 |
[% UNLESS ( norequests ) %] |
204 |
[% IF ( holdfor ) %] |
205 |
<div class="btn-group"> |
206 |
<button class="btn btn-small"><i class="icon-hold"></i> Place hold</button> |
207 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"> |
208 |
<span class="caret"></span> |
209 |
</button> |
210 |
<ul class="dropdown-menu"> |
211 |
<li><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]">Place hold</a></li> |
212 |
<li><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]&findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></li> |
213 |
</ul> |
214 |
</div> |
215 |
[% ELSE %] |
216 |
<div class="btn-group"><a id="placehold" class="btn btn-small" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblionumber %]"><i class="icon-hold"></i> Place hold</a></div> |
217 |
[% END %] |
218 |
[% END %] |
219 |
[% END %] |
220 |
|
257 |
</form> |
221 |
</form> |
258 |
</div> |
222 |
</div> |
259 |
|
223 |
|