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 (-58 / +89 lines)
Lines 95-107 Link Here
95
            $("#highlight_toggle_off").show().click(function() {highlightOff(); return false;});[% END %][% END %]
95
            $("#highlight_toggle_off").show().click(function() {highlightOff(); return false;});[% END %][% END %]
96
	[% IF ( GoogleJackets ) %]
96
	[% IF ( GoogleJackets ) %]
97
        KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);
97
        KOHA.Google.GetCoverFromIsbn([% covernewwindow %]);
98
	[% END %]
98
        [% END %]
99
	[% IF OpenLibraryCovers %]
99
        [% IF OpenLibraryCovers %]
100
	KOHA.OpenLibrary.GetCoverFromIsbn();
100
        KOHA.OpenLibrary.GetCoverFromIsbn();
101
	[% END %]
101
        [% END %]
102
	[% IF OPACLocalCoverImages %]
102
        [% IF OPACLocalCoverImages %]
103
	KOHA.LocalCover.GetCoverFromBibnumber(true);
103
        KOHA.LocalCover.GetCoverFromBibnumber(true);
104
	[% END %]
104
        [% END %]
105
        [% IF ( NovelistSelectProfile ) %]
105
        [% IF ( NovelistSelectProfile ) %]
106
        novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){});
106
        novSelect.loadContentForISBN('[% normalized_isbn %]','[% NovelistSelectProfile %]', '[% NovelistSelectPassword %]', function(d){});
107
        [% END %]
107
        [% END %]
Lines 355-371 function renderPagination(index, total, ul, highlIndex) Link Here
355
355
356
YAHOO.util.Event.onContentReady("furtherm", function () {
356
YAHOO.util.Event.onContentReady("furtherm", function () {
357
    $("#furtherm").css("display","block").css("visibility","hidden");
357
    $("#furtherm").css("display","block").css("visibility","hidden");
358
	$("#furthersearches").parent().show();
358
        $("#furthersearches").parent().show();
359
	var furthersearchesMenu = new YAHOO.widget.Menu("furtherm");
359
        var furthersearchesMenu = new YAHOO.widget.Menu("furtherm");
360
		furthersearchesMenu.render();
360
                furthersearchesMenu.render();
361
		furthersearchesMenu.cfg.setProperty("context", ["furthersearches", "tr", "br"]);
361
                furthersearchesMenu.cfg.setProperty("context", ["furthersearches", "tr", "br"]);
362
		furthersearchesMenu.subscribe("beforeShow",positionfurthersearchesMenu);
362
                furthersearchesMenu.subscribe("beforeShow",positionfurthersearchesMenu);
363
		furthersearchesMenu.subscribe("show", furthersearchesMenu.focus);
363
                furthersearchesMenu.subscribe("show", furthersearchesMenu.focus);
364
        function positionfurthersearchesMenu() {
364
        function positionfurthersearchesMenu() {
365
                    furthersearchesMenu.align("tr", "br");
365
                    furthersearchesMenu.align("tr", "br");
366
		}
366
                }
367
		YAHOO.util.Event.addListener("furthersearches", "click", furthersearchesMenu.show, null, furthersearchesMenu);
367
                YAHOO.util.Event.addListener("furthersearches", "click", furthersearchesMenu.show, null, furthersearchesMenu);
368
		YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionfurthersearchesMenu);
368
                YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionfurthersearchesMenu);
369
 });
369
 });
370
//]]>
370
//]]>
371
</script>
371
</script>
Lines 555-579 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
555
555
556
<!-- This puts the LTFL reviews in, and if TabbedView is not set, puts the remaining content above the Tabs instead of in them -->
556
<!-- This puts the LTFL reviews in, and if TabbedView is not set, puts the remaining content above the Tabs instead of in them -->
557
[% IF ( LibraryThingForLibrariesID ) %]
557
[% IF ( LibraryThingForLibrariesID ) %]
558
	[% UNLESS ( LibraryThingForLibrariesTabbedView ) %]
558
        [% UNLESS ( LibraryThingForLibrariesTabbedView ) %]
559
		<div class="results_summary"><div id="ltfl_related" class="ltfl"></div></div> 
559
                <div class="results_summary"><div id="ltfl_related" class="ltfl"></div></div>
560
		<div class="results_summary"><div id="ltfl_similars" class="ltfl"></div></div> 
560
                <div class="results_summary"><div id="ltfl_similars" class="ltfl"></div></div>
561
		<div class="results_summary"><div id="ltfl_tagbrowse" class="ltfl"></div></div> 
561
                <div class="results_summary"><div id="ltfl_tagbrowse" class="ltfl"></div></div>
562
	[% END %]
562
        [% END %]
563
	<span class="results_summary">
563
        <span class="results_summary">
564
        <span class="label">Reviews from LibraryThing.com:</span>	
564
        <span class="label">Reviews from LibraryThing.com:</span>
565
        <span style="display: block;" class="ltfl_reviews"></span>
565
        <span style="display: block;" class="ltfl_reviews"></span>
566
    </span>
566
    </span>
567
[% END %] 
567
[% END %] 
568
568
569
<!--This grabs all of the lists a bib record appears in -->
569
<!--This grabs all of the lists a bib record appears in -->
570
[% IF ( GetShelves ) %]
570
[% IF ( GetShelves ) %]
571
	<span class="results_summary"><span class="label">List(s) this item appears in: </span>
