Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt
Owen Leonard 21e88a1aec
Bug 33005: Use template wrapper for breadcrumbs: Acquisitions part 3
This patch updates several acquisitions-related templates so that they
use the new WRAPPER for displaying breadcrumbs.

To test, apply the patch and test each page and its variations.
Breadcrumbs should look correct, and each link should be correct.

- Acquisitions ->
  -> All available funds table
     -> Ordered
     -> Spent
  -> Vendor
     -> Vendor details
     -> Uncertain prices
     -> Receive shipments (must have at least one open basket)
        -> If necessary, receive a new shipment. Or click an
           invoice number to reach the "receive orders" page.
           -> Click "Receive" in the table listing baskets.
     -> Basket -> Add to basket
        -> From a suggestion
        -> From an external source

Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-04-12 11:43:17 -03:00

144 lines
6.4 KiB
Text

[% USE raw %]
[% USE Branches %]
[% USE Price %]
[% USE Asset %]
[% PROCESS 'i18n.inc' %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Add order from a suggestion &rsaquo; Acquisitions &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="acq_newordersuggestion" class="acq">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'suggestions-add-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
[% END %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
Add order from a suggestion
[% END %]
[% END #/ WRAPPER breadcrumbs %]
[% END #/ WRAPPER sub-header.inc %]
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Suggestions</h1>
<div class="page-section">
[% IF suggestions.size %]
<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>Library</th>
<th>Fund</th>
<th>Price</th>
<th>Quantity</th>
<th>Total</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% FOREACH suggestion IN suggestions %]
<tr>
<td>[% suggestion.managedby | html %]</td>
<td>
<p>[% suggestion.title | html %] - [% suggestion.author | html %]</p>
<p>
[% IF ( suggestion.copyrightdate ) %]&copy; [% suggestion.copyrightdate | html %] [% END %]
[% IF ( suggestion.volumedesc ) %]volume: <em>[% suggestion.volumedesc | html %]</em> [% END %]
[% IF ( suggestion.isbn ) %]ISBN: <em>[% suggestion.isbn | html %]</em> [% END %]
[% IF ( suggestion.publishercode ) %]<br />published by: [% suggestion.publishercode | html %] [% END %]
[% IF ( suggestion.publicationyear ) %] in <em>[% suggestion.publicationyear | html %]</em> [% END %]
[% IF ( suggestion.place ) %] in <em>[% suggestion.place | html %]</em> [% END %]
[% IF ( suggestion.note ) %]<p><em>([% suggestion.note | html %])</em></p> [% END %]
</p>
</td>
<td>[% INCLUDE 'patron-title.inc' patron => suggestion.suggester %]</td>
<td>[% INCLUDE 'patron-title.inc' patron => suggestion.manager %]</td>
<td>
[% Branches.GetName(suggestion.branchcode) | html %]
</td>
<td>
[% suggestion.fund.budget_name | html %]
</td>
<td>
[% suggestion.price | $Price %]
</td>
<td>
[% IF (suggestion.quantity > 0) %]
[% suggestion.quantity | html %]
[% END %]
</td>
<td>
[% suggestion.total | $Price %]
</td>
<td class="actions">
[% IF ( suggestion.biblionumber ) %]
<a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]&amp;biblio=[% suggestion.biblionumber | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a>
[% ELSE %]
<a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestion.suggestionid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
There are no outstanding (accepted) suggestions.
[% END %]
</div> <!-- /.page-section -->
</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' %]
[% INCLUDE 'calendar.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": "full"
}));
$("#show_only_mine").on('click', function(e){
e.preventDefault();
suggestionst.fnFilter('^[% logged_in_user.borrowernumber | html %]$', 0, true);
});
$("#show_all").on('click', function(e){
e.preventDefault();
suggestionst.fnFilter('', 0 );
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]