Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tt
Owen Leonard b2eb614bd4
Bug 30952: (follow-up) Undo change to Home breadcrumb
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-12 16:00:45 -03:00

148 lines
5.7 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' %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
</li>
<li>
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
</li>
<li>
<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
</li>
<li>
<a href="#" aria-current="page">
Add order from a suggestion
</a>
</li>
</ol>
</nav>
[% END %]
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Suggestions</h1>
[% 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 %]
</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' %]