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

(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 351-353 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
351
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');
351
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('CalendarFirstDayOfWeek','Sunday','Select the first day of week to use in the calendar.','Sunday|Monday','Choice');
352
INSERT INTO systempreferences` (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelayCharge', '0', NULL , 'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.',  'free')
352
INSERT INTO systempreferences` (variable,value,options,explanation,type) VALUES ('ExpireReservesMaxPickUpDelayCharge', '0', NULL , 'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.',  'free')
353
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RoutingListNote','To change this note edit <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped">RoutlingListNote</a> system preference.','Define a note to be shown on all routing lists','70|10','Textarea');
353
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RoutingListNote','To change this note edit <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RoutingListNote#jumped">RoutlingListNote</a> system preference.','Define a note to be shown on all routing lists','70|10','Textarea');
354
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');
(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 4923-4928 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4923
    SetVersion($DBversion);
4923
    SetVersion($DBversion);
4924
}
4924
}
4925
4925
4926
$DBversion = "3.07.00.XXX";
4927
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
4928
    $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')");
4929
    print "Upgrade to $DBversion done (Added system preference OpacLocationBranchToDisplay)\n";
4930
    SetVersion($DBversion);
4931
}
4926
4932
4927
=head1 FUNCTIONS
4933
=head1 FUNCTIONS
4928
4934
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+8 lines)
Lines 86-91 OPAC: Link Here
86
                  no: "Don't show"
86
                  no: "Don't show"
87
            - the name of the patron that has an item checked out on item detail pages on the OPAC.
87
            - the name of the patron that has an item checked out on item detail pages on the OPAC.
88
        -
88
        -
89
            - Display the
90
            - pref: OpacLocationBranchToDisplay
91
              choices:
92
                  home: "home library" 
93
                  holding: "holding library"
94
                  both: "home and holding libraries"
95
            - for items on the OPAC record details page.
96
        -
89
            - pref: OpacKohaUrl
97
            - pref: OpacKohaUrl
90
              default: 0
98
              default: 0
91
              choices:
99
              choices:
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-19 / +33 lines)
Lines 580-587 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
580
	<table id="holdingst">
580
	<table id="holdingst">
581
	    <thead><tr>
581
	    <thead><tr>
582
		[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
582
		[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
583
		<th>Current Location</th>
583
		[% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
584
		[% UNLESS ( singleBranchMode ) %]<th>Home Library</th>[% END %]
584
			<th>Current Location</th>
585
		[% END %]
586
		[% UNLESS ( singleBranchMode ) %]
587
			[% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
588
				<th>Home Library</th>
589
			[% END %]
590
		[% END %]
585
	    [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
591
	    [% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %]
586
	    <th>Call Number</th>
592
	    <th>Call Number</th>
587
	    [% IF ( itemdata_enumchron ) %]<th>Vol Info</th>[% END %]
593
	    [% IF ( itemdata_enumchron ) %]<th>Vol Info</th>[% END %]
Lines 593-621 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
593
	    </tr></thead>
599
	    </tr></thead>
594
	    <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
600
	    <tbody>[% FOREACH ITEM_RESULT IN ITEM_RESULTS %]
595
	    <tr>[% IF ( item_level_itypes ) %]<td>[% 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 %]
601
	    <tr>[% IF ( item_level_itypes ) %]<td>[% 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 %]
596
		<td>
602
		[% UNLESS ( singleBranchMode ) %]
597
			[% UNLESS ( singleBranchMode ) %]
603
			[% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
604
				<td>
605
					[% IF ( ITEM_RESULT.branchurl ) %]
606
						<a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
607
					[% ELSE %]
608
						[% ITEM_RESULT.branchname %]
609
					[% END %]
610
	
611
				</td>
612
			[% END %]
613
614
			[% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
615
				<td>
616
		                        [% IF ( ITEM_RESULT.homebranchurl ) %]
617
	        	                        <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
618
	                                [% ELSE %]
619
	                                        [% ITEM_RESULT.homebranchname %]
620
	                                [% END %]			
621
622
					<span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
623
				</td>
624
			[% END %]
625
		[% ELSE %]
626
			<td>
598
				[% IF ( ITEM_RESULT.branchurl ) %]
627
				[% IF ( ITEM_RESULT.branchurl ) %]
599
					<a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
628
					<a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
600
				[% ELSE %]
629
				[% ELSE %]
601
					[% ITEM_RESULT.branchname %]
630
					[% ITEM_RESULT.branchname %]
602
				[% END %]
631
				[% END %]
603
632
604
			[% END %]
605
606
			[% IF ( singleBranchMode ) %]
607
				<span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
608
			[% END %]
609
		</td>
610
611
		[% UNLESS ( singleBranchMode ) %]
612
			<td>
613
	                        [% IF ( ITEM_RESULT.homebranchurl ) %]
614
        	                        <a href="[% ITEM_RESULT.homebranchurl %]">[% ITEM_RESULT.homebranchname %]</a>
615
                                [% ELSE %]
616
                                        [% ITEM_RESULT.homebranchname %]
617
                                [% END %]			
618
619
				<span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
633
				<span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
620
			</td>
634
			</td>
621
		[% END %]
635
		[% END %]
(-)a/opac/opac-detail.pl (-1 / +2 lines)
Lines 944-947 if (C4::Context->preference('OPACLocalCoverImages') == 1) { Link Here
944
    $template->{VARS}->{localimages} = \@images;
944
    $template->{VARS}->{localimages} = \@images;
945
}
945
}
946
946
947
$template->param('OpacLocationBranchToDisplay' => C4::Context->preference('OpacLocationBranchToDisplay') );
948
947
output_html_with_http_headers $query, $cookie, $template->output;
949
output_html_with_http_headers $query, $cookie, $template->output;
948
- 

Return to bug 7720