Bugzilla – Attachment 2810 Details for
Bug 4173
Statuses not appearing in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-4173-Statuses-not-appearing-in-the-OPAC.patch (text/plain), 4.23 KB, created by
Owen Leonard
on 2010-12-06 17:28:07 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2010-12-06 17:28:07 UTC
Size:
4.23 KB
patch
obsolete
>From a37a5babe96a4c8bbadd05e38290868a162a995e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 20 Jul 2010 10:07:22 -0400 >Subject: [PATCH] Fix for Bug 4173 - Statuses not appearing in the OPAC > >This adds display of "Use restrictions" authorized values >to the OPAC and the staff client for available and >not-for-loan items. >--- > C4/Items.pm | 25 ++++++++++++++++++++ > .../prog/en/modules/catalogue/detail.tmpl | 2 + > .../opac-tmpl/prog/en/includes/item-status.inc | 8 +++--- > 3 files changed, 31 insertions(+), 4 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 264fa5b..5eda6dd 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1270,6 +1270,31 @@ sub GetItemsInfo { > $data->{notforloanvalue} = $lib; > } > >+ # get restricted status and description if applicable >+ my $restrictedstatus = $dbh->prepare( >+ 'SELECT authorised_value >+ FROM marc_subfield_structure >+ WHERE kohafield="items.restricted" >+ ' >+ ); >+ >+ $restrictedstatus->execute; >+ my ($authorised_valuecode) = $restrictedstatus->fetchrow; >+ if ($authorised_valuecode) { >+ $restrictedstatus = $dbh->prepare( >+ "SELECT lib,lib_opac FROM authorised_values >+ WHERE category=? >+ AND authorised_value=?" >+ ); >+ $restrictedstatus->execute( $authorised_valuecode, >+ $data->{restricted} ); >+ >+ if ( my $rstdata = $restrictedstatus->fetchrow_hashref ) { >+ $data->{restricted} = $rstdata->{'lib'}; >+ $data->{restrictedopac} = $rstdata->{'lib_opac'}; >+ } >+ } >+ > # my stack procedures > my $stackstatus = $dbh->prepare( > 'SELECT authorised_value >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl >index e3391ac..8dde1b5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl >@@ -326,6 +326,8 @@ function verify_images() { > <!-- TMPL_UNLESS name="itemnotforloan" --><!-- TMPL_UNLESS NAME="onloan" --><!-- TMPL_UNLESS NAME="itemlost" --><!-- TMPL_UNLESS NAME="wthdrawn" --><!-- TMPL_UNLESS NAME="damaged" --><!-- TMPL_UNLESS NAME="transfertwhen" --><!-- TMPL_UNLESS NAME="reservedate" --> > Available > <!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --> >+ >+ <!-- TMPL_IF NAME="restricted" --><span class="restricted">(<!-- TMPL_VAR NAME="restricted" -->)</span><!-- /TMPL_IF --> > > </td> > <td class="datelastseen"><!-- TMPL_VAR NAME="datelastseen" --></td> >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc >index 5e881fe..6369bba 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc >@@ -19,14 +19,14 @@ > <!-- /TMPL_IF --> > <!-- TMPL_ELSIF name="itemnotforloan" --> > <!-- TMPL_IF NAME="notforloanvalue" --> >- <!-- TMPL_VAR NAME="notforloanvalue" --> >+ <!-- TMPL_VAR NAME="notforloanvalue" --> <!-- TMPL_IF NAME="restrictedopac" --><span class="restricted">(<!-- TMPL_VAR NAME="restrictedopac" -->)</span><!-- /TMPL_IF --> > <!-- TMPL_ELSE --> >- Not for loan >+ Not for loan <!-- TMPL_IF NAME="restrictedopac" --><span class="restricted">(<!-- TMPL_VAR NAME="restrictedopac" -->)</span><!-- /TMPL_IF --> > <!-- /TMPL_IF --> > <!-- TMPL_ELSIF name="notforloan_per_itemtype" --> >- Not for loan >+ Not for loan <!-- TMPL_IF NAME="restrictedopac" --><span class="restricted">(<!-- TMPL_VAR NAME="restrictedopac" -->)</span><!-- /TMPL_IF --> > <!-- TMPL_ELSIF NAME="damaged" --> > Item damaged > <!-- TMPL_ELSE --> >- Available >+ Available <!-- TMPL_IF NAME="restrictedopac" --><span class="restricted">(<!-- TMPL_VAR NAME="restrictedopac" -->)</span><!-- /TMPL_IF --> > <!-- /TMPL_IF --> >-- >1.7.1 >
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 4173
:
1884
|
1885
|
1886
|
1887
|
2810
|
2863
|
2864
|
10798
|
11132
|
11133
|
11135
|
12009
|
12010
|
18158
|
18161
|
18162