Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt
Owen Leonard fff32393cf Fix for Bug 7123 - barcode should be one word
Other fixes thrown in for good measure:

- Adding data to the results table to match output of returns
- Better checking of error codes in the script to control
  output of error messages (don't show error box when there
  are no errors).
- Move some errors/messages from the right column onto the
  top of the page to match Koha's established pattern.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2011-12-13 17:48:02 +01:00

194 lines
9.8 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Transfers</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Transfers</div>
<div id="doc" class="yui-t7">
<div id="bd">
[% IF ( found ) %]
<div class="yui-g"> <h3>Reserve Found</h3>
<table>
<caption>
[% IF ( reserved ) %]
Reserve found for [% name %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowernumber %]</a>).
[% END %]
[% IF ( waiting ) %]
Item is marked waiting at [% branchname %] for [% name %] (<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowernumber %]</a>).
[% END %]
</caption>
<tr>
<th>
[% IF ( reserved ) %]Set reserve to waiting and transfer book to [% branchname %]: [% END %]
[% IF ( waiting ) %]Cancel reservation and then attempt transfer: [% END %]
</th>
<td>
<form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
[% FOREACH trsfitemloo IN trsfitemloop %]
<input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
<input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
<input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
[% END %]
<input type="hidden" name="itemnumber" value="[% itemnumber %]" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
[% IF ( waiting ) %]
<input type="hidden" name="barcode" value="[% barcode %]" />
<input type="hidden" name="request" value="KillWaiting" />
<input type="submit" value="Cancel" />
[% END %]
[% IF ( reserved ) %]
<input type="hidden" name="request" value="SetWaiting" />
<input type="submit" value="Waiting" />
[% END %]
</form>
</td>
</tr>
[% IF ( reserved ) %]
<tr>
<th>Cancel reservation and then attempt transfer:</th>
<td>
<form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
[% FOREACH trsfitemloo IN trsfitemloop %]
<input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
<input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
<input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
[% END %]
<input type="hidden" name="biblionumber" value="[% biblionumber %]" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="tobranchcd" value="[% tobranchcd %]" />
<input type="hidden" name="barcode" value="[% barcode %]" />
<input type="hidden" name="request" value="KillReserved" />
<input type="submit" value="Cancel" />
</form>
</td>
</tr>
[% END %]
<tr>
<th>Ignore and return to transfers: </th>
<td>
<form method="post" name="mainform" id="mainform" action="branchtransfers.pl" />
<input type="hidden" name="tobranchcd" value="[% tobranchcd %]" />
<input type="hidden" name="barcode" />
[% FOREACH trsfitemloo IN trsfitemloop %]
<input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
<input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
<input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
[% END %]
<input type="submit" value="Ignore" />
</form>
</td>
</tr>
</table></div>
[% ELSE %]
[% IF ( reqmessage ) %]
<div class="dialog message">
<ul>
[% IF ( cancelled ) %]
<li>Reserve cancelled</li>
[% END %]
[% IF ( setwaiting ) %]
<li>Item should now be waiting at library: [% reqbrchname %]</li>
[% END %]
</ul>
</div>
[% END %]
[% IF ( errmsgloop ) %]
<div class="dialog message">
<ul>
[% FOREACH errmsgloo IN errmsgloop %]
[% IF ( errmsgloo.errbadcode ) %]
<li>No Item with barcode: [% errmsgloo.msg %]</li>
[% END %]
[% IF ( errmsgloo.errispermanent ) %]
<li>Please return item to home library: [% errmsgloo.msg %]</li>
[% END %]
[% IF ( errmsgloo.errnotallowed ) %]
<li>You cannot transfer items of [% errmsgloo.codeType %] <b>[% errmsgloo.code %]</b> to <b>[% errmsgloo.tbr %]</b></li>
[% END %]
[% IF ( errmsgloo.errdesteqholding ) %]
<li>Item is already at destination library.</li>
[% END %]
[% IF ( errmsgloo.errwasreturned ) %]
<li>Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% errmsgloo.borrowernumber %]">
[% errmsgloo.firstname %] [% errmsgloo.surname %]
([% errmsgloo.cardnumber %])</a> and has been returned.</li>
[% END %]
[% END %]
</ul>
</div>
[% END %]
<div id="branchtransfers">
<form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
<fieldset class="brief">
<legend>Transfer</legend>
<ol>
<li>
<label for="tobranchcd">Destination library: </label>
<select name="tobranchcd" id="tobranchcd">
[% FOREACH branchoptionloo IN branchoptionloop %]
[% IF ( branchoptionloo.selected ) %]
<option value="[% branchoptionloo.value %]" selected="selected">
[% ELSE %]
<option value="[% branchoptionloo.value %]">
[% END %]
[% branchoptionloo.branchname %]
</option>
[% END %]
</select>
</li>
<li>
<label for="barcode">Enter barcode: </label>
<input name="barcode" id="barcode" size="15" class="focus" /> <input type="submit" value="Submit" />
</li>
</ol>
</fieldset>
<input type="hidden" name="tobranchcd" value="[% tobrancd %]" />
[% FOREACH trsfitemloo IN trsfitemloop %]
<input type="hidden" name="bc-[% trsfitemloo.counter %]" value="[% trsfitemloo.barcode %]" />
<input type="hidden" name="fb-[% trsfitemloo.counter %]" value="[% trsfitemloo.frombrcd %]" />
<input type="hidden" name="tb-[% trsfitemloo.counter %]" value="[% trsfitemloo.tobrcd %]" />
[% END %]
</form></div>
</div>
[% IF ( trsfitemloop ) %]
<div class="yui-g">
<table>
<caption>Transferred Items</caption>
<tr>
<th>Title</th>
<th>Author</th>
<th>Barcode</th>
<th>Shelving location</th>
<th>Call number</th>
<th>Type</th>
<th>To</th>
</tr>
[% FOREACH trsfitemloo IN trsfitemloop %]
<tr>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber %]">[% trsfitemloo.title |html %]</a></td>
<td>[% trsfitemloo.author %]</td>
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber %]&amp;itemnumber=[% trsfitemloo.itemnumber %]#item[% trsfitemloo.itemnumber %]">[% trsfitemloo.barcode %]</a></td>
<td>[% trsfitemloo.location %]</td>
<td>[% trsfitemloo.itemcallnumber %]</td>
<td>[% trsfitemloo.ccode %]</td>
<td>[% trsfitemloo.tobrname %]</td>
</tr>
[% END %]
</table>
</div>
[% END %]
[% END %]
</div>
[% INCLUDE 'intranet-bottom.inc' %]