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

(-)a/C4/ILSDI/Services.pm (-8 / +10 lines)
Lines 953-978 sub _availability { Link Here
953
    my ($itemnumber) = @_;
953
    my ($itemnumber) = @_;
954
    my $item = Koha::Items->find($itemnumber);
954
    my $item = Koha::Items->find($itemnumber);
955
955
956
    use Koha::I18N;
957
956
    unless ( $item ) {
958
    unless ( $item ) {
957
        return ( undef, 'unknown', 'Error: could not retrieve availability for this ID', undef );
959
        return ( undef, __('unknown'), __('Error: could not retrieve availability for this ID'), undef );
958
    }
960
    }
959
961
960
    my $biblionumber = $item->biblioitemnumber;
962
    my $biblionumber = $item->biblioitemnumber;
961
    my $library = Koha::Libraries->find( $item->holdingbranch );
963
    my $library = Koha::Libraries->find( $item->holdingbranch );
962
    my $location = $library ? $library->branchname : '';
964
    my $location = $library ? $library->branchname : '';
963
965
    
964
    if ( $item->notforloan ) {
966
    if ( $item->notforloan ) {
965
        return ( $biblionumber, 'not available', 'Not for loan', $location );
967
        return ( $biblionumber, __('not available'), __('Not for loan'), $location );
966
    } elsif ( $item->onloan ) {
968
    } elsif ( $item->onloan ) {
967
        return ( $biblionumber, 'not available', 'Checked out', $location );
969
        return ( $biblionumber, __('not available'), __('Checked out'), $location );
968
    } elsif ( $item->itemlost ) {
970
    } elsif ( $item->itemlost ) {
969
        return ( $biblionumber, 'not available', 'Item lost', $location );
971
        return ( $biblionumber, __('not available'), __('Item lost'), $location );
970
    } elsif ( $item->withdrawn ) {
972
    } elsif ( $item->withdrawn ) {
971
        return ( $biblionumber, 'not available', 'Item withdrawn', $location );
973
        return ( $biblionumber, __('not available'), __('Item withdrawn'), $location );
972
    } elsif ( $item->damaged ) {
974
    } elsif ( $item->damaged ) {
973
        return ( $biblionumber, 'not available', 'Item damaged', $location );
975
        return ( $biblionumber, __('not available'), __('Item damaged'), $location );
974
    } else {
976
    } else {
975
        return ( $biblionumber, 'available', undef, $location );
977
        return ( $biblionumber, __('available'), undef, $location );
976
    }
978
    }
977
}
979
}
978
980
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt (+2 lines)
Lines 118-123 Link Here
118
                                </dd>
118
                                </dd>
119
                                <dt><strong>return_fmt</strong> (Optional)</dt>
119
                                <dt><strong>return_fmt</strong> (Optional)</dt>
120
                                <dd>requests a particular format or set of formats in reporting availability</dd>
120
                                <dd>requests a particular format or set of formats in reporting availability</dd>
121
                                <dt><strong>language (Optional)</strong></dt>
122
                                <dd>requests a particular language for the output, default is the opac cookie language if set, the first language in opac language list or english</dd>
121
                            </dl>
123
                            </dl>
122
124
123
                            <h4>Example call</h4>
125
                            <h4>Example call</h4>
(-)a/opac/ilsdi.pl (-2 / +1 lines)
Lines 100-106 my %required = ( Link Here
100
# List of optional arguments
100
# List of optional arguments
101
my %optional = (
101
my %optional = (
102
    'Describe'            => [],
102
    'Describe'            => [],
103
    'GetAvailability'     => [ 'return_type', 'return_fmt' ],
103
    'GetAvailability'     => [ 'return_type', 'return_fmt', 'language' ],
104
    'GetRecords'          => ['schema'],
104
    'GetRecords'          => ['schema'],
105
    'GetAuthorityRecords' => ['schema'],
105
    'GetAuthorityRecords' => ['schema'],
106
    'LookupPatron'        => ['id_type'],
106
    'LookupPatron'        => ['id_type'],
107
- 

Return to bug 22347