X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fmodules%2Fcatalogue%2Fdetail.tt;h=e8de7546fe288be11d06fc72e1052a61a6744c71;hb=1fcdef312be42c673d4ae017e3abe7722aba6048;hp=73a97a95dd8b93e03294df453b280e9920e9f721;hpb=bcab2416399e93f5ce9b1083395c052046d5d02a;p=koha.git diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 73a97a95dd..e8de7546fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -84,8 +84,8 @@ function verify_images() { var no_images_msg = _("No images have been uploaded for this bibliographic record yet."); no_images_msg = '

' + no_images_msg + '

'; [% IF ( CAN_user_tools_upload_local_cover_images ) %] - var please_upload = _("Please %supload%s one.").format( - "", + var please_upload = _("Please select the image file to upload. %sUpload%s").format( + " ", ""); no_images_msg += "

" + please_upload + '

'; [% END %] @@ -94,15 +94,6 @@ function verify_images() { } [% IF StaffDetailItemSelection %] - function selectAllItems(div) { - $("input[name='itemnumber'][type='checkbox']", div).attr('checked', 'checked'); - itemSelectionBuildActionLinks(div); - } - - function clearAllItems(div) { - $("input[name='itemnumber'][type='checkbox']", div).removeAttr('checked'); - itemSelectionBuildActionLinks(div); - } function itemSelectionBuildDeleteLink(div) { var itemnumbers = new Array(); @@ -114,9 +105,7 @@ function verify_images() { url += '&itemnumber=' + itemnumbers.join('&itemnumber='); url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]'; $('a.itemselection_action_delete').attr('href', url); - $('a.itemselection_action_delete').show(); } else { - $('a.itemselection_action_delete').hide(); return false; } return true @@ -132,15 +121,14 @@ function verify_images() { url += '&itemnumber=' + itemnumbers.join('&itemnumber='); url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]'; $('a.itemselection_action_modify').attr('href', url); - $('a.itemselection_action_modify').show(); } else { - $('a.itemselection_action_modify').hide(); return false; } return true; } - function itemSelectionBuildActionLinks(div) { + function itemSelectionBuildActionLinks(tab) { + var div = $("#" + tab); var delete_link_ok = itemSelectionBuildDeleteLink(div); var modify_link_ok = itemSelectionBuildModifyLink(div); if (modify_link_ok || delete_link_ok) { @@ -151,14 +139,31 @@ function verify_images() { } $(document).ready(function() { + $('table.items_table').each(function() { - var div = $(this).parent().parent(); + var div = $(this).parent().attr("id"); itemSelectionBuildActionLinks(div); }); + $("input[name='itemnumber'][type='checkbox']").change(function() { - var div = $(this).parents('table').parent().parent(); + var div = $(this).parents('table').parent().parent().attr("id"); itemSelectionBuildActionLinks(div); }); + + $(".SelectAll").on("click",function(e){ + e.preventDefault(); + var tab = $(this).data("tab"); + $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', true); + itemSelectionBuildActionLinks(tab); + }); + + $(".ClearAll").on("click",function(e){ + e.preventDefault(); + var tab = $(this).data("tab"); + $("input[name='itemnumber'][type='checkbox']", $("#"+tab)).prop('checked', false); + itemSelectionBuildActionLinks(tab); + }); + }); [% END %] @@ -198,7 +203,7 @@ function verify_images() { });[% END %] //]]> - + [% INCLUDE 'datatables.inc' %] [% INCLUDE 'browser-strings.inc' %] @@ -236,7 +241,7 @@ function verify_images() { } $('#' + id + '_activate_filters') - .text(_("Deactivate filters")) + .html(' ' + _("Deactivate filters") ) .unbind('click') .click(function() { deactivate_filters(id); @@ -254,7 +259,7 @@ function verify_images() { filters_row.hide(); $('#' + id + '_activate_filters') - .text(_("Activate filters")) + .html(' ' + _("Activate filters") ) .unbind('click') .click(function() { activate_filters(id); @@ -288,7 +293,7 @@ function verify_images() { link = $('') .attr('href', '#') .attr('id', id + '_activate_filters'); - table.before(link); + $("." + id + "_table_controls").prepend(link); deactivate_filters(id); } [% IF Koha.Preference('AcquisitionDetails') %] @@ -336,7 +341,7 @@ function verify_images() { [% END %] - [% IF ( AmazonCoverImages ) %] + [% IF ( AmazonCoverImages || LocalCoverImages ) %] [% IF ( XSLTDetailsDisplay ) %]
@@ -357,10 +362,10 @@ function verify_images() { [% IF ( XSLTDetailsDisplay ) %] [% XSLTBloc %] - [% IF ( GetShelves ) %] + [% IF shelves.count %] Lists that include this title: - [% FOREACH GetShelve IN GetShelves %] - [% GetShelve.shelfname %] + [% FOREACH s IN shelves %] + [% s.shelfname %] [% IF ( loop.last ) %][% ELSE %]|[% END %] [% END %] @@ -378,7 +383,6 @@ function verify_images() { [% END %] MARC Preview: Show - [% IF ( holdcount ) %]Holds: [% holdcount %][% ELSE %][% END %] [% IF ( AmazonCoverImages || LocalCoverImages ) %]
@@ -388,11 +392,7 @@ function verify_images() { [% IF ( AmazonCoverImages ) %] [% END %] [% END %] @@ -402,7 +402,7 @@ function verify_images() { [% FOREACH subtitl IN subtitle %]

[% subtitl.subfield %]

[% END %] - [% UNLESS ( item_level_itypes ) %][% description %][% END %] + [% UNLESS ( item_level_itypes ) %][% translated_description %][% END %] [% IF ( unititle ) %]

[% unititle |html %]

[% END %] [% IF ( author ) %]

By [% author %]

[% END %]