Bug 16939: Making all 'add to basket' actions buttons
Edit: Fixing 'clas' typo in addorderiso2709.tt
Edit: Adding actions class to td
Edit: Fixing js error
Edit: circ/reserveratios.tt updated so that the plus icon doesn't show
if there is no link
Edit: fixing logic in circ/reserveratios.tt
Edit: merge conflicts
Edit: updating buttons to bootstrap 3, which i believe fixes the problem
in comment 16
To test:
1) Go to Acqui -> find a vendor -> view a basket
2) Click add to basket -> fill in 'for an existing record' and hit search
3) 'View MARC' and 'Order' buttons should show under an Actions column with appropriate icons
4) Click Order
5) Click add item when you are redirected to the New order page (no need to fill in any details)
6) Confirm that 'Edit' and 'Delete' buttons now show under an Actions column with appropriate icons
7) Go back to your basket and click add to basket -> from a subscription (we are skipping from a suggestion because this already has a button before my patch)
8) Confirm that 'Order' shows as a button with appropriate icon
9) Go back to your basket and click add to basket -> from an external source
10) fill in any fields and click search to bring up results
11) 'Order' should now show as a button with appropriate icons. MARC and Card preview have been moved into a dropdown menu - confirm this works as expected. Links have not been changed when clicking on a row
12) Go back to your basket and click add to basket -> from a staged file
13) 'Add orders' should now show as a button with appropriate icon
14) Go back to your basket and click add to basket -> from titles with highest hold ratios
15) 'X to order' should now show as a button with appropriate icon
Sponsored-by: Catalyst IT
Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>
Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
94bdfc2bee
commit
f3011690fc
|
|
@ -413,7 +413,9 @@
|
|||
</td>
|
||||
<td><span title="[% batch_lis.staged_date | html %]">[% batch_lis.staged_date | $KohaDates with_hours => 1 | html %]</span></td>
|
||||
<td>[% batch_lis.num_records | html %]</td>
|
||||
<td><a href="[% batch_lis.scriptname | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&basketno=[% basketno | uri %]&booksellerid=[% booksellerid | uri %]">Add orders</a></td>
|
||||
<td class="actions">
|
||||
<a href="[% batch_lis.scriptname | url %]?import_batch_id=[% batch_lis.import_batch_id | uri %]&basketno=[% basketno | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add orders</a>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@
|
|||
<th>Summary</th>
|
||||
<th>Publisher</th>
|
||||
<th>Copyright</th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -67,13 +66,9 @@
|
|||
<td>
|
||||
[% biblio.copyrightdate | html %]
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber | uri %]&viewas=html" class="btn btn-default btn-xs previewMARC">View MARC</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&biblionumber=[% biblio.biblionumber | uri %]" class="btn btn-default btn-xs" title="Order this one">
|
||||
Order
|
||||
</a>
|
||||
<td class="actions">
|
||||
<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber | uri %]&viewas=html" class="previewMARC btn btn-default btn-xs"><i class="fa fa-eye"></i> View MARC</a>
|
||||
<a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&biblionumber=[% biblio.biblionumber | uri %]" title="Order this one" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -256,8 +256,7 @@
|
|||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th>Actions</th>
|
||||
<th>Barcode</th>
|
||||
<th>Home library</th>
|
||||
<th>Holding library</th>
|
||||
|
|
|
|||
|
|
@ -68,13 +68,13 @@
|
|||
<span title="0000-00-00"></span>
|
||||
[% END %]
|
||||
</td>
|
||||
<td>
|
||||
<td class="actions">
|
||||
[% IF (sub.alreadyOnOrder) %]
|
||||
Outstanding order
|
||||
[% END %]
|
||||
[% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid%]
|
||||
<a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&biblionumber=[% sub.biblionumber | uri %]&from_subscriptionid=[% sub.subscriptionid | uri %]" title="Order this one">
|
||||
Place order
|
||||
[% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid %]
|
||||
<a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&biblionumber=[% sub.biblionumber | uri %]&from_subscriptionid=[% sub.subscriptionid | uri %]" title="Order this one" class="btn btn-default btn-xs">
|
||||
<i class="fa fa-plus"></i> Order
|
||||
</a>
|
||||
[% ELSE %]
|
||||
<a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
|
||||
|
|
|
|||
|
|
@ -100,30 +100,30 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
|
|||
|
||||
[% IF ( breeding_loop ) %]
|
||||
<table id="resultst">
|
||||
<thead> <tr>
|
||||
<thead><tr>
|
||||
<th>Server</th>
|
||||
<th>Title</th>
|
||||
<th>Author</th>
|
||||
<th>ISBN</th>
|
||||
<th>LCCN</th>
|
||||
[% IF Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' %]
|
||||
<th>Additional fields</th>
|
||||
[% IF ( Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' ) %]
|
||||
<th>Additional fields</th>
|
||||
[% END %]
|
||||
<th>Preview</th>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
</tr></thead>
|
||||
<tbody>[% FOREACH breeding_loo IN breeding_loop %]
|
||||
[% IF ( breeding_loo.breedingid ) %]
|
||||
|
||||
<tr>
|
||||
<td>[% breeding_loo.server | html %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid | html %]" class="previewData">Preview card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid | html %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td>
|
||||
<td>[% breeding_loo.server | html %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid | html %]" class="previewData">Preview card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid | html %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td>
|
||||
<td>[% breeding_loo.title | html %]</td>
|
||||
<td>[% breeding_loo.author | html %]</td>
|
||||
<td>[% breeding_loo.isbn | html %]</td>
|
||||
<td>[% breeding_loo.lccn | html %]</td>
|
||||
[% IF Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' %]
|
||||
[% IF ( Koha.Preference('AdditionalFieldsInZ3950ResultSearch') != '' %]
|
||||
<td>
|
||||
<dl>
|
||||
<dl>
|
||||
[% FOREACH addnumberfield IN breeding_loo.addnumberfields %]
|
||||
[% FOREACH string IN breeding_loo.$addnumberfield %]
|
||||
<dt>[% addnumberfield | html %]:</dt>
|
||||
|
|
@ -133,9 +133,18 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
|
|||
</dl>
|
||||
</td>
|
||||
[% END %]
|
||||
<td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid | html %]" title="Card" class="previewData">Card</a></td>
|
||||
<td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Order</a></td>
|
||||
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-default btn-xs dropdown-toggle" id="z3950preview[% breeding_loo.breedingid | uri %]" role="button" data-toggle="dropdown" href="#">
|
||||
Preview <b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="z3950preview[% breeding_loo.breedingid | html %]">
|
||||
<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData"><i class="fa fa-eye"></i> MARC</a></li>
|
||||
<li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid | uri %]" title="Card" class="previewData"><i class="fa fa-eye"></i> Card</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td class="actions"><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]</tbody>
|
||||
|
|
|
|||
|
|
@ -92,8 +92,20 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
</td>
|
||||
<td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.ratiocalc | uri %] --><a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&rr_quantity_to_order=[% reserveloo.ratiocalc | uri %]">[% END %]<b>[% reserveloo.ratiocalc | html %] to order</b>[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]</a>[% END %]
|
||||
[% IF ( reserveloo.pendingorders ) %]<br><b>[% reserveloo.pendingorders | html %] pending</b>[% END %]</p>[% END %]</td>
|
||||
<td class="actions">
|
||||
<p>
|
||||
[% IF ( reserveloo.thisratio_atleast1 ) %]
|
||||
[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.ratiocalc | html %] -->
|
||||
<a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&rr_quantity_to_order=[% reserveloo.ratiocalc | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% reserveloo.ratiocalc | html %] to order</a>
|
||||
[% ELSE %]
|
||||
<b>[% reserveloo.ratiocalc | html %] to order</b>
|
||||
[% END %]
|
||||
[% IF ( reserveloo.pendingorders ) %]<br><b>[% reserveloo.pendingorders | html %] pending</b>[% END %]
|
||||
[% ELSE %]
|
||||
0 to order
|
||||
[% END %]
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -87,13 +87,12 @@ function constructTrNode(index, unique_item_fields) {
|
|||
'stocknumber', 'ccode', 'itype', 'materials', 'itemnotes'];
|
||||
|
||||
var result = "<tr idblock='" + index + "'>";
|
||||
var edit_link = "<a href='#itemfieldset' style='text-decoration:none' onclick='showItem(\"" + index + "\");'>"
|
||||
var edit_link = "<a href='#itemfieldset' style='text-decoration:none' onclick='showItem(\"" + index + "\");' class='btn btn-default btn-xs'><i class='fa fa-pencil'></i> "
|
||||
+ (window.MSG_ADDITEM_JS_EDIT || "Edit") + "</a>";
|
||||
var del_link = "<a style='cursor:pointer' "
|
||||
+ "onclick='deleteItemBlock(this, \"" + index + "\", \"" + unique_item_fields + "\");'>"
|
||||
+ "onclick='deleteItemBlock(this, \"" + index + "\", \"" + unique_item_fields + "\");' class='btn btn-default btn-xs'><i class='fa fa-trash'></i> "
|
||||
+ (window.MSG_ADDITEM_JS_DELETE || "Delete") + "</a>";
|
||||
result += "<td>" + edit_link + "</td>";
|
||||
result += "<td>" + del_link + "</td>";
|
||||
result += "<td class='actions'>" + edit_link + " " + del_link + "</td>";
|
||||
for(i in fields) {
|
||||
var field = fields[i];
|
||||
var field_elt = $("#" + index)
|
||||
|
|
|
|||
Loading…
Reference in New Issue