Bugzilla – Attachment 23920 Details for
Bug 6820
hide receive option if there is nothing to receive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Potential bug fix
0002-Bug-6820-hide-receive-option-if-there-is-nothing-to-.patch (text/plain), 11.35 KB, created by
Samuel Crosby
on 2014-01-06 04:42:45 UTC
(
hide
)
Description:
Potential bug fix
Filename:
MIME Type:
Creator:
Samuel Crosby
Created:
2014-01-06 04:42:45 UTC
Size:
11.35 KB
patch
obsolete
>From cf9c1816a0c17329da1df96354f2340509d382fa Mon Sep 17 00:00:00 2001 >From: Samuel <scrosby000@gmail.com> >Date: Mon, 6 Jan 2014 15:25:37 +1100 >Subject: [PATCH 2/2] Bug 6820 - hide receive option if there is nothing to > receive > >The "receive shipment" button appears even if there are no orders to receive. >This patch hides the button if there are no orders. > >To test the patch: >1. Go to "aquisitions" >2. Create a vendor >3. As the newly created vendor has no orders, there will now be no "receive shipment" button >4. Create a basket >5. Go back to the vendor search >6. The button should now appear for that vendor > >I've also tested it with a mix of vendors with and without baskets in the same search. >--- > .../prog/en/modules/acqui/booksellers.tt | 2 + > .../prog/en/modules/acqui/booksellers.tt~ | 184 ++++++++++++++++++++ > 2 files changed, 186 insertions(+) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >index 3fa12e2..470fd74 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -88,7 +88,9 @@ $(document).ready(function() { > (inactive) > [% END %] > [% END %] >+ [% IF ( supplier.loop_basket.size ) %] > <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a> >+ [% END %] > </span> > <div class="baskets"> > [% IF ( supplier.loop_basket.size ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ >new file mode 100644 >index 0000000..944a4d5 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt~ >@@ -0,0 +1,184 @@ >+[% USE KohaDates %] >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Search for vendor [% supplier %]</title> >+[% INCLUDE 'doc-head-close.inc' %] >+<style type="text/css"> >+#vendors td{ >+ vertical-align: top; >+} >+</style> >+<link rel="stylesheet" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] >+<script type="text/javascript"> >+//<![CDATA[ >+$(document).ready(function() { >+ $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, { >+ 'sDom': 't', >+ 'bPaginate': false, >+ 'bFilter': false, >+ 'bInfo': false, >+ "aaSorting": [[ 1, "asc" ]], >+ "aoColumns": [ >+ null,null,null,null,null,null,{ "sType": "title-string" },null,{ "sType": "title-string" },null >+ ], >+ 'aoColumnDefs': [ >+ { 'aTargets': [-1], 'bSortable': false } >+ ] >+ })); >+ $("#supplierlist").change(function() { >+ var id = $(this).find("option:selected").val(); >+ window.location.href = "#" + id; >+ }); >+ $(".modal").on("show", function(){ >+ var basket = $(this).data("basketno"); >+ var legend = _("Add order to basket") + " " + basket; >+ $(this).find("legend").html(legend); >+ }); >+}); >+//]]> >+</script> >+ >+</head> >+<body id="acq_booksellers" class="acq"> >+[% INCLUDE 'header.inc' %] >+[% INCLUDE 'acquisitions-search.inc' %] >+ >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Search for vendor <em>[% supplier %]</em> </div> >+ >+<div id="doc3" class="yui-t2"> >+ >+ <div id="bd"> >+ <div id="yui-main"> >+ <div class="yui-b"> >+ >+[% INCLUDE 'acquisitions-toolbar.inc' %] >+[% UNLESS ( count == 1 ) %] >+<h1>You searched on <b>vendor [% supplier %],</b> [% count %] results found</h1> >+[% END %] >+[% IF ( loop_suppliers.size ) %] >+ [% UNLESS (count == 1) %] >+ <p>Choose a vendor in the list to jump directly to the right place. >+ <select id="supplierlist"> >+ [% FOREACH supplier1 IN loop_suppliers %] >+ <option value="[% supplier1.booksellerid %]">[% supplier1.name %]</option> >+ [% END %] >+ </select> >+ </p> >+ [% END %] >+ [% IF ( allbaskets ) %] >+ <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]">Show active baskets only</a></p> >+ [% ELSE %] >+ <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]&allbaskets=1">Show all baskets</a></p> >+ [% END %] >+ <div id="acqui_order_supplierlist"> >+ [% FOREACH supplier IN loop_suppliers %] >+ <div class="supplier"> >+ <span class="suppliername"> >+ [% IF (supplier.name) %] >+ <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a> >+ [% ELSE %] >+ <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">NO NAME</a> >+ [% END %] >+ </span> >+ <span class="action"> >+ [% IF ( CAN_user_acquisition_order_manage ) %] >+ [% IF ( supplier.active ) %] >+ <a class="btn btn-small" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid %]&op=add_form"><i class="icon-plus"></i> New basket</a> >+ [% ELSE %] >+ (inactive) >+ [% END %] >+ [% END %] >+ [% IF ( supplier.loop_basket.size ) %] >+ <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a> >+ [% END %] >+ </span> >+ <div class="baskets"> >+ [% IF ( supplier.loop_basket.size ) %] >+ <table class="baskets"> >+ <thead> >+ <tr> >+ <th>No.</th> >+ <th>Name</th> >+ <th>Item count</th> >+ <th>Biblio count</th> >+ <th>Items expected</th> >+ <th>Created by</th> >+ <th>Date</th> >+ <th>Basket group</th> >+ <th>Closed</th> >+ <th> </th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH basket IN supplier.loop_basket %] >+ [% IF ( basket.uncertainprices ) %] >+ <tr class="problem"> >+ [% ELSE %] >+ <tr> >+ [% END %] >+ <td>[% basket.basketno %]</td> >+ <td>[% basket.basketname %]</td> >+ <td>[% basket.total_items %]</td> >+ <td>[% basket.total_biblios %]</td> >+ <td>[% basket.expected_items %]</td> >+ <td> >+ [% basket.authorisedby_firstname %] >+ [% basket.authorisedby_surname %] >+ </td> >+ <td><span title="[% basket.creationdate %]">[% basket.creationdate | $KohaDates %]</span></td> >+ <td> >+ [% IF basket.basketgroup %] >+ [% basketgroup = basket.basketgroup %] >+ [% IF basketgroup.closed %] >+ [% basketgroup.name %] (closed) >+ [% ELSE %] >+ <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basket.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% basketgroup.name %]</a> >+ [% END %] >+ [% END %] >+ </td> >+ <td> >+ [% IF ( basket.closedate ) %] >+ <span title="[% basket.closedate %]">[% basket.closedate | $KohaDates %]</span> >+ [% ELSE %] >+ <span title="9999-99-99"></span> >+ [% END %] >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]">View</a> >+ >+ [% UNLESS ( basket.closedate ) %] >+ | <a id="addtoBasketLabel[% basket.basketno %]" href="#addtoBasket[% basket.basketno %]" role="button" data-toggle="modal">Add to basket</a> >+ <!-- Modal --> >+ <div id="addtoBasket[% basket.basketno %]" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel[% basket.basketno %]" aria-hidden="true" data-basketno="[% basket.basketname %]"> >+ <div class="modal-body"> >+ [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %] >+ </div> >+ <div class="modal-footer"> >+ <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a> >+ </div> >+ </div> >+ [% END %] >+ </td> >+ </tr> >+ [% END %][%# FOREACH basket IN supplier.loop_basket %] >+ </tbody> >+ </table> >+ >+ [% ELSE %] >+ <p>No pending baskets</p> >+ [% END %][%# IF ( supplier.loop_basket.size ) %] >+ </div> >+ </div> >+ [% END %][%# FOREACH supplier IN loop_suppliers %] >+ </div> >+[% END %][%# IF ( loop_suppliers.size ) %] >+</div> >+</div> >+<div class="yui-b"> >+[% IF ( booksellerid ) %] >+[% INCLUDE 'vendor-menu.inc' %] >+[% END %] >+[% INCLUDE 'acquisitions-menu.inc' %] >+</div> >+</div> >+[% INCLUDE 'intranet-bottom.inc' %] >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6820
:
5227
|
23920
|
37296
|
37318
|
37339