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

(-)a/C4/Items.pm (-8 lines)
Lines 1280-1293 sub GetItemsInfo { Link Here
1280
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1280
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1281
            $data->{'branchname'} = $bdata->{'branchname'};
1281
            $data->{'branchname'} = $bdata->{'branchname'};
1282
        }
1282
        }
1283
        $bsth = $dbh->prepare(
1284
            "SELECT * FROM branches WHERE branchcode = ?
1285
        "
1286
        );
1287
        $bsth->execute( $data->{'homebranch'} );
1288
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1289
            $data->{'homebranchname'} = $bdata->{'branchname'};
1290
        }
1291
        $data->{'datedue'}        = $datedue;
1283
        $data->{'datedue'}        = $datedue;
1292
1284
1293
        # get notforloan complete status if applicable
1285
        # 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 1500-1510 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1500
        <thead><tr>
1501
        <thead><tr>
1501
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1502
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1502
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1503
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1503
                <th>Current Location</th>
1504
                <th>Current location</th>
1504
            [% END %]
1505
            [% END %]
1505
            [% UNLESS ( singleBranchMode ) %]
1506
            [% UNLESS ( singleBranchMode ) %]
1506
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1507
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1507
                    <th>Home Library</th>
1508
                    <th>Home library</th>
1508
                [% END %]
1509
                [% END %]
1509
            [% END %]
1510
            [% END %]
1510
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1511
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
Lines 1557-1566 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1557
                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1558
                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1558
1559
1559
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1560
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1560
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1561
                                    [% IF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %]
1561
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1562
                                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a>
1562
                                    [% ELSE %]
1563
                                    [% ELSE %]
1563
                                             [% ITEM_RESULT.homebranchname %]
1564
                                             [% Branches.GetName( ITEM_RESULT.homebranch ) %]
1564
                                    [% END %]
1565
                                    [% END %]
1565
                            </span>
1566
                            </span>
1566
1567
1567
- 

Return to bug 7720