Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/aqbasketuser_search.tt
Karl Menzies 97fa2c032e Bug 2889: template aqbasketusersearch add loop.odd
To Test
1/ In Acquisitions > Create a test Budget
2/ In the Budget > Create at least three Test Funds
3/ Create at least three Users who use the fund
4/ Select Search for Basket User
5/ In the Table results list see the list of users and see the alternate table highlighting

6/ Apply the patch
7/ Refresh the Search for Basket User results window
8/ In the Table results list see the list of users and see the alternate table highlighting in place
9/ Bug fixed

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-15 17:59:05 -03:00

79 lines
2.4 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Basket User Search</title>
[% INCLUDE 'doc-head-close.inc' %]
<style type="text/css">
#custom-doc {
width:44.46em;
*width:43.39em;
min-width:578px;
margin:auto;
text-align:left;
}
</style>
<script type="text/javascript">
//<![CDATA[
// modify parent window owner element
function add_user(borrowernumber, borrowername) {
var p = window.opener;
if(p.add_basket_user(borrowernumber, borrowername) < 0) {
alert(_("Borrower '%s' is already in the list.").format(borrowername));
}
}
//]]>
</script>
</head>
<body>
<div id="custom-doc" class="yui-t7">
<div id="bd">
<div class="yui-g">
<h3>Search for Basket User</h3>
<form action="/cgi-bin/koha/acqui/aqbasketuser_search.pl" method="post">
<fieldset>
<input type="hidden" name="op" id="op" value="do_search" />
<input type="text" name="q" id="q" value="[% q %]" class="focus" />
<input type="submit" class="button" value="Search" />
</fieldset>
<div class="hint">Only staff with superlibrarian or acquisitions permissions (or order_manage permission if granular permissions are enabled) are returned in the search results</div>
</form>
[% IF (q) %]
<p>Searched for <span class="ex">[% q %]</span>, [% nresults %] patron(s) found.</p>
[% END %]
[% IF ( users_loop ) %]
<table>
<thead>
<tr>
<th>Cardnumber</th>
<th>Name</th>
<th>Branch</th>
<th>Categorycode</th>
<th>Select?</th>
</tr>
</thead>
<tbody>
[% FOREACH user IN users_loop %]
[% IF ( loop.odd ) %]
<tr>
[% ELSE %]
<tr class="highlight">
[% END %]
<td>[% user.cardnumber %]</td>
<td>[% user.surname %], [% user.firstname %]</td>
<td>[% user.branchcode %]</td>
<td>[% user.categorycode %]</td>
<td>
<a style="cursor:pointer" onclick="add_user('[% user.borrowernumber %]', '[% user.firstname %] [% user.surname %]');">Add</a>
</td>
</tr>
[% END %]
</table>
[% END %]
<div id="closewindow"><a href="#" class="close">Close</a></div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]