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

(-)a/catalogue/detail.pl (-4 / +15 lines)
Lines 160-168 $template->param( Link Here
160
160
161
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
161
my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search_with_localization->unblessed } };
162
162
163
my $dbh = C4::Context->dbh;
163
my $all_items = $biblio->items(
164
164
    {},
165
my $all_items = $biblio->items;
165
    {
166
        # FIXME A different order is expected if at least one items.serial is true
167
        order_by => [
168
            'homebranch.branchname',
169
            'me.enumchron',
170
            \"LDAP( me.copynumber, 8, '0' )",
171
            -asc => 'me.dateacessioned'
172
        ],
173
        join => ['homebranch']
174
    }
175
);
166
my @items;
176
my @items;
167
my $patron = Koha::Patrons->find( $borrowernumber );
177
my $patron = Koha::Patrons->find( $borrowernumber );
168
while ( my $item = $all_items->next ) {
178
while ( my $item = $all_items->next ) {
Lines 351-357 foreach my $item (@items) { Link Here
351
    # FIXME The following must be Koha::Item->serial
361
    # FIXME The following must be Koha::Item->serial
352
    my $serial_item = Koha::Serial::Items->find($item->itemnumber);
362
    my $serial_item = Koha::Serial::Items->find($item->itemnumber);
353
    if ( $serial_item ) {
363
    if ( $serial_item ) {
354
        $item_info->{serial} = $serial_item->serialid; # FIXME Not returning a Koha::Object!
364
        $item_info->{serial} = $serial_item;
355
        $itemfields{publisheddate} = 1;
365
        $itemfields{publisheddate} = 1;
356
    }
366
    }
357
367
Lines 425-430 foreach my $item (@items) { Link Here
425
        if ( not C4::Context->IsSuperLibrarian()
435
        if ( not C4::Context->IsSuperLibrarian()
426
            and $userenv->{branch} ne $item->homebranch ) {
436
            and $userenv->{branch} ne $item->homebranch ) {
427
            $item_info->{cannot_be_edited} = 1;
437
            $item_info->{cannot_be_edited} = 1;
438
            $item_info->{not_same_branch} = 1;
428
        }
439
        }
429
    }
440
    }
430
441
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-6 / +6 lines)
Lines 445-451 Note that permanent location is a code, and location may be an authval. Link Here
445
                          [% ELSE %]
445
                          [% ELSE %]
446
                            <span class="datedue">Checked out
446
                            <span class="datedue">Checked out
447
                          [% END %]
447
                          [% END %]
448
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
448
                                [% UNLESS ( item.not_same_branch) %]
449
                                  [% IF item.checkout.onsite_checkout %]
449
                                  [% IF item.checkout.onsite_checkout %]
450
                                    by
450
                                    by
451
                                  [% ELSE %]
451
                                  [% ELSE %]
Lines 495-504 Note that permanent location is a code, and location may be an authval. Link Here
495
                            [% END %]
495
                            [% END %]
496
                        [% END %]
496
                        [% END %]
497
497
498
                        [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %]
498
                        [% IF ( item.notforloan || item.itemtype.notforloan ) %]
499
                            <span class="notforloan">Not for loan
499
                            <span class="notforloan">Not for loan
500
                            [% IF ( item.notforloanvalue ) %]
500
                            [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
501
                                <span class="reason">([% item.notforloanvalue | html %])</span>
501
                            [% IF not_for_loan_description %]
502
                                <span class="reason">([% not_for_loan_description | html %])</span>
502
                            [% END %]
503
                            [% END %]
503
                            </span>
504
                            </span>
504
                        [% END %]
505
                        [% END %]
Lines 529-535 Note that permanent location is a code, and location may be an authval. Link Here
529
                        [% END %]
530
                        [% END %]
530
531
531
                        [% IF ( item.restricted ) %]
532
                        [% IF ( item.restricted ) %]
532
                            <span class="restricted">([% item.restrictedvalue | html %])</span>
533
                            <span class="restricted">([% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %])</span>
533
                        [% END %]
534
                        [% END %]
534
                    </td>
535
                    </td>
535
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
536
                    <td class="datelastseen" data-order="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</td>
536
- 

Return to bug 27272