Bugzilla – Attachment 12931 Details for
Bug 8782
Add a feature to close a subscription
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 8782: Followup: add some minor modifications
Bug-8782-Followup-add-some-minor-modifications.patch (text/plain), 8.62 KB, created by
Kyle M Hall (khall)
on 2012-10-19 11:59:11 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 8782: Followup: add some minor modifications
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-10-19 11:59:11 UTC
Size:
8.62 KB
patch
obsolete
>From 2075592339563b30e73207033bc2064e2012335b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 17 Oct 2012 10:19:01 +0200 >Subject: [PATCH] Bug 8782: Followup: add some minor modifications >Content-Type: text/plain; charset="utf-8" > >- Show 'closed' information in biblio detail page >- Add a column in serials report table >- Search subscriptions on title words instead of string >- Prevent serials editing when subscription is closed >- Don't change status of "disabled" serials > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Serials.pm | 12 ++++++++++-- > catalogue/detail.pl | 2 ++ > .../prog/en/modules/catalogue/detail.tt | 2 ++ > .../prog/en/modules/reports/serials_stats.tt | 8 ++++++++ > .../prog/en/modules/serials/serials-edit.tt | 2 +- > koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 2 ++ > opac/opac-detail.pl | 2 ++ > reports/serials_stats.pl | 3 ++- > serials/serials-edit.pl | 1 + > 9 files changed, 30 insertions(+), 4 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 76aae10..0c4b60e 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -670,8 +670,16 @@ sub SearchSubscriptions { > push @where_args, $args->{biblionumber}; > } > if( $args->{title} ){ >- push @where_strs, "biblio.title LIKE ?"; >- push @where_args, "%$args->{title}%"; >+ my @words = split / /, $args->{title}; >+ my (@strs, @args); >+ foreach my $word (@words) { >+ push @strs, "biblio.title LIKE ?"; >+ push @args, "%$word%"; >+ } >+ if (@strs) { >+ push @where_strs, '(' . join (' AND ', @strs) . ')'; >+ push @where_args, @args; >+ } > } > if( $args->{issn} ){ > push @where_strs, "biblioitems.issn LIKE ?"; >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 67e9c99..162530f 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -155,6 +155,8 @@ foreach my $subscription (@subscriptions) { > $cell{branchcode} = $subscription->{branchcode}; > $cell{branchname} = GetBranchName($subscription->{branchcode}); > $cell{hasalert} = $subscription->{hasalert}; >+ $cell{callnumber} = $subscription->{callnumber}; >+ $cell{closed} = $subscription->{closed}; > #get the three latest serials. > $serials_to_display = $subscription->{staffdisplaycount}; > $serials_to_display = C4::Context->preference('StaffSerialIssueDisplayCount') unless $serials_to_display; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index f6a2ea9..0e3313a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -470,6 +470,8 @@ function verify_images() { > [% FOREACH subscription IN subscriptions %] > [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %] > [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %] >+ [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %] >+ [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %] </p>[% END %] > [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %] > [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist %] </p>[% END %] > [% IF ( subscription.librariannote ) %]<p>([% subscription.librariannote %])</p>[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt >index af51a4c..65f662f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/serials_stats.tt >@@ -38,6 +38,7 @@ > <th>Call number</th> > <th>Subscription begin</th> > <th>Subscription end</th> >+ <th>Expired? / Closed?</th> > </tr> > </thead> > <tbody> >@@ -50,6 +51,13 @@ > <td>[% data.callnumber %]</td> > <td>[% data.startdate %]</td> > <td>[% data.enddate %]</td> >+ <td> >+ [% IF data.closed %] >+ Closed >+ [% ELSIF data.expired %] >+ Expired >+ [% END %] >+ </td> > </tr> > [% END %] > </tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 75f32ea..cc08add 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -230,7 +230,7 @@ $(document).ready(function() { > </td> > <td> > [% IF ( serialslis.editdisable ) %] >- <input type="hidden" name="status" id="status[% serialslis.serialid %]" value="1"> >+ <input type="hidden" name="status" id="status[% serialslis.serialid %]" value="[% serialslis.serstatus %]"> > <select name="status" size="1" disabled="disabled"> > [% ELSE %] > [% IF ( serialslis.serialsadditems ) %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >index f740488..ea27756 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt >@@ -981,6 +981,8 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > [% FOREACH subscription IN subscriptions %] > [% IF ( subscription.branchname ) %]<h3>At library: [% subscription.branchname %]</h3>[% ELSE %] > [% IF ( subscription.branchcode ) %]<h3>At library: [% subscription.branchcode %]</h3>[% END %][% END %] >+ [% IF ( subscription.closed ) %]<p>This subscription is closed.</p>[% END %] >+ <span style="display:none;"> [% IF ( subscription.callnumber ) %]<p>Callnumber: [% subscription.callnumber %]</p>[% END %]</span> > [% IF ( subscription.subscriptionnotes ) %]<p>[% subscription.subscriptionnotes FILTER html_line_break %] </p>[% END %] > <p>Subscription from: [% subscription.histstartdate | $KohaDates %] to:[% IF ( subscription.histenddate ) %] [% subscription.histenddate | $KohaDates %] [% ELSE %] now (current)[% END %]</p> > [% IF ( subscription.missinglist ) %]<p>Missing issues: [% subscription.missinglist %] </p>[% END %] >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index cdb4a5a..2b28691 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -470,6 +470,8 @@ foreach my $subscription (@subscriptions) { > $cell{branchcode} = $subscription->{branchcode}; > $cell{branchname} = GetBranchName($subscription->{branchcode}); > $cell{hasalert} = $subscription->{hasalert}; >+ $cell{callnumber} = $subscription->{callnumber}; >+ $cell{closed} = $subscription->{closed}; > #get the three latest serials. > $serials_to_display = $subscription->{opacdisplaycount}; > $serials_to_display = C4::Context->preference('OPACSerialIssueDisplayCount') unless $serials_to_display; >diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl >index 2b019c7..36f7cc5 100755 >--- a/reports/serials_stats.pl >+++ b/reports/serials_stats.pl >@@ -96,12 +96,13 @@ if($do_it){ > while(my $row = $sth->fetchrow_hashref){ > $row->{'enddate'} = format_date(GetExpirationDate($row->{'subscriptionid'})); > $row->{'startdate'} = format_date($row->{'startdate'}); >+ $row->{expired} = HasSubscriptionExpired($row->{subscriptionid}); > push @datas, $row if ( > $expired > or ( > not $expired > and ( >- not HasSubscriptionExpired($row->{subscriptionid}) >+ not $row->{expired} > and not $row->{closed} > ) > ) >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index bb87c5f..66d3a4e 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -151,6 +151,7 @@ foreach my $serialid (@serialids) { > ) > || $serinfo->{'cannotedit'} > ); >+ $serinfo->{editdisable} ||= ($serinfo->{status8} and $serinfo->{closed}); > push @serialdatalist, $serinfo; > $processedserialid{$serialid} = 1; > } >-- >1.7.2.5
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 8782
:
12305
|
12879
|
12909
|
12910
|
12930
|
12931
|
12932
|
12933
|
13741