Bug 14610 [QA Followup] - Implement staff patron tab
Also fixes a few other minor issues Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
628b78eda6
commit
bbcb2fbeaf
8 changed files with 124 additions and 10 deletions
|
@ -261,7 +261,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 );
|
||||
|
||||
|
@ -299,7 +301,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;
|
||||
|
@ -626,6 +627,7 @@ if ($restoreduedatespec || $stickyduedate) {
|
|||
}
|
||||
|
||||
$template->param(
|
||||
patron => $patron,
|
||||
librarian_messages => $librarian_messages,
|
||||
patron_messages => $patron_messages,
|
||||
borrower => $borrower,
|
||||
|
|
|
@ -44,11 +44,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'),
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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-->
|
||||
|
|
|
@ -513,6 +513,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>
|
||||
|
||||
|
@ -604,6 +609,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 -->
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -323,9 +323,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'},
|
||||
|
|
Loading…
Reference in a new issue