[Koha-cvs] koha catalogue/detail.pl koha-tmpl/intranet-tmp... [rel_3_0]
paul poulain
paul at koha-fr.org
Tue Dec 5 14:38:41 CET 2006
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: paul poulain <tipaul> 06/12/05 13:38:41
Modified files:
catalogue : detail.pl
koha-tmpl/intranet-tmpl/prog/en/catalogue: detail.tmpl
Log message:
adding last 3 serials status in detail record
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/detail.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.6.2.10&r2=1.6.2.11
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2.2.12&r2=1.2.2.13
Patches:
Index: catalogue/detail.pl
===================================================================
RCS file: /sources/koha/koha/catalogue/detail.pl,v
retrieving revision 1.6.2.10
retrieving revision 1.6.2.11
diff -u -b -r1.6.2.10 -r1.6.2.11
--- catalogue/detail.pl 5 Dec 2006 11:35:30 -0000 1.6.2.10
+++ catalogue/detail.pl 5 Dec 2006 13:38:41 -0000 1.6.2.11
@@ -15,7 +15,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: detail.pl,v 1.6.2.10 2006/12/05 11:35:30 toins Exp $
+# $Id: detail.pl,v 1.6.2.11 2006/12/05 13:38:41 tipaul Exp $
use strict;
require Exporter;
@@ -24,6 +24,7 @@
use C4::Serials; #uses getsubscriptionfrom biblionumber
use C4::Interface::CGI::Output;
use C4::Biblio;
+use C4::Serials;
my $query = new CGI;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
@@ -41,7 +42,22 @@
# change back when ive fixed request.pl
my @items = &GetItemsInfo( $biblionumber, 'intra' );
my $dat = &GetBiblioData($biblionumber);
+#coping with subscriptions
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
+my @subscriptions =
+ GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
+my @subs;
+foreach my $subscription (@subscriptions) {
+ my %cell;
+ $cell{subscriptionid} = $subscription->{subscriptionid};
+ $cell{subscriptionnotes} = $subscription->{notes};
+
+ #get the three latest serials.
+ $cell{latestserials} =
+ GetLatestSerials( $subscription->{subscriptionid}, 3 );
+ push @subs, \%cell;
+}
+
$dat->{'count'} = @items;
my $norequests = 1;
@@ -55,7 +71,6 @@
$template->param( norequests => $norequests );
## get notes and subjects from MARC record
-if ( C4::Context->preference("marc") ) {
my $dbh = C4::Context->dbh;
my $marcflavour = C4::Context->preference("marcflavour");
my $record = GetMarcBiblio($biblionumber);
@@ -69,13 +84,9 @@
# push @marcsubjctsarray , $_;
# }
# }
-
- warn "subjects=>" . Data::Dumper::Dumper($marcsubjctsarray);
-
- $template->param( MARCNOTES => $marcnotesarray );
- $template->param( MARCSUBJCTS => $marcsubjctsarray );
- $template->param( MARCAUTHORS => $marcauthorsarray );
-}
+ $template->param( MARCNOTES => $marcnotesarray,
+ MARCSUBJCTS => $marcsubjctsarray,
+ MARCAUTHORS => $marcauthorsarray );
my @results = ( $dat, );
foreach ( keys %{$dat} ) {
@@ -86,6 +97,8 @@
ITEM_RESULTS => \@items,
subscriptionsnumber => $subscriptionsnumber,
biblionumber => $biblionumber,
-);
+ subscriptions => \@subs,
+ subscriptionsnumber => $subscriptionsnumber,
+ );
output_html_with_http_headers $query, $cookie, $template->output;
Index: koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl,v
retrieving revision 1.2.2.12
retrieving revision 1.2.2.13
diff -u -b -r1.2.2.12 -r1.2.2.13
--- koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl 5 Dec 2006 11:35:30 -0000 1.2.2.12
+++ koha-tmpl/intranet-tmpl/prog/en/catalogue/detail.tmpl 5 Dec 2006 13:38:41 -0000 1.2.2.13
@@ -210,6 +210,55 @@
<!-- TMPL_ELSE -->
<p>we don't have any physical item for this document</p>
<!-- /TMPL_IF -->
+<!-- TMPL_IF name="subscriptionsnumber" -->
+<div id="catalogue_detail_subscriptions">
+ <h2>This is a serial subscription</h2>
+ <p> (We have <!-- TMPL_VAR name="subscriptionsnumber" --> subscriptions associated with this title).</p>
+ <!-- TMPL_LOOP Name="subscriptions" -->
+ <!-- TMPL_IF NAME="subscriptionnotes" --><p><!--TMPL_VAR NAME="subscriptionnotes"--> </p><!-- /TMPL_IF -->
+ <!--TMPL_IF NAME="latestserials"-->
+ <p> The three latest issues related to this subscription:</p>
+ <table>
+ <tr>
+ <th>Issue #</th>
+ <th>Date</th>
+ <th>Status</th>
+ <th>Note</th>
+ <!--TMPL_LOOP Name="latestserials"-->
+ <tr>
+ <td>
+ <!--TMPL_VAR Name="serialseq"-->
+ </td>
+ <td>
+ <!--TMPL_VAR Name="planneddate"-->
+ </td>
+ <td>
+ <!--TMPL_IF Name="status1"-->Waited
+ <!--TMPL_ELSE -->
+ <!-- TMPL_IF Name="status2"-->Arrived
+ <!--TMPL_ELSE -->
+ <!-- TMPL_IF Name="status3"-->Late
+ <!--TMPL_ELSE -->
+ <!-- TMPL_IF Name="status4"-->Missing
+ <!--TMPL_ELSE -->
+ <!-- TMPL_IF Name="status5"-->Not Issued
+ <!--/TMPL_IF-->
+ <!--/TMPL_IF-->
+ <!--/TMPL_IF-->
+ <!--/TMPL_IF-->
+ <!--/TMPL_IF-->
+ </td>
+ <td>
+ <!--TMPL_VAR Name="notes"-->
+ </td>
+ </tr>
+ <!--/TMPL_LOOP -->
+ </table>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_LOOP -->
+</div>
+<!-- /TMPL_IF -->
+
<script language="javascript" type="text/javascript">
function Dopop(link) {
newin=window.open(link,'popup','width=500,height=400,toolbar=false,scrollbars=yes');
More information about the Koha-cvs
mailing list