X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=koha-tmpl%2Fintranet-tmpl%2Fprog%2Fen%2Fmodules%2Fcirc%2Fcirculation.tt;h=ee3a66662ca7ab17fbdd5a140a2ab0595954d757;hb=ea418af20558801d8ee6bad2e18327e4390df077;hp=8724e9dc5828c8f42e92427f9d4903256142dc82;hpb=2d3bb6e1d4fb6f3d270cf2c5aa467bedaa9d3e34;p=koha_fer diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 8724e9dc58..ee3a66662c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -82,6 +82,16 @@ var allcheckboxes = $(".checkboxed"); $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false; }); + $("#CheckAllexports").click(function(){ + $(".checkboxed").checkCheckboxes(":input[name*=biblionumbers]"); + $(".checkboxed").unCheckCheckboxes(":input[name*=items]"); + return false; + }); + $("#CheckNoexports").click(function(){ + $(".checkboxed").unCheckCheckboxes(":input[name*=biblionumbers]"); + return false; + }); + $("#relrenew_all").click(function(){ $(allcheckboxes).checkCheckboxes(":input[name*=items]"); $(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); @@ -144,18 +154,75 @@ var allcheckboxes = $(".checkboxed"); $("#add_message_form").show(); }); - $("input.radio").click(function(){ + $("input.radio").click(function(){ radioCheckBox($(this)); - }); - $("#newduedate").datepicker({ minDate: 1 }); // require that renewal date is after today + }); + $("#exportmenuc").empty(); + initExportButton(); + + $("#newduedate").datetimepicker({ + minDate: 1, // require that renewal date is after today + hour: 23, + minute: 59 + }); $("#duedatespec").datetimepicker({ - onSelect: function(dateText, inst) { $("#barcode").focus(); }, + onClose: function(dateText, inst) { $("#barcode").focus(); }, hour: 23, - minute: 59, + minute: 59 }); }); +function initExportButton() { + var exportmenu = [ + { text: _("ISO2709 with items"), onclick: {fn: function(){export_submit("iso2709_995")}} }, + { text: _("ISO2709 without items"), onclick: {fn: function(){export_submit("iso2709")}} }, + { text: _("CSV"), onclick: {fn: function(){export_submit("csv")}} }, + ]; + new YAHOO.widget.Button({ + type: "menu", + label: _("Export checkouts"), + name: "exportmenubutton", + menu: exportmenu, + container: "exportmenuc" + }); +} + +function export_submit(format) { + if ($("input:checkbox[name='biblionumbers'][checked]").length < 1){ + alert(_("You must select a checkout to export")); + return; + } + + $("input:checkbox[name='biblionumbers']").each( function(){ + var input_item = $(this).siblings("input:checkbox"); + if ( $(this).is(":checked") ) { + $(input_item).attr("checked", "checked"); + } else { + $(input_item).attr("checked", ""); + } + } ); + + if (format == 'iso2709_995') { + format = 'iso2709'; + $("#dont_export_item").val(0); + } else if (format == 'iso2709') { + $("#dont_export_item").val(1); + } else { + [% UNLESS ( export_with_csv_profile ) %] + alert(_("You must define a csv profile for export (in tools>CSV export profiles) and fill the ExportWithCsvProfile system preference")); + return false; + [% END %] + } + document.issues.action="/cgi-bin/koha/tools/export.pl"; + document.getElementById("export_format").value = format; + document.issues.submit(); + + /* Reset form action to its initial value */ + document.issues.action="/cgi-bin/koha/reserve/renewscript.pl"; + +}; + function validate1(date) { var today = new Date(); if ( date < today ) { @@ -301,8 +368,19 @@ function validate1(date) { [% IF ( ITEM_LOST ) %]
  • This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?
  • [% END %] + +[% IF HIGHHOLDS %] +
  • High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?
  • +[% END %] +[% IF HIGHHOLDS %] + +[% END %]
    [% IF ( RESERVED ) %] @@ -325,7 +403,7 @@ function validate1(date) { [% IF ( DEBT ) %][% END %] [% IF ( INVALID_DATE ) %]

    - +

    [% ELSE %] @@ -503,7 +581,7 @@ No patron matched [% message %] [% IF ( SpecifyDueDate ) %]
    Specify due date [% INCLUDE 'date-format.inc' %]:
    - [% IF ( duedatespec ) %][% ELSE %] + [% IF ( duedatespec ) %][% ELSE %] [% END %] [% IF ( stickyduedate ) %] @@ -683,7 +761,7 @@ No patron matched [% message %]
    [% IF ( issuecount ) %] - + @@ -700,6 +778,9 @@ No patron matched [% message %] Price Renew

    select all | none

    Check in

    select all | none

    + [% IF export_remove_fields OR export_with_csv_profile %] + Export

    select all | none

    + [% END %] [% IF ( todayissues ) %] [% INCLUDE 'checkouts-table-footer.inc' %] @@ -756,9 +837,9 @@ No patron matched [% message %] [% END %] [% END %] - [% IF ( todayissue.return_failed ) %] + [% IF ( todayissue.return_failed ) %] Checkin failed - [% ELSE %] + [% ELSE %] [% IF ( todayissue.renew_error_on_reserve ) %] On hold @@ -768,13 +849,19 @@ No patron matched [% message %] [% END %] - [% END %] + [% END %] + [% IF export_remove_fields OR export_with_csv_profile %] + + + + + [% END %] [% END %] [% END %] [% IF ( previssues ) %] -[% IF ( todayissues ) %]Previous checkouts[% ELSE %] -Previous checkouts +[% IF ( todayissues ) %]Previous checkouts[% ELSE %] +Previous checkouts [% INCLUDE 'checkouts-table-footer.inc' %] [% END %] @@ -832,7 +919,7 @@ No patron matched [% message %] [% END %] [% IF ( previssue.return_failed ) %] - Checkin failed + Check-in failed [% ELSE %] [% IF ( previssue.renew_error_on_reserve ) %] On hold @@ -843,7 +930,13 @@ No patron matched [% message %] [% END %] - [% END %] + [% END %] + [% IF export_remove_fields OR export_with_csv_profile %] + + + + + [% END %] [% END %] [% END %] @@ -859,7 +952,16 @@ No patron matched [% message %] [% END %] - + [% IF export_remove_fields OR export_with_csv_profile %] +

    + Don't export fields : + Export + + + + + [% END %] + [% END %] [% ELSE %] @@ -906,7 +1008,7 @@ No patron matched [% message %] [% END %] [% END %] [% IF ( relprevissues ) %] -Previous checkouts +Previous checkouts [% FOREACH relprevissue IN relprevissues %] [% IF ( loop.odd ) %]