[Koha-patches] [PATCH] Bug 3173 Place Hold link visible in OPAC even if syspref turned off
Michael Hafen
mdhafen at tech.washk12.org
Wed Apr 29 22:03:07 CEST 2009
Looking at this I'm not seeing how you get from the scrip to the
template. I know opacuserlogin is already pushed out to the template,
but I don't see RequestOnOpac getting pushed here.
Thanks.
On Wed, 2009-04-29 at 15:30 -0400, Jane Wagner wrote:
> If the syspref RequestOnOpac is turned off, the link to place a hold does not
> show in the detail page. However, the link is still present in the results
> list as well as in the basket and in lists. Modified scripts and templates
> to check for the syspref and to obey it.
> ---
> .../opac-tmpl/prog/en/modules/opac-basket.tmpl | 5 +++--
> .../opac-tmpl/prog/en/modules/opac-opensearch.tmpl | 5 ++++-
> .../opac-tmpl/prog/en/modules/opac-results.tmpl | 3 ++-
> .../opac-tmpl/prog/en/modules/opac-shelves.tmpl | 5 ++++-
> opac/opac-basket.pl | 7 +++++--
> opac/opac-search.pl | 6 +++++-
> opac/opac-shelves.pl | 6 ++++++
> 7 files changed, 29 insertions(+), 8 deletions(-)
>
> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
> index a102457..5897f86 100644
> --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
> +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
> @@ -76,9 +76,10 @@ function tagAdded() {
> );
> return false;
> });
> + <!-- TMPL_IF NAME="opacuserlogin" --><!-- TMPL_IF NAME="RequestOnOpac" -->
> $(".holdsep").text("| ");
> $(".hold").text("Place Hold");
[snip]
> --- a/opac/opac-basket.pl
> +++ b/opac/opac-basket.pl
> @@ -54,8 +54,11 @@ if (C4::Context->preference('TagsEnabled')) {
> C4::Context->preference($_) and $template->param($_ => 1);
> }
> }
> -
> -
> +# adding the $RequestOnOpac param
> +my $RequestOnOpac;
> +if (C4::Context->preference("RequestOnOpac")) {
> + $RequestOnOpac = 1;
> +}
> foreach my $biblionumber ( @bibs ) {
> $template->param( biblionumber => $biblionumber );
>
[snip]
--
Michael Hafen
Systems Analyst and Programmer
Washington County School District
Utah, USA
for Koha checkout
http://development.washk12.org/gitweb/
or
git://development.washk12.org/koha
More information about the Koha-patches
mailing list