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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc (-1 / +10 lines)
Lines 117-123 function confirm_reregistration() { Link Here
117
    }
117
    }
118
}
118
}
119
function export_barcodes() {
119
function export_barcodes() {
120
    window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&op=export_barcodes');
120
    [% IF (
121
              ( ! Koha.Preference('intranetreadinghistory') ) ||
122
              ( Koha.Preference('AnonymousPatron') == ( borrowernumber) ) ||
123
              ( privacy == 2 )
124
          )
125
    %]
126
        window.location = '/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %] ' ;
127
    [% ELSE %]
128
        window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrowernumber %]&op=export_barcodes');
129
    [% END %]
121
}
130
}
122
var slip_re = /slip/;
131
var slip_re = /slip/;
123
function printx_window(print_type) {
132
function printx_window(print_type) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (+2 lines)
Lines 52-57 Link Here
52
    <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
52
    <div class="dialog alert">Staff members are not allowed to access patron's checkout history</div>
53
[% ELSIF is_anonymous %]
53
[% ELSIF is_anonymous %]
54
    <div class="dialog alert">This is the anonymous patron, so no circulation history is displayed. To get a list of anonymized loans, please run a report.</div>
54
    <div class="dialog alert">This is the anonymous patron, so no circulation history is displayed. To get a list of anonymized loans, please run a report.</div>
55
[% ELSIF ( privacy == 2)  %]
56
    <div class="dialog message">This patron has set the privacy rules to never keeping a circulation history.</div>
55
[% ELSIF ( !loop_reading ) %]
57
[% ELSIF ( !loop_reading ) %]
56
    <div class="dialog message">This patron has no circulation history.</div>
58
    <div class="dialog message">This patron has no circulation history.</div>
57
[% ELSE %]
59
[% ELSE %]
(-)a/members/readingrec.pl (-16 / +19 lines)
Lines 75-95 my $branches = GetBranches(); Link Here
75
75
76
#   barcode export
76
#   barcode export
77
if ( $op eq 'export_barcodes' ) {
77
if ( $op eq 'export_barcodes' ) {
78
    my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
78
    if ( $data->{'privacy'} < 2) {
79
    my @barcodes =
79
        my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
80
      map { $_->{barcode} } grep { $_->{returndate} =~ m/^$today/o } @{$issues};
80
        my @barcodes =
81
    my $borrowercardnumber =
81
          map { $_->{barcode} } grep { $_->{returndate} =~ m/^$today/o } @{$issues};
82
      GetMember( borrowernumber => $borrowernumber )->{'cardnumber'};
82
        my $borrowercardnumber =
83
    my $delimiter = "\n";
83
          GetMember( borrowernumber => $borrowernumber )->{'cardnumber'};
84
    binmode( STDOUT, ":encoding(UTF-8)" );
84
        my $delimiter = "\n";
85
    print $input->header(
85
        binmode( STDOUT, ":encoding(UTF-8)" );
86
        -type       => 'application/octet-stream',
86
        print $input->header(
87
        -charset    => 'utf-8',
87
            -type       => 'application/octet-stream',
88
        -attachment => "$today-$borrowercardnumber-checkinexport.txt"
88
            -charset    => 'utf-8',
89
    );
89
            -attachment => "$today-$borrowercardnumber-checkinexport.txt"
90
    my $content = join $delimiter, uniq(@barcodes);
90
        );
91
    print $content;
91
92
    exit;
92
        my $content = join $delimiter, uniq(@barcodes);
93
        print $content;
94
        exit;
95
    }
93
}
96
}
94
97
95
if ( $data->{'category_type'} eq 'C') {
98
if ( $data->{'category_type'} eq 'C') {
Lines 123-128 $template->param(%$data); Link Here
123
$template->param(
126
$template->param(
124
    readingrecordview => 1,
127
    readingrecordview => 1,
125
    borrowernumber    => $borrowernumber,
128
    borrowernumber    => $borrowernumber,
129
    privacy           => $data->{'privacy'},
126
    categoryname      => $data->{description},
130
    categoryname      => $data->{description},
127
    roadtype          => $roadtype,
131
    roadtype          => $roadtype,
128
    is_child          => ( $data->{category_type} eq 'C' ),
132
    is_child          => ( $data->{category_type} eq 'C' ),
129
- 

Return to bug 15096