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

(-)a/C4/Koha.pm (-2 / +7 lines)
Lines 187-197 build a HTML select with the following code : Link Here
187
187
188
sub GetSupportList{
188
sub GetSupportList{
189
	my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
189
	my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes");
190
191
	my $hidden_item_types = join( ',', map{ qq{'$_'} } split(qq{ }, C4::Context->preference("SuggestionsHideItemTypes") ) );
192
	my $hide_sql = $hidden_item_types ? "WHERE itemtype NOT IN ( $hidden_item_types )" : qq{};
193
190
	if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {  
194
	if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') {  
191
		my $query = qq|
195
		my $query = qq|
192
			SELECT *
196
			SELECT *
193
			FROM   itemtypes
197
			FROM itemtypes
194
			order by description
198
			$hide_sql
199
			ORDER BY description
195
		|;
200
		|;
196
		my $sth = C4::Context->dbh->prepare($query);
201
		my $sth = C4::Context->dbh->prepare($query);
197
		$sth->execute;
202
		$sth->execute;
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 406-408 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
406
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free');
406
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free');
407
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded <style> tag.', 'free');
407
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded <style> tag.', 'free');
408
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserJS', '', NULL, 'Define custom javascript for inclusion in the SCO module', 'free');
408
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserJS', '', NULL, 'Define custom javascript for inclusion in the SCO module', 'free');
409
INSERT INTO systempreferences ( variable, value, explanation, type ) VALUES ( 'SuggestionsHideItemTypes', '', 'Item types to hide from the purchase suggestion forms, delimited by spaces', 'free' );
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 6339-6344 if ( CheckVersion($DBversion) ) { Link Here
6339
   SetVersion ($DBversion);
6339
   SetVersion ($DBversion);
6340
}
6340
}
6341
6341
6342
$DBversion = "3.11.00.XXX";
6343
if ( CheckVersion($DBversion) ) {
6344
   $dbh->do("INSERT INTO systempreferences ( variable, value, explanation, type ) VALUES ( 'SuggestionsHideItemTypes', '', 'Item types to hide from the purchase suggestion forms, delimited by spaces', 'free' )");
6345
   print "Upgrade to $DBversion done (Bug 9468 - Add ability to hide items from purchase suggestions forms)\n";
6346
   SetVersion ($DBversion);
6347
}
6348
6342
=head1 FUNCTIONS
6349
=head1 FUNCTIONS
6343
6350
6344
=head2 TableExists($table)
6351
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +5 lines)
Lines 338-343 OPAC: Link Here
338
                  no: "Don't allow"
338
                  no: "Don't allow"
339
            - patrons to make purchase suggestions on the OPAC.
339
            - patrons to make purchase suggestions on the OPAC.
340
        -
340
        -
341
            - "Do not show the following item types for purchase suggestions:"
342
            - pref: SuggestionsHideItemTypes
343
              class: multi
344
            - "(separate item types with spaces)"
345
        -
341
            - pref: reviewson
346
            - pref: reviewson
342
              choices:
347
              choices:
343
                  yes: Allow
348
                  yes: Allow
344
- 

Return to bug 9468