Koha/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tt
Owen Leonard cc4cf2bde4 Bug 19758: Move template JavaScript to the footer: Serials, part 1
This patch modifies some staff client serials templates so
that JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

- Serials -> New subscription
  - Search for a vendor
    - "Choose" link and "Cancel" button should work correctly
  - Search for record
    - "Choose" link and "Cancel" button should word correctly
- Serials -> Add subscription fields
  - Datatable, delete confirmation
  - Edit
    - Form validation (submit both authorised value and MARC field)
- Serials -> Check expiration
  - Date picker in search form
  - Search
    - Renew button triggers popup
- Serials -> Claims -> Search results
  - Date picker, datatable, form validation
  - Select all/none; Download claims

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-14 16:58:13 -03:00

62 lines
1.7 KiB
Text

[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Serials &rsaquo; Select vendor</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="ser_acqui-search-result" class="ser">
<div id="doc" class="yui-t7">
<div id="bd">
<h1>Vendor search results</h1>
[% UNLESS count %]
<h2>Your search returned no results.</h2>
[% ELSIF ( supplier.length < 1 ) %]
<h2>Vendor search: [% count %] result(s) found</h2>
[% ELSE %]
<h2>Vendor search: [% count %] result(s) found for '[% supplier %]'</h2>
[% END %]
[% IF ( loop_suppliers ) %]
<table>
<tr>
<th>Vendor</th>
<th>Select</th>
</tr>
[% FOREACH loop_supplier IN loop_suppliers %]
<tr>
<td>[% loop_supplier.name %]</td>
<td><a class="btn btn-default btn-xs select_vendor" href="#" data-vendorid="[% loop_supplier.aqbooksellerid %]" data-vendorname="[% loop_supplier.name |html%]">Choose</a></td>
</tr>
[% END %]
</table>
[% END %]
<p><a href="/cgi-bin/koha/serials/acqui-search.pl">Perform a new search</a></p>
<div id="closewindow"><a href="#" class="btn btn-default btn-default close">Cancel</a></div>
</div>
[% MACRO jsinclude BLOCK %]
<script type="text/javascript">
function GetIt(aqbooksellerid,name){
opener.document.f.aqbooksellerid.value = aqbooksellerid;
opener.document.f.aqbooksellername.value = name;
window.close();
}
$(document).ready(function(){
$(".select_vendor").on("click",function(e){
e.preventDefault();
var vendorname = $(this).data("vendorname");
var vendorid = $(this).data("vendorid");
GetIt( vendorid, vendorname );
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]