Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt
Owen Leonard 4f252d611d Bug 20672: Update two-column templates with Bootstrap grid: Acquisitions part 3
This patch modifies several acquisitions templates to use the Bootstrap
grid instead of YUI.

This patch also removes obsolete "text/javascript" attributes from
<script> tags in the modified templates.

To test, apply the patch and view the following pages, confirming that
they look correct at various browser widths:

- Acquisitions -> Vendor -> Add to basket -> From an existing record ->
  Search results.
  - Order
- Acquisitions -> Vendor -> Add to basket -> From a subscription
- Acquisitions -> Vendor -> Add to basket -> From a suggestion
- Acquisitions -> Vendor -> Add to basket -> From an external source
  - Search for an title which already exists in your catalog
  - Select a search result which has an ISBN matching the title in your
    catalog.
  - Order. The duplicate warning page is the one modified.
- Acquisitions home page -> Click an "Ordered" value for a fund.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-08-31 11:13:52 +00:00

104 lines
4.9 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Acquisitions &rsaquo; Add order from a suggestion</title>
[% Asset.css("css/datatables.css") | $raw %]
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="acq_newordersuggestion" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'suggestions-add-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% name | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> &rsaquo; Add order from a suggestion</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Suggestions</h1>
[% IF ( suggestions_loop ) %]
<a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a>
<table id="suggestionst">
<thead>
<tr>
<th>Mine</th>
<th>Suggestion</th>
<th>Suggested by</th>
<th>Accepted by</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% FOREACH suggestions_loo IN suggestions_loop %]
<tr>
<td>[% suggestions_loo.managedby | html %]</td>
<td>
<p>[% suggestions_loo.title | html %] - [% suggestions_loo.author | html %]</p>
<p>
[% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate | html %] [% END %]
[% IF ( suggestions_loo.volumedesc ) %]volume: <i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
[% IF ( suggestions_loo.isbn ) %]ISBN: <i>[% suggestions_loo.isbn | html %]</i> [% END %]
[% IF ( suggestions_loo.publishercode ) %]<br />published by: [% suggestions_loo.publishercode | html %] [% END %]
[% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %]
[% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %]
[% IF ( suggestions_loo.note ) %]<p><i>([% suggestions_loo.note | html %])</i></p> [% END %]
</p>
</td>
<td>
[% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %],[% END %] [% suggestions_loo.firstnamesuggestedby | html %]
</td>
<td>
[% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby | html %]
</td>
<td class="actions">
[% IF ( suggestions_loo.biblionumber ) %]
<a href="neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;suggestionid=[% suggestions_loo.suggestionid | html %]&amp;biblio=[% suggestions_loo.biblionumber | html %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
[% ELSE %]
<a href="neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;suggestionid=[% suggestions_loo.suggestionid | html %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
There are no outstanding (accepted) suggestions.
[% END %]
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'acquisitions-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/acquisitions-menu.js") | $raw %]
[% INCLUDE 'datatables.inc' %]
<script>
$(document).ready(function() {
var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ 0 ], "bVisible": false, "bSearchable": true }, // must be searchable for fnFilter
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
],
"sPaginationType": "four_button"
}));
$("#show_only_mine").on('click', function(e){
e.preventDefault();
suggestionst.fnFilter('^[% loggedinuser | html %]$', 0, true);
});
$("#show_all").on('click', function(e){
e.preventDefault();
suggestionst.fnFilter('', 0 );
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]