Bugzilla – Attachment 26731 Details for
Bug 7413
Allow OPAC renewal x days before due date
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7413: OPAC bootstrap theme changes
Bug-7413-OPAC-bootstrap-theme-changes.patch (text/plain), 5.62 KB, created by
Brendan Gallagher
on 2014-04-01 21:57:03 UTC
(
hide
)
Description:
Bug 7413: OPAC bootstrap theme changes
Filename:
MIME Type:
Creator:
Brendan Gallagher
Created:
2014-04-01 21:57:03 UTC
Size:
5.62 KB
patch
obsolete
>From 7e783bd2e035ae9f353f83c10baad1e1c4faff06 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Holger=20Mei=C3=9Fner?= <h.meissner.82@web.de> >Date: Fri, 14 Feb 2014 09:11:19 +0100 >Subject: [PATCH] Bug 7413: OPAC bootstrap theme changes >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch makes opac-user.pl and the bootstrap version of opac-user.tt >handle the new renewal error "too_soon". > >To test: >1) Set global syspref "opacthemes" to bootstrap. >2) Set global syspref "OpacRenewalAllowed" to Allow. >3) Test the same things as in previous patch, this time for the OPAC > summary page. > >Sponsored-by: Hochschule für Gesundheit (hsg), Germany >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> >--- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 26 +++++++++----------- > opac/opac-user.pl | 17 +++++++++++-- > 2 files changed, 27 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 9cd47df..f4e7790 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -200,21 +200,19 @@ > </td> > [% IF ( OpacRenewalAllowed ) %] > <td class="renew"> >- [% IF ( ISSUE.status ) %] >- [% IF ( canrenew ) %] >- <input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% ISSUE.itemnumber %]&borrowernumber=[% ISSUE.borrowernumber %]">Renew</a> >- [% END %] >- <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span> >- [% ELSE %] >- Not renewable >- [% IF ( ISSUE.too_many ) %] >- <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span> >- [% ELSE %] >- [% IF ( ISSUE.on_reserve ) %] >- <span class="renewals">(On hold)</span> >- [% END %] >- [% END %] >+ [% IF ( ISSUE.status ) %] >+ [% IF ( canrenew ) %] >+ <input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% ISSUE.itemnumber %]&borrowernumber=[% ISSUE.borrowernumber %]">Renew</a> > [% END %] >+ <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span> >+ [% ELSIF ( ISSUE.too_many ) %] >+ Not renewable >+ [% ELSIF ( ISSUE.too_soon ) %] >+ No renewal before [% ISSUE.soonestrenewdate %] >+ <span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span> >+ [% ELSIF ( ISSUE.on_reserve ) %] >+ <span class="renewals">(On hold)</span> >+ [% END %] > </td> > [% END %] > [% IF ( OPACFinesTab ) %] >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 02002a3..7ca64bd 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -182,8 +182,21 @@ if ($issues){ > if($status && C4::Context->preference("OpacRenewalAllowed")){ > $issue->{'status'} = $status; > } >- $issue->{'too_many'} = 1 if $renewerror and $renewerror eq 'too_many'; >- $issue->{'on_reserve'} = 1 if $renewerror and $renewerror eq 'on_reserve'; >+ >+ if ($renewerror) { >+ $issue->{'too_many'} = 1 if $renewerror eq 'too_many'; >+ $issue->{'on_reserve'} = 1 if $renewerror eq 'on_reserve'; >+ >+ if ( $renewerror eq 'too_soon' ) { >+ $issue->{'too_soon'} = 1; >+ $issue->{'soonestrenewdate'} = output_pref( >+ C4::Circulation::GetSoonestRenewDate( >+ $issue->{borrowernumber}, >+ $issue->{itemnumber} >+ ) >+ ); >+ } >+ } > > if ( $issue->{'overdue'} ) { > push @overdues, $issue; >-- >1.7.10.4
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 7413
:
24685
|
24686
|
24687
|
24688
|
24689
|
24926
|
24927
|
24928
|
24929
|
24930
|
25166
|
25247
|
25248
|
25249
|
25250
|
25251
|
25252
|
25855
|
25856
|
25857
|
25858
|
25859
|
25860
|
26726
|
26727
|
26728
|
26729
|
26730
| 26731 |
26732
|
26733