571
        <span class="results_summary"><span class="label">List(s) this item appears in: </span>
572
	[% FOREACH GetShelve IN GetShelves %]
572
        [% FOREACH GetShelve IN GetShelves %]
573
		<a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a>
573
                <a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a>
574
		[% IF ( loop.last ) %][% ELSE %]|[% END %]
574
                [% IF ( loop.last ) %][% ELSE %]|[% END %]
575
	[% END %]
575
        [% END %]
576
	</span>
576
        </span>
577
[% END %]
577
[% END %]
578
578
579
[% IF ( TagsShowEnabled ) %]
579
[% IF ( TagsShowEnabled ) %]
Lines 812-818 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
812
<div id="holdings">
812
<div id="holdings">
813
[% IF ( itemloop.size ) %]
813
[% IF ( itemloop.size ) %]
814
    [% IF ( lotsofitems ) %]
814
    [% IF ( lotsofitems ) %]
815
	<p>This record has many physical items. <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]&amp;viewallitems=1#holdings">Click here to view them all.</a></p>
815
        <p>This record has many physical items. <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]&amp;viewallitems=1#holdings">Click here to view them all.</a></p>
816
    [% ELSE %]
816
    [% ELSE %]
817
        [% INCLUDE items_table items=itemloop tab="holdings" %]
817
        [% INCLUDE items_table items=itemloop tab="holdings" %]
818
    [% END %]
818
    [% END %]
Lines 915-927 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
915
[% FOREACH SYNDETICS_REVIEW IN SYNDETICS_REVIEWS %]
915
[% FOREACH SYNDETICS_REVIEW IN SYNDETICS_REVIEWS %]
916
    [% IF ( SYNDETICS_REVIEW.title ) %]
916
    [% IF ( SYNDETICS_REVIEW.title ) %]
917
    <h4>[% SYNDETICS_REVIEW.title %]</h4>
917
    <h4>[% SYNDETICS_REVIEW.title %]</h4>
918
	[% FOREACH review IN SYNDETICS_REVIEW.reviews %]
918
        [% FOREACH review IN SYNDETICS_REVIEW.reviews %]
919
919
920
	[% IF ( review.content ) %]
920
        [% IF ( review.content ) %]
921
		[% review.content %]
921
                [% review.content %]
922
	[% END %]
922
        [% END %]
923
923
924
	[% END %]
924
        [% END %]
925
    [% END %]
925
    [% END %]
926
[% END %]
926
[% END %]
927
</div>
927
</div>
Lines 1004-1028 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
1004
1004
1005
[% IF ( LibraryThingForLibrariesID ) %] 
1005
[% IF ( LibraryThingForLibrariesID ) %] 
1006
[% IF ( LibraryThingForLibrariesTabbedView ) %]
1006
[% IF ( LibraryThingForLibrariesTabbedView ) %]
1007
	<!-- Library Thing for Libraries Content --> 
1007
        <!-- Library Thing for Libraries Content -->
1008
		<div id="LFTLSimilarItems">
1008
                <div id="LFTLSimilarItems">
1009
			<div class="content_set">
1009
                        <div class="content_set">
1010
	<!-- Uncommenting this span makes the font smaller in the tab for LTFL -->
1010
        <!-- Uncommenting this span makes the font smaller in the tab for LTFL -->
1011
    <!-- but breaks Xhtml validation -->
1011
    <!-- but breaks Xhtml validation -->
1012
 	<!--	<span class="results_summary">-->
1012
         <!--        <span class="results_summary">-->
1013
				<div id="ltfl_related"></div>
1013
                                <div id="ltfl_related"></div>
1014
				<div id="ltfl_similars"></div>
1014
                                <div id="ltfl_similars"></div>
1015
	<!--			</span>-->
1015
        <!--                        </span>-->
1016
			</div>
1016
                        </div>
1017
		</div>
1017
                </div>
1018
		 <div id="LTFLTagBrowse">
1018
                 <div id="LTFLTagBrowse">
1019
                        <div class="content_set">
1019
                        <div class="content_set">
1020
                                <!-- <span class="results_summary"> -->
1020
                                <!-- <span class="results_summary"> -->
1021
                                <div id="ltfl_tagbrowse" class="ltfl"></div>
1021
                                <div id="ltfl_tagbrowse" class="ltfl"></div>
1022
                                <!-- </span> -->
1022
                                <!-- </span> -->
1023
                        </div>
1023
                        </div>
1024
                </div>
1024
                </div>
1025
	[% END %]
1025
        [% END %]
1026
[% END %]
1026
[% END %]
1027
<!-- /Library Thing for Libraries Content -->
1027
<!-- /Library Thing for Libraries Content -->
1028
1028
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">
1283
    [% UNLESS ( singleBranchMode ) %]
1289
    [% UNLESS ( singleBranchMode ) %]
1284
        <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1290
        [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1285
        [% IF ( ITEM_RESULT.branchurl ) %]
1291
            <td class="location_holding">
1286
        <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
1292
                 <span class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
1287
        [% ELSE %]
1293
                     [% IF ( ITEM_RESULT.branchurl ) %]
1288
        [% ITEM_RESULT.branchname %]
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>
1289
        [% END %]
1306
        [% END %]
1290
        </span>
1307
1291
        <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
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 %]
1323
    [% ELSE %]
1324
        <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
1292
    [% END %]
1325
    [% 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