Bugzilla – Attachment 70195 Details for
Bug 11297
Add support for custom PQF attributes for Z39.50 server searches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11297: QA follow-up - Some fixes
Bug-11297-QA-follow-up---Some-fixes.patch (text/plain), 5.37 KB, created by
Charles Farmer
on 2017-12-28 20:59:35 UTC
(
hide
)
Description:
Bug 11297: QA follow-up - Some fixes
Filename:
MIME Type:
Creator:
Charles Farmer
Created:
2017-12-28 20:59:35 UTC
Size:
5.37 KB
patch
obsolete
>From a925fa1a6dc8d1d23b89e3b4459557ee1aa64430 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Thu, 28 Apr 2016 22:43:32 +0200 >Subject: [PATCH] Bug 11297: QA follow-up - Some fixes > >- Makes Attributes only show up when adding a new Z39.50 server, > not for SRU >- Fixes typo in db documentation >- Fixes sorting of table columns > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > installer/data/mysql/kohastructure.sql | 2 +- > .../prog/en/modules/admin/z3950servers.tt | 73 +++++++++++++++++++++- > 2 files changed, 73 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 26ad7f7..2a21ebf 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2323,7 +2323,7 @@ CREATE TABLE `z3950servers` ( -- connection information for the Z39.50 targets u > `sru_options` varchar(255) default NULL, -- options like sru=get, sru_version=1.1; will be passed to the server via ZOOM > `sru_fields` mediumtext default NULL, -- contains the mapping between the Z3950 search fields and the specific SRU server indexes > `add_xslt` mediumtext default NULL, -- zero or more paths to XSLT files to be processed on the search results >- `attributes` VARCHAR(255) default NULL, -- additionnal attributes passed to PQF queries >+ `attributes` VARCHAR(255) default NULL, -- additional attributes passed to PQF queries > PRIMARY KEY (`id`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >index 137f284..4e2fcda 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt >@@ -18,6 +18,76 @@ > [% IF op == 'list' %] > <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> > [% END %] >+ >+<script type="text/javascript"> >+//<![CDATA[ >+[% IF ( add_form ) %] >+ $(document).ready(function(){ >+ // Update selects for syntax, encoding and recordtype >+ [% IF server %] >+ $("#syntax").val('[% server.syntax %]'); >+ $("#encoding").val('[% server.encoding %]'); >+ $("#recordtype").val('[% server.recordtype %]'); >+ [% END %] >+ // Disable recordtype (and default to bib) for non-Z3950 servers until auth is supported >+ [% UNLESS (server.servertype||type) == 'zed' %] >+ $("#recordtype").prop('disabled',true); >+ [% END %] >+ $( "#serverentry" ).validate({ >+ rules: { >+ servername: { required: true }, >+ host: { required: true }, >+ port: { >+ required: true, >+ number: true >+ }, >+ db: { required: true }, >+ rank: { number: true }, >+ timeout: { number: true } >+ } >+ }); >+ $("#serverentry").submit(function( event ) { >+ // first test if show_sru_fields exists >+ if( $('#show_sru_fields').length && $('#show_sru_fields').val()=='' && !confirm( _("No SRU search field mappings have been defined. This means that all field searches will go through the whole record. Continue?"))) { >+ return false; >+ } >+ // copy show_sru_fields to hidden counterpart >+ $('#sru_fields').val( $('#show_sru_fields').val() ); >+ // enable recordtype to include field in post >+ $('#recordtype').prop('disabled',false); >+ }); >+ $("#servername").on("blur",function(){ >+ toUC(this); >+ }); >+ $("#modify_sru_fields").on("click",function(){ >+ ModMapping(); >+ }); >+ }); >+ function ModMapping () { >+ var map= $('#show_sru_fields').val(); >+ window.open('/cgi-bin/koha/admin/sru_modmapping.pl?mapping='+map,'popup','width=800,height=400,resizable=yes,toolbar=false,scrollbars=yes,top'); >+ } >+[% ELSE %] >+ $(document).ready(function() { >+ $("#serverst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "aoColumnDefs": [ >+ { "aTargets": [-1], "bSortable": false, "bSearchable": false }, >+ ], >+ "sPaginationType": "four_button" >+ })); >+ $(".delete").on("click",function(e){ >+ var servername = $(this).data("servername"); >+ if( confirm( _("Are you sure you want to delete server %s?").format(servername) ) ) { >+ return true; >+ } else { >+ e.preventDefault(); >+ } >+ }); >+ }); >+[% END %] >+//]]> >+</script> >+ > </head> > > <body id="admin_z3950servers" class="admin"> >@@ -83,9 +153,10 @@ > </li> > <li><label for="rank">Rank (display order): </label> <input type="text" name="rank" id="rank" size="4" value="[% server.rank %]" /> > </li> >+ [% IF (server.servertype||type) == 'zed' %] > <li><label for="attributes">Attributes (additional PQF attributes added to each query): </label><input type="text" name="attributes" id="attributes" size="30" value="[% server.attributes %]" /> > </li> >- >+ [% END %] > > <li><label for="syntax">Syntax (z3950 can send<br /> records in various format. Choose one): </label> > <select name="syntax" id="syntax"> >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11297
:
23144
|
23145
|
40829
|
40889
|
48649
|
50415
|
50416
|
50420
|
50954
|
59448
|
62938
|
62939
|
70190
|
70191
|
70192
|
70193
|
70194
|
70195
|
70196
|
71992
|
71993
|
71994
|
72061
|
72062
|
72063
|
77718
|
77719
|
77720
|
77721
|
77722
|
77723
|
78294
|
78295
|
78296
|
78297
|
80372
|
80496
|
80497
|
80498
|
80499
|
81328
|
81342
|
81343
|
81344
|
81345
|
81346
|
92719
|
92720
|
92721
|
92722
|
98598
|
98599
|
98600
|
98601
|
99227
|
99228
|
99229
|
99230
|
99231