Bugzilla – Attachment 1887 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), 3.73 KB, created by
Chris Cormack
on 2010-04-13 18:55:00 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-04-13 18:55:00 UTC
Size:
3.73 KB
patch
obsolete
>From efb725429d1bfb9d8ee823c8bfb1c55d06492101 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 23 Mar 2010 15:08:56 -0400 >Subject: [PATCH] Fix for Bug 4173, Statuses not appearing in the OPAC > >Adds output of "RESTRICTED" authorized value (an item's "Use >Restriction" status) >--- > C4/Items.pm | 25 ++++++++++++++++++++ > .../prog/en/modules/catalogue/detail.tmpl | 2 + > .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 2 +- > 3 files changed, 28 insertions(+), 1 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index cd6f7d0..03980e9 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1355,6 +1355,31 @@ sub GetItemsInfo { > } > $data->{itypenotforloan} = $data->{notforloan} if (C4::Context->preference('item-level_itypes')); > >+ # 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 3d8a9af..1ba5ee6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl >@@ -297,6 +297,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/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl >index df0b1db..bc2b505 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl >@@ -411,7 +411,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > <!-- /TMPL_IF --> > <!-- /TMPL_IF --> > <!-- /TMPL_IF --> >- <!-- /TMPL_IF --></td> >+ <!-- /TMPL_IF --> <!-- TMPL_IF NAME="restrictedopac" --><span class="restricted">(<!-- TMPL_VAR NAME="restrictedopac" -->)</span><!-- /TMPL_IF --></td> > <!-- TMPL_IF NAME="itemdata_itemnotes" --><td><!-- TMPL_VAR NAME="itemnotes" --></td><!-- /TMPL_IF --> > <td><!-- TMPL_VAR NAME="datedue" --></td> > <!-- TMPL_IF NAME="type" --> >-- >1.6.3.3 >
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