Bugzilla – Attachment 56324 Details for
Bug 14610
Add ability to place article requests in Koha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14610 [QA Followup] - Implement staff patron tab
Bug-14610-QA-Followup---Implement-staff-patron-tab.patch (text/plain), 13.80 KB, created by
Kyle M Hall (khall)
on 2016-10-13 10:07:01 UTC
(
hide
)
Description:
Bug 14610 [QA Followup] - Implement staff patron tab
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-10-13 10:07:01 UTC
Size:
13.80 KB
patch
obsolete
>From 31de20b1f89c494e7a5655b5cee1f5e088462126 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 14 Sep 2016 13:39:19 +0000 >Subject: [PATCH] Bug 14610 [QA Followup] - Implement staff patron tab > >Also fixes a few other minor issues >--- > circ/circulation.pl | 6 +- > installer/data/mysql/sysprefs.sql | 2 +- > .../prog/en/includes/patron-article-requests.inc | 91 ++++++++++++++++++++++ > .../prog/en/modules/circ/article-requests.tt | 8 +- > .../prog/en/modules/circ/circulation.tt | 11 +++ > .../prog/en/modules/members/moremember.tt | 10 +++ > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 1 - > members/moremember.pl | 5 +- > 8 files changed, 124 insertions(+), 10 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index fcd967d..cba734e 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -260,7 +260,9 @@ if ($findborrower) { > } > > # get the borrower information..... >+my $patron; > if ($borrowernumber) { >+ $patron = Koha::Patrons->find( $borrowernumber ); > $borrower = GetMemberDetails( $borrowernumber, 0 ); > my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); > >@@ -298,7 +300,6 @@ if ($borrowernumber) { > finetotal => $fines > ); > >- my $patron = Koha::Patrons->find( $borrowernumber ); > if ( $patron and $patron->is_debarred ) { > $template->param( > 'userdebarred' => $borrower->{debarred}, >@@ -596,7 +597,7 @@ my $view = $batch > > my @relatives; > if ( $borrowernumber ) { >- if ( my $patron = Koha::Patrons->find( $borrower->{borrowernumber} ) ) { >+ if ( $patron ) { > if ( my $guarantor = $patron->guarantor ) { > push @relatives, $guarantor->borrowernumber; > push @relatives, $_->borrowernumber for $patron->siblings; >@@ -625,6 +626,7 @@ if ($restoreduedatespec || $stickyduedate) { > } > > $template->param( >+ patron => $patron, > librarian_messages => $librarian_messages, > patron_messages => $patron_messages, > borrower => $borrower, >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index d597fe5..20f21f1 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -43,11 +43,11 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AmazonLocale','US','US|CA|DE|FR|JP|UK','Use to set the Locale of your Amazon.com Web Services','Choice'), > ('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'), > ('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for Suggestion and reading history privacy',''), >-('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), > ('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'), > ('ArticleRequestsMandatoryFields', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''yes''', 'multiple'), > ('ArticleRequestsMandatoryFieldsItemsOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple'), > ('ArticleRequestsMandatoryFieldsRecordOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''bib_only''', 'multiple'), >+('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), > ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), > ('AuthoritiesLog','1',NULL,'If ON, log edit/create/delete actions on authorities.','YesNo'), > ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc >new file mode 100644 >index 0000000..0bcf8b0 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc >@@ -0,0 +1,91 @@ >+<div id="article-requests"> >+[% IF patron.article_requests_current.count %] >+ <table id="article-requests-table" class="table table-bordered table-striped"> >+ <thead> >+ <tr> >+ <th class="anti-the">Record title</th> >+ <th class="psort">Placed on</th> >+ <th class="anti-the">Title</th> >+ <th>Author</th> >+ <th>Volume</th> >+ <th>Issue</th> >+ <th>Date</th> >+ <th>Pages</th> >+ <th>Chapters</th> >+ <th>Notes</th> >+ <th>Status</th> >+ <th>Pickup library</th> >+ </tr> >+ </thead> >+ >+ <tbody> >+ [% FOREACH ar IN patron.article_requests_current %] >+ <tr> >+ <td class="article-request-title"> >+ <a class="article-request-title" href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% ar.biblionumber %]"> >+ [% ar.biblio.title %] >+ [% ar.item.enumchron %] >+ </a> >+ [% ar.biblio.author %] >+ [% IF ar.itemnumber %] <i>(only [% ar.item.barcode %])</i>[% END %] >+ </td> >+ >+ <td class="article-request-created_on"> >+ [% ar.created_on | $KohaDates %] >+ </td> >+ >+ <td class="article-request-title"> >+ [% ar.title %] >+ </td> >+ >+ <td class="article-request-author"> >+ [% ar.author %] >+ </td> >+ >+ <td class="article-request-volume"> >+ [% ar.volume %] >+ </td> >+ >+ <td class="article-request-issue"> >+ [% ar.issue %] >+ </td> >+ >+ <td class="article-request-date"> >+ [% ar.date %] >+ </td> >+ >+ <td class="article-request-pages"> >+ [% ar.pages %] >+ </td> >+ >+ <td class="article-request-chapters"> >+ [% ar.chapters %] >+ </td> >+ >+ <td class="article-request-patron-notes"> >+ [% ar.patron_notes %] >+ </td> >+ >+ <td class="article-request-status"> >+ [% IF ar.status == 'PENDING' %] >+ Pending >+ [% ELSIF ar.status == 'PROCESSING' %] >+ Processing >+ [% ELSIF ar.status == 'COMPLETED' %] >+ Completed >+ [% ELSIF ar.status == 'CANCELED' %] >+ Canceled >+ [% END %] >+ </td> >+ >+ <td class="article-request-branchcode"> >+ [% ar.branch.branchname %] >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ [% ELSE %] >+ Patron has no current article requests. >+ [% END %] >+</div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >index 7a93511..1606cb0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt >@@ -252,22 +252,22 @@ > <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="ar-actions"> > <li> > <a class="ar-process-request" href="#" onclick="Process( [% ar.id %], $(this) ); return false;"> >- <i class="icon-ok-circle"></i> >+ <i class="fa fa-cog"></i> > Process request > </a> > > <a class="ar-complete-request" href="#" onclick="Complete( [% ar.id %], $(this) ); return false;"> >- <i class="icon-ok-circle"></i> >+ <i class="fa fa-check-circle"></i> > Complete request > </a> > > <a class="ar-cancel-request" href="#" onclick="Cancel( [% ar.id %], $(this) ); return false;"> >- <i class="icon-remove-circle"></i> >+ <i class="fa fa-minus-circle"></i> > Cancel request > </a> > > <a class="ar-print-request" href="#" onclick="PrintSlip('article-request-slip.pl?id=[% ar.id %]'); return false;"> >- <i class="icon-print"></i> >+ <i class="fa fa-print"></i> > Print slip > </a> > </li> >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 e0284b2..7111ef9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -896,6 +896,13 @@ No patron matched <span class="ex">[% message | html %]</span> > [% ELSE %] > <a href="#reserves" id="holds-tab">0 Holds</a> > [% END %] >+ </li> >+ >+ [% IF Koha.Preference('ArticleRequests') %] >+ <li> >+ <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a> >+ </li> >+ [% END %] > > <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li> > </ul> >@@ -984,6 +991,10 @@ No patron matched <span class="ex">[% message | html %]</span> > [% END %] > </div> <!-- reservesloop --> > >+[% IF Koha.Preference('ArticleRequests') %] >+ [% INCLUDE 'patron-article-requests.inc' %] >+[% END %] >+ > [% ELSIF borrowernumber %] > <div class="dialog message">This patron does not exist. <a href="/cgi-bin/koha/members/members-home.pl">Find another patron?</a></div> > [% END %] <!-- borrowernumber and borrower--> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index c5325e1..f7f2891 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -485,6 +485,11 @@ function validate1(date) { > <a href="#reserves" id="holds-tab">0 Holds</a> > [% END %] > </li> >+ [% IF Koha.Preference('ArticleRequests') %] >+ <li> >+ <a href="#article-requests" id="article-requests-tab"> [% patron.article_requests_current.count %] Article requests</a> >+ </li> >+ [% END %] > <li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li> > </ul> > >@@ -576,6 +581,11 @@ function validate1(date) { > [% ELSE %]<p>Patron has nothing on hold.</p>[% END %] > </div> > >+ >+[% IF Koha.Preference('ArticleRequests') %] >+ [% INCLUDE 'patron-article-requests.inc' %] >+[% END %] >+ > </div> > [% END %] <!-- unknowuser --> > >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 a242d44..70def8c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -722,7 +722,6 @@ Using this account is not recommended because some parts of Koha will not functi > <div id="opac-user-article-requests"> > <table id="article-requests-table" class="table table-bordered table-striped"> > <caption>Article requests <span class="count">([% borrower.article_requests_current.count %] total)</span></caption> >- <!-- RESERVES TABLE ROWS --> > <thead> > <tr> > <th class="anti-the">Record title</th> >diff --git a/members/moremember.pl b/members/moremember.pl >index 00e2600..b663830 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -320,9 +320,10 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { > } > > # in template <TMPL_IF name="I"> => instutitional (A for Adult, C for children) >-$template->param( $data->{'categorycode'} => 1 ); >+$template->param( $data->{'categorycode'} => 1 ); > $template->param( >- detailview => 1, >+ patron => $patron, >+ detailview => 1, > borrowernumber => $borrowernumber, > othernames => $data->{'othernames'}, > categoryname => $data->{'description'}, >-- >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 14610
:
42822
|
42823
|
42824
|
42825
|
42826
|
42827
|
42828
|
42829
|
43198
|
43199
|
43200
|
43201
|
43202
|
43264
|
43265
|
43266
|
43267
|
43268
|
43270
|
43271
|
43272
|
43273
|
43274
|
43278
|
43279
|
43280
|
43281
|
43282
|
43654
|
43655
|
43656
|
43657
|
43658
|
44219
|
44220
|
44221
|
44222
|
44223
|
44224
|
44225
|
44226
|
44227
|
44228
|
44229
|
44230
|
44231
|
44232
|
44233
|
44234
|
44235
|
44236
|
44237
|
44238
|
44239
|
44240
|
44241
|
44242
|
44916
|
44917
|
44918
|
44919
|
44920
|
44921
|
44922
|
44923
|
44924
|
44925
|
44926
|
45946
|
45947
|
45948
|
45949
|
45950
|
45951
|
45952
|
45953
|
45954
|
45955
|
45956
|
46518
|
46519
|
46520
|
46521
|
46522
|
46523
|
46524
|
46525
|
46526
|
46527
|
46528
|
46529
|
46530
|
46595
|
46596
|
46597
|
46598
|
46599
|
46600
|
46601
|
46602
|
46603
|
46604
|
46605
|
46606
|
46607
|
46608
|
46609
|
46610
|
46611
|
46612
|
47905
|
47906
|
47907
|
47908
|
47909
|
47910
|
47911
|
47912
|
47913
|
47914
|
47915
|
47916
|
47917
|
47918
|
47919
|
47920
|
47921
|
47922
|
48177
|
48178
|
48179
|
48180
|
48181
|
48182
|
48212
|
48213
|
48214
|
48215
|
48216
|
48217
|
48218
|
50348
|
50349
|
50350
|
50351
|
50352
|
50353
|
50354
|
51527
|
51528
|
51529
|
51530
|
51531
|
51532
|
51533
|
51534
|
51778
|
51779
|
51780
|
51781
|
51782
|
51783
|
52688
|
52689
|
52690
|
52691
|
52692
|
52693
|
55556
|
55557
|
55558
|
55559
|
55560
|
55561
|
55568
|
55569
|
56084
|
56085
|
56086
|
56087
|
56088
|
56089
|
56090
|
56318
|
56319
|
56320
|
56321
|
56322
|
56323
|
56324
|
56325
|
56326
|
56327
|
56328
|
56775
|
56776
|
56777
|
56778
|
56779
|
56780
|
56781
|
56782
|
56783
|
56784
|
56785
|
56816
|
56854
|
56855
|
56856
|
56857
|
56858
|
56859
|
56860
|
56861
|
56862
|
56863
|
56864
|
56865