This patch makes two categories of changes: 1. CSS changes to accommodate changes in DataTables default CSS and markup structure. I've tried to make sure all of our Koha-specific styles are still applying. This change necessitates a rebuild of staff interface CSS. 2. DataTables option names: In this version of DataTables you can't override a default which uses CamelCase (e.g. "pagingType") with one in "Hungarian" notation, e.g. "sPaginationType." Since we define many default options in prog/js/datatables.js in camel case, any template which previously used a Hungarian notation option to override the default has now been updated to use the CamelCase version. See https://datatables.net/upgrade/1.10-convert#Options for a summary of the different option name changes. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
151 lines
6.7 KiB
Text
151 lines
6.7 KiB
Text
[% USE raw %]
|
|
[% USE Branches %]
|
|
[% USE Price %]
|
|
[% USE Asset %]
|
|
[% USE AuthorisedValues %]
|
|
[% PROCESS 'i18n.inc' %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>[% FILTER collapse %]
|
|
[% t("Add order from a suggestion") | html %] ›
|
|
[% t("Acquisitions") | html %] ›
|
|
[% t("Koha") | html %]
|
|
[% END %]</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 %]
|
|
<span>Add order from a suggestion</span>
|
|
[% 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>Document type</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> </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 ) %]© [% 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>[% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype ) | html %]</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 %]&basketno=[% basketno | uri %]&suggestionid=[% suggestion.suggestionid | uri %]&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 %]&basketno=[% basketno | uri %]&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, {
|
|
"columnDefs": [
|
|
{ "targets": [ 0 ], "visible": false, "searchable": true }, // must be searchable for fnFilter
|
|
{ "targets": [ -1 ], "orderable": false, "searchable": false },
|
|
],
|
|
"pagingType": "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' %]
|