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

(-)a/C4/Items.pm (-1 / +10 lines)
Lines 1227-1233 sub GetItemsInfo { Link Here
1227
           itemtypes.notforloan as notforloan_per_itemtype,
1227
           itemtypes.notforloan as notforloan_per_itemtype,
1228
           holding.branchurl,
1228
           holding.branchurl,
1229
           holding.branchname,
1229
           holding.branchname,
1230
           holding.opac_info as branch_opac_info
1230
           holding.opac_info as branch_opac_info,
1231
           home.branchurl AS homebranchurl
1231
     FROM items
1232
     FROM items
1232
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1233
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1233
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1234
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 1279-1284 sub GetItemsInfo { Link Here
1279
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1280
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1280
            $data->{'branchname'} = $bdata->{'branchname'};
1281
            $data->{'branchname'} = $bdata->{'branchname'};
1281
        }
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
        }
1282
        $data->{'datedue'}        = $datedue;
1291
        $data->{'datedue'}        = $datedue;
1283
1292
1284
        # get notforloan complete status if applicable
1293
        # get notforloan complete status if applicable
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 234-239 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
234
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
234
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
235
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
235
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
236
('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
236
('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
237
('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
238
('OpacLocationBranchToDisplayShelving','holding','holding|home|both','In the OPAC, display the shelving location under which which column.',  'Choice'),
237
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
239
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
238
('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'),
240
('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'),
239
('OpacMainUserBlockMobile','',NULL,'Show the following HTML in its own column on the main page of the OPAC (mobile version):','free'),
241
('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 7306-7311 if ( CheckVersion($DBversion) ) { Link Here
7306
    SetVersion($DBversion);
7306
    SetVersion($DBversion);
7307
}
7307
}
7308
7308
7309
$DBversion = "3.13.00.XXX";
7310
if ( CheckVersion($DBversion) ) {
7311
    $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')");
7312
    $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')");
7313
    print "Upgrade to $DBversion done (Bug 7720 - Ambiguity in OPAC Details location.)\n";
7314
    SetVersion($DBversion);
7315
}
7316
7309
=head1 FUNCTIONS
7317
=head1 FUNCTIONS
7310
7318
7311
=head2 TableExists($table)
7319
=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 1500-1506 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1500
    <table class="holdingst">
1500
    <table class="holdingst">
1501
        <thead><tr>
1501
        <thead><tr>
1502
            [% 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 %]
1503
            <th id="item_location" class="location">Location</th>
1503
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1504
                <th>Current Location</th>
1505
            [% END %]
1506
            [% UNLESS ( singleBranchMode ) %]
1507
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1508
                    <th>Home Library</th>
1509
                [% END %]
1510
            [% END %]
1504
            [% 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 %]
1505
            <th id="item_callnumber" class="call_no">Call number</th>
1512
            <th id="item_callnumber" class="call_no">Call number</th>
1506
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
1513
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
Lines 1524-1544 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1524
        <tr vocab="http://schema.org/" typeof="Offer">
1531
        <tr vocab="http://schema.org/" typeof="Offer">
1525
      [% END %]
1532
      [% END %]
1526
      [% 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 %]
1533
      [% 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 %]
1527
             <td class="location" property="seller">
1534
        [% UNLESS ( singleBranchMode ) %]
1528
                <link property="itemOffered" href="#record" />
1535
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1529
                <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1536
                <td class="location_holding" property="seller">
1530
    [% UNLESS ( singleBranchMode ) %]
1537
                     <link property="itemOffered" href="#record" />
1531
        <div class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1538
                     <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1532
        [% IF ( ITEM_RESULT.branchurl ) %]
1539
                     <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1533
            <a href="[% ITEM_RESULT.branchurl %]" title="">[% ITEM_RESULT.branchname %]</a>
1540
                         [% IF ( ITEM_RESULT.branchurl ) %]
1541
                             <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1542
                         [% ELSE %]
1543
                             [% ITEM_RESULT.branchname %]
1544
                         [% END %]
1545
                     </span>
1546
1547
                    [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1548
                        <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1549
                    [% END %]
1550
1551
                    <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1552
                </td>
1553
            [% END %]
1554
1555
            [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1556
                    <td class="location_home" property="seller">
1557
                            <link property="itemOffered" href="#record" />
1558
                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1559
1560
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1561
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1562
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1563
                                    [% ELSE %]
1564
                                             [% ITEM_RESULT.homebranchname %]
1565
                                    [% END %]
1566
                            </span>
1567
1568
                            [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1569
                                    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1570
                            [% END %]
1571
                    </td>
1572
            [% END %]
1534
        [% ELSE %]
1573
        [% ELSE %]
1535
            <span title="">[% ITEM_RESULT.branchname %]</span>
1574
            <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
1536
        [% END %]
1575
        [% END %]
1537
            <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1538
        </div>
1539
    [% END %]
1540
    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1541
    </td>
1542
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1576
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1543
        <td class="call_no" property="sku">
1577
        <td class="call_no" property="sku">
1544
            [% IF ( ITEM_RESULT.itemcallnumber ) %]
1578
            [% IF ( ITEM_RESULT.itemcallnumber ) %]
(-)a/opac/opac-detail.pl (-1 / +5 lines)
Lines 1065-1068 if ( C4::Context->preference('UseCourseReserves') ) { Link Here
1065
    }
1065
    }
1066
}
1066
}
1067
1067
1068
$template->param(
1069
    'OpacLocationBranchToDisplay'         => C4::Context->preference('OpacLocationBranchToDisplay') ,
1070
    'OpacLocationBranchToDisplayShelving' => C4::Context->preference('OpacLocationBranchToDisplayShelving'),
1071
);
1072
1068
output_html_with_http_headers $query, $cookie, $template->output;
1073
output_html_with_http_headers $query, $cookie, $template->output;
1069
- 

Return to bug 7720