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

(-)a/C4/Items.pm (-8 lines)
Lines 1323-1336 sub GetItemsInfo { Link Here
1323
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1323
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1324
            $data->{'branchname'} = $bdata->{'branchname'};
1324
            $data->{'branchname'} = $bdata->{'branchname'};
1325
        }
1325
        }
1326
        $bsth = $dbh->prepare(
1327
            "SELECT * FROM branches WHERE branchcode = ?
1328
        "
1329
        );
1330
        $bsth->execute( $data->{'homebranch'} );
1331
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1332
            $data->{'homebranchname'} = $bdata->{'branchname'};
1333
        }
1334
        $data->{'datedue'}        = $datedue;
1326
        $data->{'datedue'}        = $datedue;
1335
1327
1336
        # get notforloan complete status if applicable
1328
        # get notforloan complete status if applicable
(-)a/Koha/Template/Plugin/Branches.pm (+10 lines)
Lines 44-47 sub GetLoggedInBranchcode { Link Here
44
        '';
44
        '';
45
}
45
}
46
46
47
sub GetURL {
48
    my ( $self, $branchcode ) = @_;
49
50
    my $query = "SELECT branchurl FROM branches WHERE branchcode = ?";
51
    my $sth   = C4::Context->dbh->prepare($query);
52
    $sth->execute($branchcode);
53
    my $b = $sth->fetchrow_hashref();
54
    return encode( 'UTF-8', $b->{'branchurl'} );
55
}
56
47
1;
57
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 1505-1515 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1505
        <thead><tr>
1506
        <thead><tr>
1506
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1507
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1507
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1508
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1508
                <th>Current Location</th>
1509
                <th>Current location</th>
1509
            [% END %]
1510
            [% END %]
1510
            [% UNLESS ( singleBranchMode ) %]
1511
            [% UNLESS ( singleBranchMode ) %]
1511
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1512
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1512
                    <th>Home Library</th>
1513
                    <th>Home library</th>
1513
                [% END %]
1514
                [% END %]
1514
            [% END %]
1515
            [% END %]
1515
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1516
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
Lines 1562-1571 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1562
                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1563
                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1563
1564
1564
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1565
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1565
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1566
                                    [% IF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %]
1566
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1567
                                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a>
1567
                                    [% ELSE %]
1568
                                    [% ELSE %]
1568
                                             [% ITEM_RESULT.homebranchname %]
1569
                                             [% Branches.GetName( ITEM_RESULT.homebranch ) %]
1569
                                    [% END %]
1570
                                    [% END %]
1570
                            </span>
1571
                            </span>
1571
1572
1572
- 

Return to bug 7720