Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-discharge.tt
Aleisha Amohia 89528af3b0 Bug 16463: Replace discharge link with error message if user has checked out items
To test:
1) Ensure the useDischarge syspref is enabled
2) Check out an item to a borrower
3) Log in to the OPAC as this borrower
4) Click the 'ask for a discharge' link in the nav
5) Click the 'Ask for a discharge' link
6) Notice you cannot be discharged because you have checkouts
7) Apply the patch, click the 'ask for a discharge' link in the nav
8) Notice the link has been replaced with an appropriate error message
9) Attempt to force the discharge URL:
/cgi-bin/koha/opac-discharge?op=request
10) Notice the message and you cannot be discharged.
11) Confirm that when you check in your item, the discharge link shows
again and works as expected.

Sponsored-by: Catalyst IT
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-09-29 12:37:00 -03:00

61 lines
3.1 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Discharge</title>
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
<body id="opac-discharge" class="scrollto">
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Discharge</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div>
</div>
<div class="span10">
<div id="discharge" class="maincontainer">
<h1>Discharge</h1>
[% FOR message IN messages %]
<div class="dialog [% message.type %]">
[% IF message.code == "unable_to_generate_pdf" %]
An error occurs when generating the pdf file.
Please contact the staff to resolve this problem.
[% END %]
</div>
[% END %]
[% IF success %]
<p>Your discharge request has been sent. Your discharge will be available on this page within a few days.</p>
[% ELSIF available %]
<a href="/cgi-bin/koha/opac-discharge.pl?op=get">Get your discharge</a></li>
[% ELSIF pending %]
<p>Your discharge will be available on this page within a few days.</p>
[% ELSIF has_issues %]
<p>You cannot be discharged, you have checked out items. Please return items before asking for a discharge.</p>
[% ELSIF not messages %]
<h2>What is a discharge?</h2>
<p>This document certifies that you have returned all borrowed items. It is sometimes asked during a file transfer from a school to another. The discharge is sent by us to your school. You will also find it available on your reader account.</p>
<p><strong>Warning</strong>: This request is only valid if you are in good standing with the library. Once the application is made, you can not borrow library materials.</p>
[% IF has_checkouts %]
<div class="dialog alert">You cannot be discharged, you have checked out items. Please return items before asking for a discharge.</div>
[% ELSE %]
<a href="/cgi-bin/koha/opac-discharge.pl?op=request">Ask for a discharge</a>
[% END %]
[% END %]
</div> <!-- / #discharge -->
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %][% END %]