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

(-)a/C4/Items.pm (-1 / +10 lines)
Lines 1270-1276 sub GetItemsInfo { Link Here
1270
           itemtypes.notforloan as notforloan_per_itemtype,
1270
           itemtypes.notforloan as notforloan_per_itemtype,
1271
           holding.branchurl,
1271
           holding.branchurl,
1272
           holding.branchname,
1272
           holding.branchname,
1273
           holding.opac_info as branch_opac_info
1273
           holding.opac_info as branch_opac_info,
1274
           home.branchurl AS homebranchurl
1274
     FROM items
1275
     FROM items
1275
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1276
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1276
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1277
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 1322-1327 sub GetItemsInfo { Link Here
1322
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1323
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1323
            $data->{'branchname'} = $bdata->{'branchname'};
1324
            $data->{'branchname'} = $bdata->{'branchname'};
1324
        }
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
        }
1325
        $data->{'datedue'}        = $datedue;
1334
        $data->{'datedue'}        = $datedue;
1326
1335
1327
        # get notforloan complete status if applicable
1336
        # get notforloan complete status if applicable
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 245-250 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
245
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
245
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
246
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
246
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
247
('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
247
('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
248
('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
249
('OpacLocationBranchToDisplayShelving','holding','holding|home|both','In the OPAC, display the shelving location under which which column.',  'Choice'),
248
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
250
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
249
('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','70|10','A user-defined block of HTML  in the main content area of the opac main page','Textarea'),
251
('OpacMainUserBlock','Welcome to Koha...\r\n<hr>','70|10','A user-defined block of HTML  in the main content area of the opac main page','Textarea'),
250
('OpacMainUserBlockMobile','',NULL,'Show the following HTML in its own column on the main page of the OPAC (mobile version):','free'),
252
('OpacMainUserBlockMobile','',NULL,'Show the following HTML in its own column on the main page of the OPAC (mobile version):','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 8465-8470 if ( CheckVersion($DBversion) ) { Link Here
8465
    SetVersion($DBversion);
8465
    SetVersion($DBversion);
8466
}
8466
}
8467
8467
8468
$DBversion = "3.13.00.XXX";
8469
if ( CheckVersion($DBversion) ) {
8470
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLocationBranchToDisplay',  'holding',  'holding|home|both',  'In the OPAC, under location show which branch for Location in the record details.',  'Choice')");
8471
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLocationBranchToDisplayShelving',  'holding',  'holding|home|both',  'In the OPAC, display the shelving location under which which column',  'Choice')");
8472
    print "Upgrade to $DBversion done (Bug 7720 - Ambiguity in OPAC Details location.)\n";
8473
    SetVersion($DBversion);
8474
}
8475
8468
=head1 FUNCTIONS
8476
=head1 FUNCTIONS
8469
8477
8470
=head2 TableExists($table)
8478
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+16 lines)
Lines 110-115 OPAC: Link Here
110
                  no: "Don't show"
110
                  no: "Don't show"
111
            - the name of the patron that has an item checked out on item detail pages on the OPAC.
111
            - the name of the patron that has an item checked out on item detail pages on the OPAC.
112
        -
112
        -
113
            - Display the
114
            - pref: OpacLocationBranchToDisplay
115
              choices:
116
                  home: "home library"
117
                  holding: "holding library"
118
                  both: "home and holding libraries"
119
            - for items on the OPAC record details page.
120
        -
121
            - Display the shelving location under the
122
            - pref: OpacLocationBranchToDisplayShelving
123
              choices:
124
                  home: "home library"
125
                  holding: "holding library"
126
                  both: "home and holding libraries"
127
            - for items on the OPAC record details page.
128
        -
113
            - pref: OpacKohaUrl
129
            - pref: OpacKohaUrl
114
              default: 0
130
              default: 0
115
              choices:
131
              choices:
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-14 / +48 lines)
Lines 1504-1510 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1504
    <table class="holdingst">
1504
    <table class="holdingst">
1505
        <thead><tr>
