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

(-)a/C4/Items.pm (-8 lines)
Lines 1275-1288 sub GetItemsInfo { Link Here
1275
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1275
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1276
            $data->{'branchname'} = $bdata->{'branchname'};
1276
            $data->{'branchname'} = $bdata->{'branchname'};
1277
        }
1277
        }
1278
        $bsth = $dbh->prepare(
1279
            "SELECT * FROM branches WHERE branchcode = ?
1280
        "
1281
        );
1282
        $bsth->execute( $data->{'homebranch'} );
1283
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1284
            $data->{'homebranchname'} = $bdata->{'branchname'};
1285
        }
1286
        $data->{'datedue'}        = $datedue;
1278
        $data->{'datedue'}        = $datedue;
1287
1279
1288
        # get notforloan complete status if applicable
1280
        # get notforloan complete status if applicable
(-)a/Koha/Template/Plugin/Branches.pm (+10 lines)
Lines 35-38 sub GetName { Link Here
35
    return encode( 'UTF-8', $b->{'branchname'} );
35
    return encode( 'UTF-8', $b->{'branchname'} );
36
}
36
}
37
37
38
sub GetURL {
39
    my ( $self, $branchcode ) = @_;
40
41
    my $query = "SELECT branchurl FROM branches WHERE branchcode = ?";
42
    my $sth   = C4::Context->dbh->prepare($query);
43
    $sth->execute($branchcode);
44
    my $b = $sth->fetchrow_hashref();
45
    return encode( 'UTF-8', $b->{'branchurl'} );
46
}
47
38
1;
48
1;
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-6 / +6 lines)
Lines 1-5 Link Here
1
[% USE Koha %]
1
[% USE Koha %]
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% USE Branches %]
3
[% USE AuthorisedValues %]
4
[% USE AuthorisedValues %]
4
[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnDetail ) %]
5
[% SET TagsShowEnabled = ( TagsEnabled && TagsShowOnDetail ) %]
5
[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnDetail ) %]
6
[% SET TagsInputEnabled = ( opacuserlogin && TagsEnabled && TagsInputOnDetail ) %]
Lines 1476-1486 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1476
        <thead><tr>
1477
        <thead><tr>
1477
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1478
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1478
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1479
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1479
                <th>Current Location</th>
1480
                <th>Current location</th>
1480
            [% END %]
1481
            [% END %]
1481
            [% UNLESS ( singleBranchMode ) %]
1482
            [% UNLESS ( singleBranchMode ) %]
1482
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1483
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1483
                    <th>Home Library</th>
1484
                    <th>Home library</th>
1484
                [% END %]
1485
                [% END %]
1485
            [% END %]
1486
            [% END %]
1486
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1487
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
Lines 1524-1533 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1524
            [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1525
            [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1525
                    <td class="location_home">
1526
                    <td class="location_home">
1526
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1527
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1527
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1528
                                    [% IF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %]
1528
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1529
                                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a>
1529
                                    [% ELSE %]
1530
                                    [% ELSE %]
1530
                                             [% ITEM_RESULT.homebranchname %]
1531
                                             [% Branches.GetName( ITEM_RESULT.homebranch ) %]
1531
                                    [% END %]
1532
                                    [% END %]
1532
                            </span>
1533
                            </span>
1533
1534
1534
- 

Return to bug 7720