Bug 10086: Link to go to basket from uncertain prices page

This patch moves the Edit button into an Edit column, styled with
bootstrap button and font awesome icon, and adds a link on the basket
name to go to the basket.

To test:
1) Add an item with uncertain prices to a basket
2) Go to the vendor of the basket
3) Click Uncertain prices on the left
4) Notice 'edit' button does not look like a button, and basket name is
not a link
5) Apply patch and refresh page
6) Basket name is now a link. Click to confirm it takes you to the right
page
7) Edit button is now in edit column. Confirm it works as expected
8) Confirm you cannot sort on Edit column and the button does not wrap
on a narrower browser
9) Check that the correct information is displayed for the order column
(title, author, publisher code, publication year, copyright date, isbn)

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Aleisha Amohia 2017-02-13 22:53:10 +00:00 committed by Tomas Cohen Arazi
parent 0fce4ba81d
commit ad00fc72ad
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -101,18 +101,19 @@
<thead>
<tr>
<th>Basket</th>
<th>[% tp('noun', 'Order') | html %]</th>
<th>[% tp('noun', 'Order') | html %]</th>
<th>By</th>
<th>Uncertain</th>
<th>Price</th>
<th>Quantity</th>
<th class="NoSort">Uncertain</th>
<th class="NoSort">Price</th>
<th class="NoSort">Quantity</th>
<th class="NoSort">Edit</th>
</tr>
</thead>
<tbody>
[% FOREACH uncertainpriceorder IN uncertainpriceorders %]
<tr>
<td>
[% uncertainpriceorder.basketname | html %]
<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% uncertainpriceorder.basketno %]">[% uncertainpriceorder.basketname %]</a>
</td>
<td>
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% uncertainpriceorder.biblionumber | uri %]">[% uncertainpriceorder.title | html %]</a>
@ -125,9 +126,6 @@
[% END %]
[% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn | html %][% END %]
<br />
<a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber | uri %]&amp;booksellerid=[% booksellerid | uri %]&amp;basketno=[% uncertainpriceorder.basketno | uri %]">
Edit
</a>
</td>
<td>
[% uncertainpriceorder.firstname | html %] [% uncertainpriceorder.surname | html %]
@ -146,6 +144,9 @@
<input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber | html %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber | html %]" value="[% uncertainpriceorder.quantity | html %]" />
[% END %]
</td>
<td class="actions">
<a href="/cgi-bin/koha/acqui/neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% uncertainpriceorder.basketno %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
</td>
</tr>
[% END %]
</tbody>
@ -172,7 +173,7 @@
$(document).ready(function() {
var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
{ 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
],
"sPaginationType": "full"
}));