Bug 28373: Add PassItemMarcToXSLT system preference
Default stylesheets do not reference item fields for XSLT display, however, we spend time translating the values in the item fields. This patch adds a system preference, PassItemMarcToXSLT. and unless enabled we remove item fields before processing To test: 1 - Perform some search on the staff client and opac 2 - Use the console (F12) to view the time spent on the network tab 3 - Note performance 4 - Apply patch, updatedatabase, restart_all 5 - Repeat searches 6 - Note that display has not changed 7 - Note performance, results should display slightly faster Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
1648c52c92
commit
fc20c964b0
|
|
@ -1712,6 +1712,7 @@ sub searchResults {
|
|||
|
||||
# Pull out the items fields
|
||||
my @fields = $marcrecord->field($itemtag);
|
||||
$marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT');
|
||||
my $marcflavor = C4::Context->preference("marcflavour");
|
||||
|
||||
# adding linked items that belong to host records
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
$DBversion = 'XXX';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
$dbh->do( q{
|
||||
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
|
||||
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo');
|
||||
});
|
||||
|
||||
NewVersion( $DBversion, 28373, "Add PassItemMarcToXSLT system preference");
|
||||
}
|
||||
|
|
@ -507,6 +507,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
|
|||
('OverdueNoticeCalendar',0,NULL,'Take the calendar into consideration when generating overdue notices','YesNo'),
|
||||
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
|
||||
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
|
||||
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'),
|
||||
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
|
||||
('PatronAutoComplete','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
|
||||
('PatronDuplicateMatchingAddFields','surname|firstname|dateofbirth', NULL,'A list of fields separated by "|" to deduplicate patrons when created','Free'),
|
||||
|
|
|
|||
|
|
@ -273,6 +273,13 @@ Searching:
|
|||
1: "Display"
|
||||
0: "Don't display"
|
||||
- ' Koha record level itemtype info on detail and result pages in the OPAC and staff interface. This info also displays if the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=item-level_itypes">item-level_itypes</a> system preference is set to bibliographic record.'
|
||||
-
|
||||
- pref: PassItemMarcToXSLT
|
||||
type: boolean
|
||||
choices:
|
||||
1: Do
|
||||
0: "Don't"
|
||||
- "make item MARC tags available to XSLT stylesheets. Default is \"Don't\", items are disaplyed using other methods"
|
||||
Did you mean/spell checking:
|
||||
-
|
||||
- "Swedish service for spellchecking.<br/>"
|
||||
|
|
|
|||
Loading…
Reference in New Issue