noItemTypeImages => C4::Context->preference("noItemTypeImages"),
suggestion => C4::Context->preference("suggestion"),
virtualshelves => C4::Context->preference("virtualshelves"),
+ StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"),
);
}
else {
reviewson => C4::Context->preference("reviewson"),
suggestion => "" . C4::Context->preference("suggestion"),
virtualshelves => "" . C4::Context->preference("virtualshelves"),
+ OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),
);
}
return ( $template, $borrowernumber, $cookie, $flags);
$whenmorethan3, $setto3, $lastvalue3, $innerloop3,
$numberingmethod, $status, $biblionumber, $callnumber,
$notes, $letter, $hemisphere, $manualhistory,
- $internalnotes, $serialsadditems,
- $subscriptionid
+ $internalnotes, $serialsadditems,$subscriptionid,
+ $staffdisplaycount,$opacdisplaycount
) = @_;
# warn $irregularity;
my $dbh = C4::Context->dbh;
add1=?,every1=?,whenmorethan1=?,setto1=?,lastvalue1=?,innerloop1=?,
add2=?,every2=?,whenmorethan2=?,setto2=?,lastvalue2=?,innerloop2=?,
add3=?,every3=?,whenmorethan3=?,setto3=?,lastvalue3=?,innerloop3=?,
- numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?
+ numberingmethod=?, status=?, biblionumber=?, callnumber=?, notes=?, letter=?, hemisphere=?,manualhistory=?,internalnotes=?,serialsadditems=?,staffdisplaycount = ?,opacdisplaycount = ?
WHERE subscriptionid = ?";
-# warn "query :".$query;
+ #warn "query :".$query;
my $sth = $dbh->prepare($query);
$sth->execute(
$auser, $branchcode, $aqbooksellerid, $cost,
$numberingmethod, $status, $biblionumber, $callnumber,
$notes, $letter, $hemisphere, ($manualhistory?$manualhistory:0),
$internalnotes, $serialsadditems,
- $subscriptionid
- );
+ $staffdisplaycount, $opacdisplaycount, $subscriptionid
+ ); warn "$staffdisplaycount, $opacdisplaycount";
my $rows=$sth->rows;
$sth->finish;
$lastvalue3, $innerloop3, $numberingmethod, $status,
$notes, $letter, $firstacquidate, $irregularity,
$numberpattern, $callnumber, $hemisphere, $manualhistory,
- $internalnotes, $serialsadditems,
+ $internalnotes, $serialsadditems, $staffdisplaycount, $opacdisplaycount
) = @_;
my $dbh = C4::Context->dbh;
add2,every2,whenmorethan2,setto2,lastvalue2,innerloop2,
add3,every3,whenmorethan3,setto3,lastvalue3,innerloop3,
numberingmethod, status, notes, letter,firstacquidate,irregularity,
- numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems)
- VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
+ numberpattern, callnumber, hemisphere,manualhistory,internalnotes,serialsadditems,staffdisplaycount,opacdisplaycount)
+ VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
|;
my $sth = $dbh->prepare($query);
$sth->execute(
$numberpattern, $callnumber,
$hemisphere, $manualhistory,
$internalnotes, $serialsadditems,
+ $staffdisplaycount, $opacdisplaycount
);
#then create the 1st waited number
my $sth = $dbh->prepare($query);
$sth->execute($subscriptionid);
my ($res) = $sth->fetchrow ;
+ return 0 unless $res;
my @res=split (/-/,$res);
# warn "date expiration :$expirationdate";
my @endofsubscriptiondate=split(/-/,$expirationdate);
$tabsysprefs{XSLTDetailsDisplay} = "OPAC";
$tabsysprefs{XSLTResultsDisplay} = "OPAC";
+# Serials
+$tabsysprefs{OPACSerialIssueDisplayCount} = "Serials";
+$tabsysprefs{StaffSerialIssueDisplayCount} = "Serials";
+
# LOGFeatures
$tabsysprefs{CataloguingLog} = "Logs";
$tabsysprefs{BorrowersLog} = "Logs";
$dat->{'serial'}=1 if $subscriptionsnumber;
foreach my $subscription (@subscriptions) {
my %cell;
+ my $serials_to_display;
$cell{subscriptionid} = $subscription->{subscriptionid};
$cell{subscriptionnotes} = $subscription->{notes};
$cell{branchcode} = $subscription->{branchcode};
$cell{hasalert} = $subscription->{hasalert};
#get the three latest serials.
+ $serials_to_display = $subscription->{staffdisplaycount};
+ $serials_to_display = C4::Context->preference('StaffSerialIssueDisplayCount') unless $serials_to_display;
+ $cell{staffdisplaycount} = $serials_to_display;
$cell{latestserials} =
- GetLatestSerials( $subscription->{subscriptionid}, 3 );
+ GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display );
push @subs, \%cell;
}
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo');
+INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'StaffSerialIssueDisplayCount', '3', '', 'Number of serial issues to display per subscription in the Staff client', 'free');
+INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'OPACSerialIssueDisplayCount', '3', '', 'Number of serial issues to display per subscription in the OPAC', 'free');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('SyndeticsCoverImageSize', 'MC', 'Choose the size of the Syndetics Cover Image to display on the OPAC detail page, MC is Medium, LC is Large','MC|LC','Choice');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonCoverImages', '0', 'Display cover images on OPAC from Amazon Web Services','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonCoverImages', '0', 'Display Cover Images in Staff Client from Amazon Web Services','','YesNo');
+INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'StaffSerialIssueDisplayCount', '3', '', 'Number of serial issues to display per subscription in the Staff client', 'free');
+INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` ) VALUES ( 'OPACSerialIssueDisplayCount', '3', '', 'Number of serial issues to display per subscription in the OPAC', 'free');
SetVersion ($DBversion);
}
+$DBversion = "3.01.00.017";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE `subscription` ADD `staffdisplaycount` VARCHAR(10) NULL;");
+ $dbh->do("ALTER TABLE `subscription` ADD `opacdisplaycount` VARCHAR(10) NULL;");
+ $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` )
+ VALUES (
+ 'StaffSerialIssueDisplayCount', '3', '', 'Number of serial issues to display per subscription in the Staff client', 'free'
+ );");
+ $dbh->do("INSERT INTO `systempreferences` ( `variable` , `value` , `options` , `explanation` , `type` )
+ VALUES (
+ 'OPACSerialIssueDisplayCount', '3', '', 'Number of serial issues to display per subscription in the OPAC', 'free'
+ );");
+
+ print "Upgrade to $DBversion done ( Updated table for Branch Transfer Limits)\n";
+ SetVersion ($DBversion);
+}
=item DropAllForeignKeys($table)
<!-- TMPL_IF NAME="OPAC" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Online Public Access Catalog" href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC">OPAC</a></li>
<!-- TMPL_IF NAME="Patrons" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Patrons" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Patrons">Patrons</a></li>
<!-- TMPL_IF NAME="Searching" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Searching" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Searching">Searching</a></li>
+<!-- TMPL_IF NAME="Serials" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Serials" href="/cgi-bin/koha/admin/systempreferences.pl?tab=Serials">Serials</a></li>
<!-- TMPL_IF NAME="StaffClient" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a title="Staff Client" href="/cgi-bin/koha/admin/systempreferences.pl?tab=StaffClient">Staff Client</a></li>
<!-- TMPL_IF NAME="" --><li class="active"><!-- TMPL_ELSE --><li><!-- /TMPL_IF --><a href="/cgi-bin/koha/admin/systempreferences.pl">Local Use</a></li>
</ul>
<!-- 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>
+ <p> The <!-- TMPL_VAR NAME="staffdisplaycount" --> latest issues related to this subscription:</p>
<table>
<tr>
<th>Issue #</th>
<!--/TMPL_LOOP -->
</table>
<!-- /TMPL_IF -->
+ <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->">Subscription Details</a>
<!-- /TMPL_LOOP -->
</div>
</div>
<div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div>
<!-- /TMPL_IF -->
</li>
+ <li class="radio">
+ <label for="displaycount">Staff and Public Display</label>
+ <p>
+ <label for="staffdisplaycount">Number of issues to display to staff: </label>
+ <input type="text" name="staffdisplaycount" id="staffdisplaycount" value="<!-- TMPL_VAR NAME="staffdisplaycount" -->" size="4"/>
+ </p>
+ <p>
+ <label for="opacdisplaycount">Number of issues to display to the public: </label>
+ <input type="text" name="opacdisplaycount" id="opacdisplaycount" value="<!-- TMPL_VAR NAME="opacdisplaycount" -->" size="4"/>
+ </p>
+ </li>
</ol>
<div style="float:left;clear:left;margin:1em;"><strong>Note:</strong>
<li>Serial receipt does not create an item record.</li>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="callnumber" --><li><span class="label">Call Number:</span> <!-- TMPL_VAR name="callnumber" --> </li><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="staffdisplaycount" --><li><span class="label">Number of issues to display to staff</span>: <!-- TMPL_VAR NAME="staffdisplaycount" --> </li><!-- /TMPL_IF -->
+ <!-- TMPL_IF NAME="opacdisplaycount" --><li><span class="label">Number of issues to display to the public</span>: <!-- TMPL_VAR NAME="opacdisplaycount" --> </li><!-- /TMPL_IF -->
<!-- TMPL_IF name="letter" --><li><span class="label">Patron alert with:</span> <!-- TMPL_VAR name="letter" --> </li><!-- /TMPL_IF -->
<!-- TMPL_IF name="notes" --><li><span class="label">Notes:</span> <!-- TMPL_VAR name="notes" --></li><!-- /TMPL_IF -->
<!-- TMPL_IF name="internalnotes" --><li><span class="label">Management Notes:</span> <!-- TMPL_VAR name="internalnotes" --></li><!-- /TMPL_IF -->
</h2>
<!-- TMPL_LOOP Name="subscriptions" -->
<h3>At library: <!-- TMPL_VAR name="branchcode" --> <!-- TMPL_VAR name="notes" --></h3>
- <p>Below is a list of the three latest issues :</p>
+ <p>Below is a list of the <!-- TMPL_VAR NAME="opacdisplaycount" --> latest issues :</p>
<!-- TMPL_IF name="subscriptionnotes"-->
<p><!--TMPL_VAR Name="subscriptionnotes"--> </p>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="branchcode" --><h3>At branch: <!-- TMPL_VAR NAME="branchcode" --></h3><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="subscriptionnotes" --><p><!--TMPL_VAR NAME="subscriptionnotes"--> </p><!-- /TMPL_IF -->
<!--TMPL_IF NAME="latestserials"-->
- <p> The three latest issues for this subscription:</p>
+ <p> The <!-- TMPL_VAR NAME="opacdisplaycount" --> latest issues for this subscription:</p>
<table>
<tr>
<th>Issue #</th>
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.016';
+ our $VERSION = '3.01.00.017';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
my @subs;
foreach my $subscription (@subscriptions) {
my %cell;
+ my $serials_to_display;
$cell{subscriptionid} = $subscription->{subscriptionid};
$cell{subscriptionnotes} = $subscription->{notes};
$cell{branchcode} = $subscription->{branchcode};
#get the three latest serials.
+ $serials_to_display = $subscription->{opacdisplaycount};
+ $serials_to_display = C4::Context->preference('OPACSerialIssueDisplayCount') unless $serials_to_display;
+ $cell{opacdisplaycount} = $serials_to_display;
$cell{latestserials} =
- GetLatestSerials( $subscription->{subscriptionid}, 3 );
+ GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display );
push @subs, \%cell;
}
#coping with subscriptions
my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
my @subscriptions = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
+
my @subs;
$dat->{'serial'}=1 if $subscriptionsnumber;
foreach my $subscription (@subscriptions) {
+ my $serials_to_display;
my %cell;
$cell{subscriptionid} = $subscription->{subscriptionid};
$cell{subscriptionnotes} = $subscription->{notes};
$cell{branchcode} = $subscription->{branchcode};
$cell{hasalert} = $subscription->{hasalert};
#get the three latest serials.
+ $serials_to_display = $subscription->{opacdisplaycount};
+ $serials_to_display = C4::Context->preference('OPACSerialIssueDisplayCount') unless $serials_to_display;
+ $cell{opacdisplaycount} = $serials_to_display;
$cell{latestserials} =
- GetLatestSerials( $subscription->{subscriptionid}, 3 );
+ GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display );
push @subs, \%cell;
}
# ## BugFIX : hdl doesnot know what innerloops or letter stand for but it seems necessary. So he adds them.
my $manualhistory = $query->param('manualhist');
my $serialsadditems = $query->param('serialsadditems');
+ my $staffdisplaycount = $query->param('staffdisplaycount');
+ my $opacdisplaycount = $query->param('opacdisplaycount');
my $subscriptionid = NewSubscription($auser,$branchcode,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
$startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,
$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
$numberingmethod, $status, $notes,$letter,$firstacquidate,join(",",@irregularity),
$numberpattern, $callnumber, $hemisphere,($manualhistory?$manualhistory:0),$internalnotes,
- $serialsadditems,
+ $serialsadditems,$staffdisplaycount,$opacdisplaycount
);
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
my $opacnote = $query->param('opacnote');
my $librariannote = $query->param('librariannote');
my $history_only = $query->param('history_only');
+ my $staffdisplaycount = $query->param('staffdisplaycount');
+ my $opacdisplaycount = $query->param('opacdisplaycount');
# If it's a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
ModNextExpected($subscriptionid,C4::Dates->new($nextacquidate,'iso'));
$whenmorethan3, $setto3, $lastvalue3, $innerloop3,
$numberingmethod, $status, $biblionumber, $callnumber,
$notes, $letter, $hemisphere, $manualhistory,$internalnotes,
- $serialsadditems, $subscriptionid,
+ $serialsadditems, $subscriptionid,$staffdisplaycount,$opacdisplaycount
);
}
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");