1505
        <thead><tr>
1506
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1506
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1507
            <th id="item_location" class="location">Location</th>
1507
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1508
                <th>Current Location</th>
1509
            [% END %]
1510
            [% UNLESS ( singleBranchMode ) %]
1511
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1512
                    <th>Home Library</th>
1513
                [% END %]
1514
            [% END %]
1508
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1515
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1509
            <th id="item_callnumber" class="call_no">Call number</th>
1516
            <th id="item_callnumber" class="call_no">Call number</th>
1510
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
1517
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
Lines 1528-1548 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1528
        <tr vocab="http://schema.org/" typeof="Offer">
1535
        <tr vocab="http://schema.org/" typeof="Offer">
1529
      [% END %]
1536
      [% END %]
1530
      [% IF ( item_level_itypes ) %]<td class="itype">[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
1537
      [% IF ( item_level_itypes ) %]<td class="itype">[% UNLESS ( noItemTypeImages ) %][% IF ( ITEM_RESULT.imageurl ) %]<img src="[% ITEM_RESULT.imageurl %]" title="[% ITEM_RESULT.description %]" alt="[% ITEM_RESULT.description %]" />[% END %][% END %] [% ITEM_RESULT.description %]</td>[% END %]
1531
             <td class="location" property="seller">
1538
        [% UNLESS ( singleBranchMode ) %]
1532
                <link property="itemOffered" href="#record" />
1539
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1533
                <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1540
                <td class="location_holding" property="seller">
1534
    [% UNLESS ( singleBranchMode ) %]
1541
                     <link property="itemOffered" href="#record" />
1535
        <div class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1542
                     <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1536
        [% IF ( ITEM_RESULT.branchurl ) %]
1543
                     <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1537
            <a href="[% ITEM_RESULT.branchurl %]" title="">[% ITEM_RESULT.branchname %]</a>
1544
                         [% IF ( ITEM_RESULT.branchurl ) %]
1545
                             <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1546
                         [% ELSE %]
1547
                             [% ITEM_RESULT.branchname %]
1548
                         [% END %]
1549
                     </span>
1550
1551
                    [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1552
                        <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1553
                    [% END %]
1554
1555
                    <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1556
                </td>
1557
            [% END %]
1558
1559
            [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1560
                    <td class="location_home" property="seller">
1561
                            <link property="itemOffered" href="#record" />
1562
                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1563
1564
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1565
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1566
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1567
                                    [% ELSE %]
1568
                                             [% ITEM_RESULT.homebranchname %]
1569
                                    [% END %]
1570
                            </span>
1571
1572
                            [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1573
                                    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1574
                            [% END %]
1575
                    </td>
1576
            [% END %]
1538
        [% ELSE %]
1577
        [% ELSE %]
1539
            <span title="">[% ITEM_RESULT.branchname %]</span>
1578
            <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
1540
        [% END %]
1579
        [% END %]
1541
            <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1542
        </div>
1543
    [% END %]
1544
    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1545
    </td>
1546
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1580
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1547
        <td class="call_no" property="sku">
1581
        <td class="call_no" property="sku">
1548
            [% IF ( ITEM_RESULT.itemcallnumber ) %]
1582
            [% IF ( ITEM_RESULT.itemcallnumber ) %]
(-)a/opac/opac-detail.pl (-1 / +5 lines)
Lines 1100-1103 if ( C4::Context->preference('UseCourseReserves') ) { Link Here
1100
    }
1100
    }
1101
}
1101
}
1102
1102
1103
$template->param(
1104
    'OpacLocationBranchToDisplay'         => C4::Context->preference('OpacLocationBranchToDisplay') ,
1105
    'OpacLocationBranchToDisplayShelving' => C4::Context->preference('OpacLocationBranchToDisplayShelving'),
1106
);
1107
1103
output_html_with_http_headers $query, $cookie, $template->output;
1108
output_html_with_http_headers $query, $cookie, $template->output;
1104
- 

Return to bug 7720