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 232-237 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
232
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
232
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
233
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
233
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
234
('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
234
('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
235
('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
236
('OpacLocationBranchToDisplayShelving','holding','holding|home|both','In the OPAC, display the shelving location under which which column.',  'Choice'),
235
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
237
('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
236
('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'),
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'),
237
('OpacMainUserBlockMobile','',NULL,'Show the following HTML in its own column on the main page of the OPAC (mobile version):','free'),
239
('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 7139-7144 if ( CheckVersion($DBversion) ) { Link Here
7139
    SetVersion ($DBversion);
7139
    SetVersion ($DBversion);
7140
}
7140
}
7141
7141
7142
$DBversion = "3.13.00.XXX";
7143
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7144
    $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')");
7145
    $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')");
7146
    print "Upgrade to $DBversion done (Bug 7720 - Ambiguity in OPAC Details location.)\n";
7147
    SetVersion($DBversion);
7148
}
7149
7142
=head1 FUNCTIONS
7150
=head1 FUNCTIONS
7143
7151
7144
=head2 TableExists($table)
7152
=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 1499-1505 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1499
    <table class="holdingst">
1499
    <table class="holdingst">
1500
        <thead><tr>
1500
        <thead><tr>
1501
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1501
            [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
1502
            <th id="item_location" class="location">Location</th>
1502
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1503
                <th>Current Location</th>
1504
            [% END %]
1505
            [% UNLESS ( singleBranchMode ) %]
1506
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1507
                    <th>Home Library</th>
1508
                [% END %]
1509
            [% END %]
1503
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1510
            [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
1504
            <th id="item_callnumber" class="call_no">Call number</th>
1511
            <th id="item_callnumber" class="call_no">Call number</th>
1505
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
1512
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron" class="vol_info">Vol info</th>[% END %]
Lines 1523-1543 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1523
        <tr vocab="http://schema.org/" typeof="Offer">
1530
        <tr vocab="http://schema.org/" typeof="Offer">
1524
      [% END %]
1531
      [% END %]
1525
      [% 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 %]
1532
      [% 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 %]
1526
             <td class="location" property="seller">
1533
        [% UNLESS ( singleBranchMode ) %]
1527
                <link property="itemOffered" href="#record" />
1534
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1528
                <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1535
                <td class="location_holding" property="seller">
1529
    [% UNLESS ( singleBranchMode ) %]
1536
                     <link property="itemOffered" href="#record" />
1530
        <div class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1537
                     <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1531
        [% IF ( ITEM_RESULT.branchurl ) %]
1538
                     <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1532
            <a href="[% ITEM_RESULT.branchurl %]" title="">[% ITEM_RESULT.branchname %]</a>
1539
                         [% IF ( ITEM_RESULT.branchurl ) %]
1540
                             <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1541
                         [% ELSE %]
1542
                             [% ITEM_RESULT.branchname %]
1543
                         [% END %]
1544
                     </span>
1545
1546
                    [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1547
                        <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1548
                    [% END %]
1549
1550
                    <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1551
                </td>
1552
            [% END %]
1553
1554
            [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1555
                    <td class="location_home" property="seller">
1556
                            <link property="itemOffered" href="#record" />
1557
                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1558
1559
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1560
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1561
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1562
                                    [% ELSE %]
1563
                                             [% ITEM_RESULT.homebranchname %]
1564
                                    [% END %]
1565
                            </span>
1566
1567
                            [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1568
                                    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1569
                            [% END %]
1570
                    </td>
1571
            [% END %]
1533
        [% ELSE %]
1572
        [% ELSE %]
1534
            <span title="">[% ITEM_RESULT.branchname %]</span>
1573
            <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
1535
        [% END %]
1574
        [% END %]
1536
            <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1537
        </div>
1538
    [% END %]
1539
    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1540
    </td>
1541
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1575
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1542
        <td class="call_no" property="sku">[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#[% tab %]">Browse shelf</a>)[% END %][% END %]</td>
1576
        <td class="call_no" property="sku">[% IF ( ITEM_RESULT.itemcallnumber ) %] [% ITEM_RESULT.itemcallnumber %][% IF ( OPACShelfBrowser ) %] (<a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ITEM_RESULT.biblionumber %]&amp;shelfbrowse_itemnumber=[% ITEM_RESULT.itemnumber %]#[% tab %]">Browse shelf</a>)[% END %][% END %]</td>
1543
            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
1577
            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
(-)a/opac/opac-detail.pl (-1 / +5 lines)
Lines 1068-1071 if ( C4::Context->preference('UseCourseReserves') ) { Link Here
1068
    }
1068
    }
1069
}
1069
}
1070
1070
1071
$template->param(
1072
    'OpacLocationBranchToDisplay'         => C4::Context->preference('OpacLocationBranchToDisplay') ,
1073
    'OpacLocationBranchToDisplayShelving' => C4::Context->preference('OpacLocationBranchToDisplayShelving'),
1074
);
1075
1071
output_html_with_http_headers $query, $cookie, $template->output;
1076
output_html_with_http_headers $query, $cookie, $template->output;
1072
- 

Return to bug 7720