Bugzilla – Attachment 58967 Details for
Bug 8361
Issuing rule if no rule is defined
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8361 (QA Followup) Add warnings
Bug-8361-QA-Followup-Add-warnings.patch (text/plain), 3.16 KB, created by
Nick Clemens (kidclamp)
on 2017-01-13 18:11:26 UTC
(
hide
)
Description:
Bug 8361 (QA Followup) Add warnings
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-01-13 18:11:26 UTC
Size:
3.16 KB
patch
obsolete
>From 4cb8f20057832362caef124421b2bb2ac0b8e933 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 13 Jan 2017 18:06:34 +0000 >Subject: [PATCH] Bug 8361 (QA Followup) Add warnings > > - Added message to mainpage.pl if no rules defined > - Added message to circulation.tt to warn if rule undefined for >patron/itemtype combination > >To test: >1 - Remove all rules >2 - Note that there is a warning on mainpage >3 - Add one rule >4 - Checkout to patron an itemtype that is outside of rule >defined above >5 - Note explanation that no rule is deifned >--- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 6 +++++- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 7 +++++++ > mainpage.pl | 6 ++++++ > 3 files changed, 18 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 1444f2d..e5694fc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -241,7 +241,11 @@ $(document).ready(function() { > [% END %] > > [% IF ( PATRON_CANT ) %] >- <li>This patron can't check out this item per library circulation policy</li> >+ <li>This patron can't check out this item per library circulation policy.</li> >+[% END %] >+ >+[% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %] >+ <li>No circ rule deinfed for this patron and itemtype combination.</li> > [% END %] > > [% IF ( NOT_FOR_LOAN_FORCING ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index f1afe8e..ad915f9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -23,6 +23,13 @@ > <p><a class="btn btn-small" href="/cgi-bin/koha/members/members-home.pl"><i class="fa fa-plus"> </i> Create patron</a></p> > </div> > [% END %] >+ [% IF noCircRules %] >+ <div id="nocircruleswarning" class="dialog alert"> >+ <p><strong>Warning:</strong> You have not defined any circ rules and will not be able to check out items to patrons.</p> >+ <p>Please define rules in the Administration: Circulation and fines rules module or using the link below or ask an adminstrator to do so.<p> >+ <p><a class="btn btn-small" href="/cgi-bin/koha/admin/smart-rules.pl"><i class="fa fa-plus"> </i> Define circulation and fines rules</a></p> >+ </div> >+ [% END %] > <div class="yui-u first"> > > <div id="area-list-left"> >diff --git a/mainpage.pl b/mainpage.pl >index 7410247..7894e11 100755 >--- a/mainpage.pl >+++ b/mainpage.pl >@@ -31,6 +31,7 @@ use Koha::Patron::Modifications; > use Koha::Patron::Discharge; > use Koha::Reviews; > use Koha::ArticleRequests; >+use Koha::IssuingRules; > > my $query = new CGI; > >@@ -91,4 +92,9 @@ unless ($loggedinuser) { > $template->param(adminWarning => 1); > } > >+unless ( Koha::IssuingRules->count ) { >+ warn "No rules"; >+ $template->param(noCircRules => 1); >+} >+ > output_html_with_http_headers $query, $cookie, $template->output; >-- >2.1.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 8361
:
57704
|
57717
|
58966
|
58967
|
59086
|
59087