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 427-429 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
427
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('UseCourseReserves', '0', 'Enable the course reserves feature.', NULL, 'YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowHoldNotes',0,'Show hold notes on OPAC','','YesNo');
428
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowHoldNotes',0,'Show hold notes on OPAC','','YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
429
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
430
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');
431
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 6983-6988 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
6983
    SetVersion($DBversion);
6983
    SetVersion($DBversion);
6984
}
6984
}
6985
6985
6986
$DBversion = "3.13.00.XXX";
6987
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6988
    $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')");
6989
    $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')");
6990
    print "Upgrade to $DBversion done (Added system preference OpacLocationBranchToDisplay)\n";
6991
    SetVersion($DBversion);
6992
}
6986
6993
6987
=head1 FUNCTIONS
6994
=head1 FUNCTIONS
6988
6995
(-)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 (-12 / +43 lines)
Lines 1474-1480 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1474
    <table class="holdingst">
1474
    <table class="holdingst">
1475
        <thead><tr>
1475
        <thead><tr>
1476
            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
1476
            [% IF ( item_level_itypes ) %]<th id="item_itemtype">Item type</th>[% END %]
1477
            <th id="item_location">Location</th>
1477
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
1478
                <th>Current Location</th>
1479
            [% END %]
1480
            [% UNLESS ( singleBranchMode ) %]
1481
                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1482
                    <th>Home Library</th>
1483
                [% END %]
1484
            [% END %]
1478
            [% IF ( itemdata_ccode ) %]<th id="item_ccode">Collection</th>[% END %]
1485
            [% IF ( itemdata_ccode ) %]<th id="item_ccode">Collection</th>[% END %]
1479
            <th id="item_callnumber">Call number</th>
1486
            <th id="item_callnumber">Call number</th>
1480
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron">Vol info</th>[% END %]
1487
            [% IF ( itemdata_enumchron ) %]<th id="item_enumchron">Vol info</th>[% END %]
Lines 1494-1512 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1494
	    <tbody>[% FOREACH ITEM_RESULT IN items %]
1501
	    <tbody>[% FOREACH ITEM_RESULT IN items %]
1495
      [% IF ITEM_RESULT.this_branch %]<tr class="highlight-row-detail">[% ELSE %]<tr>[% END %]
1502
      [% IF ITEM_RESULT.this_branch %]<tr class="highlight-row-detail">[% ELSE %]<tr>[% END %]
1496
      [% 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 %]
1503
      [% 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 %]
1497
             <td class="location">
1504
        [% UNLESS ( singleBranchMode ) %]
1498
    [% UNLESS ( singleBranchMode ) %]
1505
            [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1499
        <div class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1506
                <td class="location_holding">
1500
        [% IF ( ITEM_RESULT.branchurl ) %]
1507
                     <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1501
            <a href="[% ITEM_RESULT.branchurl %]" title="">[% ITEM_RESULT.branchname %]</a>
1508
                         [% IF ( ITEM_RESULT.branchurl ) %]
1509
                             <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1510
                         [% ELSE %]
1511
                             [% ITEM_RESULT.branchname %]
1512
                         [% END %]
1513
                     </span>
1514
1515
                    [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1516
                        <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1517
                    [% END %]
1518
1519
                    <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1520
                </td>
1521
            [% END %]
1522
1523
            [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
1524
                    <td class="location_home">
1525
                            <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1526
                                    [% IF ( ITEM_RESULT.homebranchurl ) %]
1527
                                            <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
1528
                                    [% ELSE %]
1529
                                             [% ITEM_RESULT.homebranchname %]
1530
                                    [% END %]
1531
                            </span>
1532
1533
                            [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
1534
                                    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1535
                            [% END %]
1536
                    </td>
1537
            [% END %]
1502
        [% ELSE %]
1538
        [% ELSE %]
1503
            <span title="">[% ITEM_RESULT.branchname %]</span>
1539
            <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
1504
        [% END %]
1540
        [% END %]
1505
            <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
1506
        </div>
1507
    [% END %]
1508
    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
1509
    </td>
1510
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1541
            [% IF ( itemdata_ccode ) %]<td class="collection">[% ITEM_RESULT.ccode %]</td>[% END %]
1511
        <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>
1542
        <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>
1512
            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
1543
            [% IF ( itemdata_enumchron ) %]<td class="vol_info">[% ITEM_RESULT.enumchron %]</td>[% END %]
(-)a/opac/opac-detail.pl (-1 / +5 lines)
Lines 1062-1065 if ( C4::Context->preference('UseCourseReserves') ) { Link Here
1062
    }
1062
    }
1063
}
1063
}
1064
1064
1065
$template->param(
1066
    'OpacLocationBranchToDisplay'         => C4::Context->preference('OpacLocationBranchToDisplay') ,
1067
    'OpacLocationBranchToDisplayShelving' => C4::Context->preference('OpacLocationBranchToDisplayShelving'),
1068
);
1069
1065
output_html_with_http_headers $query, $cookie, $template->output;
1070
output_html_with_http_headers $query, $cookie, $template->output;
1066
- 

Return to bug 7720