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

(-)a/C4/Items.pm (-1 / +10 lines)
Lines 1222-1228 sub GetItemsInfo { Link Here
1222
           itemtypes.notforloan as notforloan_per_itemtype,
1222
           itemtypes.notforloan as notforloan_per_itemtype,
1223
           holding.branchurl,
1223
           holding.branchurl,
1224
           holding.branchname,
1224
           holding.branchname,
1225
           holding.opac_info as branch_opac_info
1225
           holding.opac_info as branch_opac_info,
1226
           home.branchurl AS homebranchurl
1226
     FROM items
1227
     FROM items
1227
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1228
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1228
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1229
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 1274-1279 sub GetItemsInfo { Link Here
1274
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1275
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1275
            $data->{'branchname'} = $bdata->{'branchname'};
1276
            $data->{'branchname'} = $bdata->{'branchname'};
1276
        }
1277
        }
1278
        $bsth = $dbh->prepare(
1279
            "SELECT * FROM branches WHERE branchcode = ?
1280
        "
1281
        );
1282
        $bsth->execute( $data->{'homebranch'} );
1283
        if ( my $bdata = $bsth->fetchrow_hashref ) {
1284
            $data->{'homebranchname'} = $bdata->{'branchname'};
1285
        }
1277
        $data->{'datedue'}        = $datedue;
1286
        $data->{'datedue'}        = $datedue;
1278
1287
1279
        # get notforloan complete status if applicable
1288
        # get notforloan complete status if applicable
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 411-413 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
411
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
411
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
414
INSERT IGNORE 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');
415
INSERT IGNORE 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');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 6399-6404 if ( CheckVersion($DBversion) ) { Link Here
6399
    SetVersion($DBversion);
6399
    SetVersion($DBversion);
6400
}
6400
}
6401
6401
6402
$DBversion = "3.11.00.XXX";
6403
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6404
    $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')");
6405
    $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')");
6406
    print "Upgrade to $DBversion done (Added system preference OpacLocationBranchToDisplay)\n";
6407
    SetVersion($DBversion);
6408
}
6402
6409
6403
=head1 FUNCTIONS
6410
=head1 FUNCTIONS
6404
6411
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+16 lines)
Lines 100-105 OPAC: Link Here
100
                  no: "Don't show"
100
                  no: "Don't show"
101
            - the name of the patron that has an item checked out on item detail pages on the OPAC.
101
            - the name of the patron that has an item checked out on item detail pages on the OPAC.
102
        -
102
        -
103
            - Display the
104
            - pref: OpacLocationBranchToDisplay
105
              choices:
106
                  home: "home library"
107
                  holding: "holding library"
108
                  both: "home and holding libraries"
109
            - for items on the OPAC record details page.
110
        -
111
            - Display the shelving location under the
112
            - pref: OpacLocationBranchToDisplayShelving
113
              choices:
114
                  home: "home library"
115
                  holding: "holding library"
116
                  both: "home and holding libraries"
117
            - for items on the OPAC record details page.
118
        -
103
            - pref: OpacKohaUrl
119
            - pref: OpacKohaUrl
104
              default: 0
120
              default: 0
105
              choices:
121
              choices:
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-12 / +43 lines)
Lines 1261-1267 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1261
    <table class="holdingst">
1261
    <table class="holdingst">
1262
        <thead><tr>
1262
        <thead><tr>
1263
            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
1263
            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
1264
            <th id="item_location">Location</th>
1264
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1265
                <th>Current Location</th>
1266
            [% END %]
1267
            [% UNLESS ( singleBranchMode ) %]
1268
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1269
                    <th>Home Library</th>
1270
                [% END %]
1271
            [% END %]
1265
            [% IF ( itemdata_ccode ) %]<th id="item_ccode">Collection</th>[% END %]
1272
            [% IF ( itemdata_ccode ) %]<th id="item_ccode">Collection</th>[% END %]
1266
            <th id="item_callnumber">Call number</th>
1273
            <th id="item_callnumber">Call number</th>
1267
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron">Vol info</th>[% END %]
1274
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron">Vol info</th>[% END %]
Lines 1279-1297 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1279
        </tr></thead>
1286
        </tr></thead>
1280
	    <tbody>[% FOREACH ITEM_RESULT IN items %]
1287
	    <tbody>[% FOREACH ITEM_RESULT IN items %]
1281
      <tr>[% 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 %]
1288
      <tr>[% 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 %]
1282
             <td class="location">
1289
        [% UNLESS ( singleBranchMode ) %]
1283
    [% UNLESS ( singleBranchMode ) %]
1290
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1284
        <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1291
                <td class="location_holding">
1285
        [% IF ( ITEM_RESULT.branchurl ) %]
1292
                     <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1286
        <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1293
                         [% IF ( ITEM_RESULT.branchurl ) %]
1294
                             <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1295
                         [% ELSE %]
1296
                             [% ITEM_RESULT.branchname %]
1297
                         [% END %]
1298
                     </span>
1299
1300
                    [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1301
                        <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1302
                    [% END %]
1303
1304
                    <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1305
                </td>
1306
            [% END %]
1307
1308
            [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1309
                    <td class="location_home">
1310
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1311
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1312
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1313
                                    [% ELSE %]
1314
                                             [% ITEM_RESULT.homebranchname %]
1315
                                    [% END %]
1316
                            </span>
1317
1318
                            [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1319
                                    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1320
                            [% END %]
1321
                    </td>
1322
            [% END %]
1287
        [% ELSE %]
1323
        [% ELSE %]
1288
        [% ITEM_RESULT.branchname %]
1324
            <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
1289
        [% END %]
1325
        [% END %]
1290
        </span>
1291
        <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1292
    [% END %]
1293
    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1294
    </td>
1295
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1326
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1296
        <td class="call_no">[% 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>
1327
        <td class="call_no">[% 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>
1297
            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
1328
            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
(-)a/opac/opac-detail.pl (-1 / +5 lines)
Lines 1006-1009 if (C4::Context->preference('OpacHighlightedWords')) { Link Here
1006
    $template->{VARS}->{query_desc} = $query->param('query_desc');
1006
    $template->{VARS}->{query_desc} = $query->param('query_desc');
1007
}
1007
}
1008
1008
1009
$template->param(
1010
    'OpacLocationBranchToDisplay'         => C4::Context->preference('OpacLocationBranchToDisplay') ,
1011
    'OpacLocationBranchToDisplayShelving' => C4::Context->preference('OpacLocationBranchToDisplayShelving'),
1012
);
1013
1009
output_html_with_http_headers $query, $cookie, $template->output;
1014
output_html_with_http_headers $query, $cookie, $template->output;
1010
- 

Return to bug 7720