From bugzilla-daemon@bugs.koha-community.org Tue Mar 13 18:37:06 2018 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 11361] Add a Z39.50 search page in the OPAC to let members search for records on remote Koha instances. Date: Tue, 13 Mar 2018 17:37:00 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8584229390048737612==" --===============8584229390048737612== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D11361 Maksim Sen changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60952|0 |1 is obsolete| | --- Comment #9 from Maksim Sen --- Created attachment 72812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3D72812&action=3D= edit These are the points in the code review that I corrected in this patch. ::: C4/Auth.pm @@ +523,4 @@ > OPACURLOpenInNewWindow =3D> "" . C4::Context->p= reference("OPACURLOpenInNewWindow"), > OPACUserCSS =3D> "" . C4::Context->p= reference("OPACUserCSS"), > OpacAuthorities =3D> C4::Context->prefer= ence("OpacAuthorities"), > + OpacZ3950 =3D> C4::Context->prefer= ence("OpacZ3950"), It's better to use the newer TT plugin method to check system preferences. I think this is done below, so this can possibly be reoved. ::: installer/data/mysql/sysprefs.sql @@ +569,5 @@ > ('XSLTListsDisplay','default','','Enable XSLT stylesheet control over list= s pages display on intranet','Free'), > ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over res= ults page display on intranet','Free'), > ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields= for Personal Name Authorities to fill biblio.author','free'), > +('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will repl= ace authors in biblio.author','YesNo'), > +('OPACZ3950','0','','Allow patrons to search for bibliographic records in = other libraries via Z39.50.','YesNo') The list in sysprefs.sql should be sorted alphabetically to minimize conflict= s. ::: installer/data/mysql/updatedatabase.pl @@ +13959,4 @@ > print "Upgrade to $DBversion done (Bug 16530 - Add a circ sidebar navi= gation menu)\n"; > } > =20 > +$DBversion =3D "XXX"; This should be an atomicupdate in a separate file now instead of an entry in updatedatabase. @@ +13960,5 @@ > } > =20 > +$DBversion =3D "XXX"; > +if( CheckVersion( $DBversion ) ) { > + $dbh->do("ALTER TABLE z3950servers ADD COLUMN opac TINYINT(1);"); Please specify where the new column should be added using AFTER/BEFORE column. @@ +13962,5 @@ > +$DBversion =3D "XXX"; > +if( CheckVersion( $DBversion ) ) { > + $dbh->do("ALTER TABLE z3950servers ADD COLUMN opac TINYINT(1);"); > + $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,options= ,explanation,type) VALUES('OPACZ3950','0','','Allow patrons to search for bib= liographic records in other libraries via Z39.50.','YesNo')"); > + print "Add opac column to z3950servers table.\nAdd OPACZ3950 preferenc= e.\n"; I am not sure if the \n work nicely in the HTML output of the web installer, maybe remove them. ::: koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ +273,4 @@ > [% IF ( Koha.Preference( 'UseCourseRes= erves' ) =3D=3D 1 ) %]
  • C= ourse reserves
  • [% END %] > [% IF Koha.Preference( 'OpacBrowser' )= =3D=3D 1 %]
  • Browse by hierarchy=
  • [% END %] > [% IF Koha.Preference( 'OpacAuthoritie= s' ) =3D=3D 1 %]
  • Author= ity search
  • [% END %] > + [% IF Koha.Preference( 'OpacZ3950' ) %= ]
  • Z39.50 Sea= rch
  • [% END %] Not sure patrons will know what Z39.50 means, maybe we could find another lab= el - "search other catalogs" maybe? @@ +64,5 @@ > + > + > + > +
    > +

    Search Parameters

    Should be: Search parameters (only first word capitalized in Koha) @@ +180,5 @@ > +
    > +
    > +
    > + [% IF ( show_prevbutton ) %] > + see above (Previous page) @@ +184,5 @@ > + > + [% END %] > + Page [% current_page %] / [% total_= pages %] > + [% IF ( show_nextbutton ) %] > + see above (Next page) ::: opac/opac-z3950-search.pl @@ +18,5 @@ > +# with Koha; if not, write to the Free Software Foundation, Inc., > +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > + > +use strict; > +use warnings; Should be: use Modern::Perl ::: opac/opac-z3950-search.pl @@ +51,5 @@ > +my ( $template, $loggedinuser, $cookie ) =3D get_template_and_user({ > + template_name =3D> "opac-z3950-search.tt", > + query =3D> $input, > + type =3D> "opac", > + authnotrequired =3D> 1, All pages should require auth if OpacPublic is set to Disable: authnotrequired =3D> ( C4::Context->preference("OpacPublic") ? 1 : 0 ), These are the review points left to be corrected. ::: admin/z3950servers.pl @@ +66,4 @@ > $id =3D 0; > } elsif ( $op eq 'add_validated' ) { > my @fields=3Dqw/host port db userid password rank syntax encoding time= out > + recordtype checked servername servertype sru_options sru_fields at= tributes opac attributes is added by another patch on bug 11297, so should be marked as a dependency or removed here. ::: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-z3950-search.tt @@ +52,5 @@ > + { label =3D> "Keyword (any)", prop =3D> 'srchany' }, > + { label =3D> "LC call number", prop =3D> 'lccall' }, > + { label =3D> "Control no.", prop =3D> 'controlnumber' }, > + { label =3D> "Dewey", prop =3D> 'dewey' }, > + { label =3D> "Standard ID", prop =3D> 'stdid' } Not sure if this syntax is translatable - needs testing. ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt @@ +235,4 @@ > You searched for [% searchfield %] > [% END %] > > + <= th>UseridOPAC Attributes are from bug 11297 - see above. Sponsored-by: CCSR ( http://www.ccsr.qc.ca ) --=20 You are receiving this mail because: You are watching all bug changes. --===============8584229390048737612==--
    TargetHostname/PortDatabasePasswordPreselectedRankSyntaxEncodingTimeoutRecord typeAttributesOptions