[Koha-patches] [PATCH] Bug 3634 Add support for link resolver such as SFX

Chris Cormack chrisc at catalyst.net.nz
Tue Aug 24 23:03:47 CEST 2010


Hi Jane

I think instead of updating admin/systempreferences.pl (only used for
local sysprefs in 3.2) we should be updating the pref files used by
admin/preferences. 

In this case the file would be 
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref

Chris


* Jane Wagner (jwagner at ptfs.com) wrote:
> Creates two sysprefs to enable link resolver and enter a URL for the link resolver server.
> 
> Link will appear in righthand box on the details page, along with Place Hold, Print, etc.
> ---
>  admin/systempreferences.pl                         |    2 ++
>  installer/data/mysql/de-DE/mandatory/sysprefs.sql  |    3 +++
>  installer/data/mysql/en/mandatory/sysprefs.sql     |    3 +++
>  .../1-Obligatoire/unimarc_standard_systemprefs.sql |    2 ++
>  installer/data/mysql/pl-PL/mandatory/sysprefs.sql  |    2 ++
>  ...m_preferences_full_optimal_for_install_only.sql |    3 +++
>  installer/data/mysql/updatedatabase.pl             |   14 ++++++++++++++
>  koha-tmpl/opac-tmpl/prog/en/css/opac.css           |    6 +++++-
>  .../opac-tmpl/prog/en/modules/opac-detail.tmpl     |    3 +++
>  opac/opac-detail.pl                                |    2 ++
>  10 files changed, 39 insertions(+), 1 deletions(-)
> 
> diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl
> index 824b058..0a2e77d 100755
> --- a/admin/systempreferences.pl
> +++ b/admin/systempreferences.pl
> @@ -288,6 +288,8 @@ $tabsysprefs{AmazonSimilarItems}     = "EnhancedContent";
>  $tabsysprefs{OPACAmazonSimilarItems} = "EnhancedContent";
>  $tabsysprefs{AmazonReviews}          = "EnhancedContent";
>  $tabsysprefs{OPACAmazonReviews}      = "EnhancedContent";
> +$tabsysprefs{OPAClinkresolver}       = "EnhancedContent";
> +$tabsysprefs{OPAClinkresolverURL}    = "EnhancedContent";
>  
>  # Babelth??que
>  $tabsysprefs{Babeltheque}            = "EnhancedContent";
> diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
> index 49a02ea..4c4f95c 100644
> --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql
> +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
> @@ -286,3 +286,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:Authorized_IPs','','.','Restricts usage of ILS-DI to some IPs','Free');
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice');
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolver','0','Enable use of a link resolver such as SFX for full-text access to ISSNs','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolverURL','','Enter URL for OPAC ISSN full-text access link resolver such as SFX, plus any additional parameters (e.g., http://mysfxserver.com/sfxlcl3/?sfx.ignore_date_threshold=1&issn=)','','free');
> +
> diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
> index 8bfed37..791ebb3 100644
> --- a/installer/data/mysql/en/mandatory/sysprefs.sql
> +++ b/installer/data/mysql/en/mandatory/sysprefs.sql
> @@ -286,3 +286,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:Authorized_IPs','','.','Restricts usage of ILS-DI to some IPs','Free');
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice');
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolver','0','Enable use of a link resolver such as SFX for full-text access to ISSNs','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolverURL','','Enter URL for OPAC ISSN full-text access link resolver such as SFX, plus any additional parameters (e.g., http://mysfxserver.com/sfxlcl3/?sfx.ignore_date_threshold=1&issn=)','','free');
> +
> diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
> index 76db9c9..e2e6a4a 100644
> --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
> +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
> @@ -286,3 +286,5 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
>  INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'PrintNoticesMaxLines', '0', '', 'If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.', 'Integer' );
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI','0','Active les services ILS-DI ?? l''OPAC.','','YesNo');
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolver','0','Enable use of a link resolver such as SFX for full-text access to ISSNs','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolverURL','','Enter URL for OPAC ISSN full-text access link resolver such as SFX, plus any additional parameters (e.g., http://mysfxserver.com/sfxlcl3/?sfx.ignore_date_threshold=1&issn=)','','free');
> diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
> index 3707294..0681946 100644
> --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
> +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
> @@ -273,3 +273,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('S
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnableOpacSearchHistory', '1', 'Enable or disable opac search history','', 'YesNo');
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo');
>  INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('soundon','0','Enable circulation sounds during checkin and checkout in the staff interface.  Not supported by all web browsers yet.','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolver','0','Enable use of a link resolver such as SFX for full-text access to ISSNs','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolverURL','','Enter URL for OPAC ISSN full-text access link resolver such as SFX, plus any additional parameters (e.g., http://mysfxserver.com/sfxlcl3/?sfx.ignore_date_threshold=1&issn=)','','free');
> diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
> index 2edbe10..2b2b60f 100644
> --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
> +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
> @@ -292,3 +292,6 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES (
>  INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACviewMARC','1','Allow display of MARC view of bibiographic records in OPAC','','YesNo');
>  -- from 3.00.06.005
>  
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolver','0','Enable use of a link resolver such as SFX for full-text access to ISSNs','','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolverURL','','Enter URL for OPAC ISSN full-text access link resolver such as SFX, plus any additional parameters (e.g., http://mysfxserver.com/sfxlcl3/?sfx.ignore_date_threshold=1&issn=)','','free');
> +
> diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
> index a0b5c4a..8a4a890 100755
> --- a/installer/data/mysql/updatedatabase.pl
> +++ b/installer/data/mysql/updatedatabase.pl
> @@ -3700,6 +3700,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
>      print "Upgrade to $DBversion done (Add index on guarantorid)\n";
>      SetVersion ($DBversion);
>  }
> +$DBversion = '3.01.00.146';
> +if (C4::Context->preference('Version') < TransformToNum($DBversion)){
> +    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolver','0','Enable use of a link resolver such as SFX for full-text access to ISSNs','','YesNo');");
> +    print "Upgrade to $DBversion done adding syspref OPAClinkresolver to allow use of a link resolver such as SFX";
> +    SetVersion ($DBversion);
> +}
> +
> +$DBversion = '3.01.00.138';
> +if (C4::Context->preference('Version') < TransformToNum($DBversion)){
> +    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPAClinkresolverURL','','Enter URL for OPAC ISSN full-text access link resolver such as SFX, plus any additional parameters (e.g., http://mysfxserver.com/sfxlcl3/?sfx.ignore_date_threshold=1&issn=)','','free');");
> +    print "Upgrade to $DBversion done adding syspref OPAClinkresolverURL to allow use of a link resolver such as SFX";
> +    SetVersion ($DBversion);
> +}
> +
>  
>  =item DropAllForeignKeys($table)
>  
> diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
> index 5142dd2..a56ac5c 100644
> --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css
> +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
> @@ -406,6 +406,10 @@ a .term {
>  	background-image:url(../../images/print.gif);
>  }
>  
> +#action a.linkresolver {
> +	background-image:url(../../famfamfam/silk/arrow_right.png);
> +}
> +
>  #action a#furthersearches {
>  	background : transparent url(../../images/menu-arrow.gif) no-repeat right center;
>  	border : 1px solid #F3F3F3;
> @@ -1957,4 +1961,4 @@ div.ft {
>  	font-size:90%;
>  	list-style:disc outside url("../../images/item-bullet.gif");
>  	padding:0.2em 0;
> -}
> \ No newline at end of file
> +}
> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
> index b1fdf84..450e1a7 100644
> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
> @@ -798,6 +798,9 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
>  	<!-- /TMPL_IF -->
>  <!-- /TMPL_UNLESS -->
>          <li><a class="print" href="javascript:window.print();">Print</a></li>
> +<!-- TMPL_IF name="OPAClinkresolver" --><!-- TMPL_IF name="issn" -->
> +        <li><a class="linkresolver" target="_blank" href="<!-- TMPL_VAR NAME="OPAClinkresolverURL" --><!-- TMPL_VAR NAME="issn" -->"><span id="linkresolverlabel">Check Full Text Availability</span></a></li>
> +        <!-- /TMPL_IF --><!-- /TMPL_IF -->
>  <!-- TMPL_IF name="virtualshelves" -->
>      <!-- TMPL_IF NAME="opacuserlogin" --><!-- TMPL_IF NAME="loggedinusername" -->
>          <li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->'); return false;">
> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
> index 629ebd2..064f488 100755
> --- a/opac/opac-detail.pl
> +++ b/opac/opac-detail.pl
> @@ -239,6 +239,8 @@ $template->param(
>  	normalized_ean => $ean,
>  	normalized_oclc => $oclc,
>  	normalized_isbn => $isbn,
> +        OPAClinkresolver   => C4::Context->preference("OPAClinkresolver"),
> +        OPAClinkresolverURL => C4::Context->preference("OPAClinkresolverURL"),
>  	content_identifier_exists =>  $content_identifier_exists,
>  );
>  
> -- 
> 1.5.6.5
> 

> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches


-- 
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: </pipermail/koha-patches/attachments/20100825/ba7e461f/attachment.pgp>


More information about the Koha-patches mailing list