View | Details | Raw Unified | Return to bug 13190
Collapse All | Expand All

(-)a/C4/Record.pm (-1 / +2 lines)
Lines 366-371 C<$itemnumbers> - a list of itemnumbers to export Link Here
366
366
367
sub marc2csv {
367
sub marc2csv {
368
    my ($biblios, $id, $itemnumbers) = @_;
368
    my ($biblios, $id, $itemnumbers) = @_;
369
    $itemnumbers ||= [];
369
    my $output;
370
    my $output;
370
    my $csv = Text::CSV::Encoded->new();
371
    my $csv = Text::CSV::Encoded->new();
371
372
Lines 380-386 sub marc2csv { Link Here
380
    eval $preprocess if ($preprocess);
381
    eval $preprocess if ($preprocess);
381
382
382
    my $firstpass = 1;
383
    my $firstpass = 1;
383
    if ( $itemnumbers ) {
384
    if ( @$itemnumbers ) {
384
        for my $itemnumber ( @$itemnumbers) {
385
        for my $itemnumber ( @$itemnumbers) {
385
            my $biblionumber = GetBiblionumberFromItemnumber $itemnumber;
386
            my $biblionumber = GetBiblionumberFromItemnumber $itemnumber;
386
            $output .= marcrecord2csv( $biblionumber, $id, $firstpass, $csv, $fieldprocessing, [$itemnumber] );
387
            $output .= marcrecord2csv( $biblionumber, $id, $firstpass, $csv, $fieldprocessing, [$itemnumber] );
(-)a/circ/circulation.pl (-2 lines)
Lines 596-603 $template->param( Link Here
596
    SpecifyDueDate            => $duedatespec_allow,
596
    SpecifyDueDate            => $duedatespec_allow,
597
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
597
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
598
    AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
598
    AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
599
    export_remove_fields      => C4::Context->preference("ExportRemoveFields"),
600
    export_with_csv_profile   => C4::Context->preference("ExportWithCsvProfile"),
601
    canned_bor_notes_loop     => $canned_notes,
599
    canned_bor_notes_loop     => $canned_notes,
602
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
600
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
603
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
601
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js (-8 / +3 lines)
Lines 41-55 $(document).ready(function() { Link Here
41
        minute: 59
41
        minute: 59
42
    });
42
    });
43
    $("#export_submit").on("click",function(){
43
    $("#export_submit").on("click",function(){
44
        var export_format = $("#export_formats").val();
44
        var output_format = $("#output_format").val();
45
        export_checkouts(export_format);
45
        export_checkouts(output_format);
46
        return false;
46
        return false;
47
    });
47
    });
48
49
    toggle_onsite_checkout();
50
    $("#onsite_checkout").click(function(){
51
        toggle_onsite_checkout();
52
    });
53
});
48
});
54
49
55
function export_checkouts(format) {
50
function export_checkouts(format) {
Lines 74-80 function export_checkouts(format) { Link Here
74
        $("#dont_export_item").val(1);
69
        $("#dont_export_item").val(1);
75
    }
70
    }
76
71
77
    document.getElementById("export_format").value = format;
72
    document.getElementById("output_format").value = format;
78
    document.issues.submit();
73
    document.issues.submit();
79
}
74
}
80
75
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-45 / +74 lines)
Lines 1-7 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE Branches %]
2
[% USE Branches %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% IF ( export_remove_fields OR export_with_csv_profile ) %]
4
[% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
5
   [% SET exports_enabled = 1 %]
5
   [% SET exports_enabled = 1 %]
6
[% END %]
6
[% END %]
7
[% USE AuthorisedValues %]
7
[% USE AuthorisedValues %]
Lines 45-61 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
45
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
45
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
46
[% UNLESS ( borrowernumber ) %][% UNLESS ( selectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
46
[% UNLESS ( borrowernumber ) %][% UNLESS ( selectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
47
47
48
$(document).ready(function() {
49
    [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
50
        // listen submit to trigger qslip on empty checkout
51
        $('#mainform').bind('submit',function() {
52
            if ($('#barcode').val() == '') {
53
                return printx_window( '[% CircAutoPrintQuickSlip %]' );
54
            }
55
        });
56
    [% END %]
57
});
58
59
// On-site checkout
48
// On-site checkout
60
function toggle_onsite_checkout(){
49
function toggle_onsite_checkout(){
61
    if ( $("#onsite_checkout").attr('checked') ) {
50
    if ( $("#onsite_checkout").attr('checked') ) {
Lines 70-75 function toggle_onsite_checkout(){ Link Here
70
    }
59
    }
71
}
60
}
72
61
62
$(document).ready(function() {
63
    [% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
64
        // listen submit to trigger qslip on empty checkout
65
        $('#mainform').bind('submit',function() {
66
            if ($('#barcode').val() == '') {
67
                return printx_window( '[% CircAutoPrintQuickSlip %]' );
68
            }
69
        });
70
    [% END %]
71
    toggle_onsite_checkout();
72
    $("#onsite_checkout").click(function(){
73
        toggle_onsite_checkout();
74
    });
75
});
76
73
//]]>
77
//]]>
74
</script>
78
</script>
75
</head>
79
</head>
Lines 770-810 No patron matched <span class="ex">[% message %]</span> Link Here
770
            </p>
774
            </p>
771
        </div>
775
        </div>
772
776
773
        <table id="issues-table">
777
        <form name="issues" action="/cgi-bin/koha/tools/export.pl" method="post" class="checkboxed">
774
            <thead>
778
            <table id="issues-table">
775
                <tr>
779
                <thead>
776
                    <th scope="col">&nbsp;</th>
780
                    <tr>
777
                    <th scope="col">&nbsp;</th>
781
                        <th scope="col">&nbsp;</th>
778
                    <th scope="col">Due date</th>
782
                        <th scope="col">&nbsp;</th>
779
                    <th scope="col">Due date</th>
783
                        <th scope="col">Due date</th>
780
                    <th scope="col">Title</th>
784
                        <th scope="col">Due date</th>
781
                    <th scope="col">Item type</th>
785
                        <th scope="col">Title</th>
782
                    <th scope="col">Checked out on</th>
786
                        <th scope="col">Item type</th>
783
                    <th scope="col">Checked out from</th>
787
                        <th scope="col">Checked out on</th>
784
                    <th scope="col">Call no</th>
788
                        <th scope="col">Checked out from</th>
785
                    <th scope="col">Charge</th>
789
                        <th scope="col">Call no</th>
786
                    <th scope="col">Price</th>
790
                        <th scope="col">Charge</th>
787
                    <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
791
                        <th scope="col">Price</th>
788
                    <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
792
                        <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
789
                    <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
793
                        <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
790
                </tr>
794
                        <th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllExports">select all</a> | <a href="#" id="UncheckAllExports">none</a></p></th>
791
            </thead>
795
                    </tr>
792
            [% INCLUDE 'checkouts-table-footer.inc' %]
796
                </thead>
793
        </table>
797
                [% INCLUDE 'checkouts-table-footer.inc' %]
794
798
            </table>
795
        <label for="issues-table-load-immediately">Always show checkouts immediately</label>
799
796
        <input id="issues-table-load-immediately" type="checkbox" />
800
            <label for="issues-table-load-immediately">Always show checkouts immediately</label>
797
801
            <input id="issues-table-load-immediately" type="checkbox" />
798
        <fieldset id="issues-table-actions" class="action">
802
799
            [% IF ( CAN_user_circulate_override_renewals ) %]
803
            <fieldset id="issues-table-actions" class="action">
800
                [% IF ( AllowRenewalLimitOverride ) %]
804
                [% IF ( CAN_user_circulate_override_renewals ) %]
801
                    <label for="override_limit">Override renewal limit:</label>
805
                    [% IF ( AllowRenewalLimitOverride ) %]
802
                    <input type="checkbox" name="override_limit" id="override_limit" value="1" />
806
                        <label for="override_limit">Override renewal limit:</label>
807
                        <input type="checkbox" name="override_limit" id="override_limit" value="1" />
808
                    [% END %]
809
                [% END %]
810
                <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
811
                <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
812
            </fieldset>
813
814
            [% IF issuecount %]
815
                [% IF ( exports_enabled ) %]
816
                    <fieldset>
817
                        <label for="output_format"><b>Export checkouts using format:</b></label>
818
                        <select name="output_format" id="output_format">
819
                            <option value="iso2709_995">ISO2709 with items</option>
820
                            <option value="iso2709">ISO2709 without items</option>
821
                            [% IF Koha.Preference('ExportWithCsvProfile') %]
822
                                <option value="csv">CSV</option>
823
                            [% END %]
824
                        </select>
825
826
                       <label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" />
827
                        <input type="hidden" name="op" value="export" />
828
                        <input type="hidden" id="export_format" name="format" value="iso2709" />
829
                        <input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
830
                        <input type="hidden" id="record_type" name="record_type" value="bibs" />
831
                        <button class="btn btn-small" id="export_submit"><i class="icon-download-alt"></i> Export</button>
832
                    </fieldset>
803
                [% END %]
833
                [% END %]
804
            [% END %]
834
            [% END %]
805
            <button class="btn" id="RenewCheckinChecked"><i class="icon-check"></i> Renew or return checked items</button>
835
        </form>
806
            <button class="btn" id="RenewAll"><i class="icon-book"></i> Renew all</button>
836
807
        </fieldset>
808
    [% ELSE %]
837
    [% ELSE %]
809
        <p>Patron has nothing checked out.</p>
838
        <p>Patron has nothing checked out.</p>
810
    [% END %]
839
    [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-3 / +10 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
4
   [% SET exports_enabled = 1 %]
5
[% END %]
3
[% INCLUDE 'doc-head-open.inc' %]
6
[% INCLUDE 'doc-head-open.inc' %]
4
<title>Koha &rsaquo; Patrons &rsaquo;
7
<title>Koha &rsaquo; Patrons &rsaquo;
5
[% IF ( unknowuser ) %]
8
[% IF ( unknowuser ) %]
Lines 17-22 Link Here
17
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
20
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
18
[% INCLUDE 'timepicker.inc' %]
21
[% INCLUDE 'timepicker.inc' %]
19
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
22
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
23
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
20
<script type="text/javascript" src="[% themelang %]/js/checkouts.js"></script>
24
<script type="text/javascript" src="[% themelang %]/js/checkouts.js"></script>
21
<script type="text/javascript" src="[% themelang %]/js/holds.js"></script>
25
<script type="text/javascript" src="[% themelang %]/js/holds.js"></script>
22
<script type="text/JavaScript">
26
<script type="text/JavaScript">
Lines 34-39 var relatives_borrowernumbers = new Array(); Link Here
34
    relatives_borrowernumbers.push("[% b %]");
38
    relatives_borrowernumbers.push("[% b %]");
35
[% END %]
39
[% END %]
36
40
41
var MSG_ADD_MESSAGE = _("Add a new message");
42
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
43
37
$(document).ready(function() {
44
$(document).ready(function() {
38
    $('#finesholdsissues').tabs({
45
    $('#finesholdsissues').tabs({
39
        // Correct table sizing for tables hidden in tabs
46
        // Correct table sizing for tables hidden in tabs
Lines 459-469 function validate1(date) { Link Here
459
466
460
                        [% IF ( exports_enabled ) %]
467
                        [% IF ( exports_enabled ) %]
461
                            <fieldset>
468
                            <fieldset>
462
                                <label for="export_formats"><b>Export checkouts using format:</b></label>
469
                                <label for="output_format"><b>Export checkouts using format:</b></label>
463
                                <select name="export_formats" id="export_formats">
470
                                <select name="output_format" id="output_format">
464
                                    <option value="iso2709_995">ISO2709 with items</option>
471
                                    <option value="iso2709_995">ISO2709 with items</option>
465
                                    <option value="iso2709">ISO2709 without items</option>
472
                                    <option value="iso2709">ISO2709 without items</option>
466
                                    [% IF ( export_with_csv_profile ) %]
473
                                    [% IF Koha.Preference('ExportWithCsvProfile') %]
467
                                        <option value="csv">CSV</option>
474
                                        <option value="csv">CSV</option>
468
                                    [% END %]
475
                                    [% END %]
469
                                </select>
476
                                </select>
(-)a/tools/export.pl (-2 / +1 lines)
Lines 44-50 my $op = $query->param("op") || ''; Link Here
44
my $filename = $query->param("filename") || 'koha.mrc';
44
my $filename = $query->param("filename") || 'koha.mrc';
45
my $dbh      = C4::Context->dbh;
45
my $dbh      = C4::Context->dbh;
46
my $marcflavour = C4::Context->preference("marcflavour");
46
my $marcflavour = C4::Context->preference("marcflavour");
47
my $format = $query->param("format") || 'iso2709';
47
my $format = $query->param("format") || $query->param("output_format") || 'iso2709';
48
48
49
# Checks if the script is called from commandline
49
# Checks if the script is called from commandline
50
my $commandline = not defined $ENV{GATEWAY_INTERFACE};
50
my $commandline = not defined $ENV{GATEWAY_INTERFACE};
51
- 

Return to bug 13190