Lines 46-66
function confirm_deletion() {
Link Here
|
46 |
} |
46 |
} |
47 |
} |
47 |
} |
48 |
[% END %] |
48 |
[% END %] |
49 |
[% IF ( CAN_user_editcatalogue_edit_items ) %] |
|
|
50 |
function confirm_items_deletion() { |
51 |
var count = [% count %]; |
52 |
if(count > 0){ |
53 |
if(confirm(_('Are you sure you want to delete the ' + count + ' attached items? '))){ |
54 |
window.location="/cgi-bin/koha/cataloguing/additem.pl?op=delallitems&biblionumber=[% biblionumber %]"; |
55 |
}else{ |
56 |
return false; |
57 |
} |
58 |
} else { |
59 |
alert(_("This record has no items.")); |
60 |
return false; |
61 |
} |
62 |
} |
63 |
[% END %] |
64 |
// prepare DOM for YUI Toolbar |
49 |
// prepare DOM for YUI Toolbar |
65 |
|
50 |
|
66 |
$(document).ready(function() { |
51 |
$(document).ready(function() { |
Lines 117-124
function confirm_items_deletion() {
Link Here
|
117 |
[% 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 %] |
102 |
[% 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 %] |
118 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as new (duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=duplicate" },[% END %] |
103 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Edit as new (duplicate)"), url: "/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]&frameworkcode=&op=duplicate" },[% END %] |
119 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %] |
104 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Replace record via Z39.50"), onclick: {fn: PopupZ3950 } },[% END %] |
120 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] },[% END %] |
105 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %]{ text: _("Delete record"), onclick: {fn: confirm_deletion }[% IF ( count ) %],id:'disabled'[% END %] }[% END %] |
121 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]{ text: _("Delete all items"), onclick: {fn: confirm_items_deletion }[% UNLESS ( count ) %],id:'disabled'[% END %] }[% END %] |
|
|
122 |
]; |
106 |
]; |
123 |
if(editmenu.length){ |
107 |
if(editmenu.length){ |
124 |
new YAHOO.widget.Button({ |
108 |
new YAHOO.widget.Button({ |
125 |
- |
|
|