Bugzilla – Attachment 55242 Details for
Bug 13371
Add filters to the supplier list view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13371: Add a simple view
Bug-13371-Add-a-simple-view.patch (text/plain), 15.60 KB, created by
Julian Maurice
on 2016-09-06 10:40:31 UTC
(
hide
)
Description:
Bug 13371: Add a simple view
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2016-09-06 10:40:31 UTC
Size:
15.60 KB
patch
obsolete
>From f93f241104ffc63eb7b4f4eced6f6143709ba23d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 10 Mar 2015 11:26:39 +0100 >Subject: [PATCH] Bug 13371: Add a simple view > >This patch adds the ability to switch to a simple view if the complete >view to too complex. >--- > acqui/booksellers.pl | 11 + > .../prog/en/modules/acqui/booksellers.tt | 239 ++++++++++++--------- > 2 files changed, 146 insertions(+), 104 deletions(-) > >diff --git a/acqui/booksellers.pl b/acqui/booksellers.pl >index b56f73e..e981b63 100755 >--- a/acqui/booksellers.pl >+++ b/acqui/booksellers.pl >@@ -156,11 +156,22 @@ for my $vendor (@suppliers) { > }; > > } >+ >+my $sessionID = $query->cookie('CGISESSID'); >+my $session = C4::Auth::get_session($sessionID); >+my $view = $query->param('view'); >+if ( $view ) { >+ $session->param('bookseller_default_view', $view); >+} else { >+ $view = $session->param('bookseller_default_view'); >+} >+ > $template->param( > loop_suppliers => $loop_suppliers, > supplier => ( $booksellerid || $supplier ), > count => $supplier_count, > has_budgets => $has_budgets, >+ view => $view, > ); > $template->{VARS}->{'allbaskets'} = $allbaskets; > >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 518a9a6..39c1194 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt >@@ -133,124 +133,155 @@ $(document).ready(function() { > <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a> > </span> > [% END %] >-[% END %] >-[% IF ( loop_suppliers.size ) %] >- [% IF allbaskets %] >- <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]">Show active baskets only</a> >+ [% IF view == "complete" %] >+ <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&view=simple">Switch to the simple view</a></p> > [% ELSE %] >- <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]&allbaskets=1">Show active and inactive baskets</a> >+ <p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&view=complete">Switch to the complete view</a></p> > [% END %] >- | <a href="#" id="toggle_closed_baskets">Show opened baskets only</a> >- <div id="acqui_order_basketlist"> >- <table id="baskets" class="group"> >- <thead> >- <tr> >- <th class='NoVisible'>bookseller</th> >- <th>No.</th> >- <th>Name</th> >- <th>Item count</th> >- <th>Biblio count</th> >- <th>Items expected</th> >- <th>Created by</th> >- <th class="title-string">Date</th> >- <th>Basket group</th> >- <th class="title-string">Closed</th> >- <th> </th> >- </tr> >- </thead> >- <tbody> >- [% FOREACH supplier IN loop_suppliers %] >- [% IF supplier.loop_basket.size == 0 %] >+[% END %] >+[% IF ( loop_suppliers.size ) %] >+ [% IF view == "complete" %] >+ [% IF allbaskets %] >+ <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]">Show active baskets only</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]&allbaskets=1">Show active and inactive baskets</a> >+ [% END %] >+ | <a href="#" id="toggle_closed_baskets">Show opened baskets only</a> >+ <div id="acqui_order_basketlist"> >+ <table id="baskets" class="group"> >+ <thead> > <tr> >- <td> >- <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a> >- ([% supplier.booksellerid %]) >- [% PROCESS action supplier = supplier %] >- </td> >- <td> >- [% IF allbaskets %] >- No basket. >- [% ELSE %] >- No active basket. >- [% END %] >- </td> >- <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> >+ <th class='NoVisible'>bookseller</th> >+ <th>No.</th> >+ <th>Name</th> >+ <th>Item count</th> >+ <th>Biblio count</th> >+ <th>Items expected</th> >+ <th>Created by</th> >+ <th class="title-string">Date</th> >+ <th>Basket group</th> >+ <th class="title-string">Closed</th> >+ <th> </th> > </tr> >- [% END %] >- [% FOREACH basket IN supplier.loop_basket %] >- [% IF ( basket.uncertainprices ) %] >- <tr class="problem"> >- [% ELSE %] >+ </thead> >+ <tbody> >+ [% FOREACH supplier IN loop_suppliers %] >+ [% IF supplier.loop_basket.size == 0 %] > <tr> >+ <td> >+ <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a> >+ ([% supplier.booksellerid %]) >+ [% PROCESS action supplier = supplier %] >+ </td> >+ <td> >+ [% IF allbaskets %] >+ No basket. >+ [% ELSE %] >+ No active basket. >+ [% END %] >+ </td> >+ <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> >+ </tr> > [% END %] >- <td> >- <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a> >- ([% supplier.booksellerid %]) >- [% PROCESS action supplier = supplier %] >- </td> >- <td>[% basket.basketno %]</td> >- <td>[% basket.basketname %]</td> >- <td> >- [% basket.total_items %] >- [% IF basket.total_items_cancelled %] >- ([% basket.total_items_cancelled %] cancelled) >- [% END %] >- </td> >- <td> >- [% basket.total_biblios %] >- [% IF basket.total_biblios_cancelled %] >- ([% basket.total_biblios_cancelled %] cancelled) >- [% END %] >- </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 class="actions"> >- <a class="btn btn-mini" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"><i class="fa fa-eye"></i> View</a> >+ [% FOREACH basket IN supplier.loop_basket %] >+ [% IF ( basket.uncertainprices ) %] >+ <tr class="problem"> >+ [% ELSE %] >+ <tr> >+ [% END %] >+ <td> >+ <a name="[% supplier.booksellerid %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid %]">[% supplier.name %]</a> >+ ([% supplier.booksellerid %]) >+ [% PROCESS action supplier = supplier %] >+ </td> >+ <td>[% basket.basketno %]</td> >+ <td>[% basket.basketname %]</td> >+ <td> >+ [% basket.total_items %] >+ [% IF basket.total_items_cancelled %] >+ ([% basket.total_items_cancelled %] cancelled) >+ [% END %] >+ </td> >+ <td> >+ [% basket.total_biblios %] >+ [% IF basket.total_biblios_cancelled %] >+ ([% basket.total_biblios_cancelled %] cancelled) >+ [% END %] >+ </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 class="actions"> >+ <a class="btn btn-mini" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno %]"><i class="fa fa-eye"></i> View</a> > >- [% IF not basket.closedate and supplier.active %] >- <a class="btn btn-mini" id="addtoBasketLabel[% basket.basketno %]" href="#addtoBasket[% basket.basketno %]" role="button" data-toggle="modal"><i class="fa fa-plus"></i> 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> >+ [% IF not basket.closedate and supplier.active %] >+ <a class="btn btn-mini" id="addtoBasketLabel[% basket.basketno %]" href="#addtoBasket[% basket.basketno %]" role="button" data-toggle="modal"><i class="fa fa-plus"></i> 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> >- </div> >+ [% END %] >+ </td> >+ </tr> >+ [% END %][%# FOREACH basket IN supplier.loop_basket %] >+ [% END %] >+ </tbody> >+ </table> >+ </div> >+ [% ELSE %] >+ <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 %] >- </td> >- </tr> >- [% END %][%# FOREACH basket IN supplier.loop_basket %] >- [% END %] >- </tbody> >- </table> >+ </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 %] >+ <a class="btn btn-small" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]"><i class="icon-inbox"></i> Receive shipment</a> >+ </span> >+ </div> >+ [% END %] >+ </div> >+ [% END %] > [% ELSE %] > <p>No pending baskets</p> > [% END %][%# IF ( loop_suppliers.size ) %] > </div> > </div> >-</div> > <div class="yui-b"> > [% IF ( booksellerid ) %] > [% INCLUDE 'vendor-menu.inc' %] >-- >2.1.4
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 13371
:
34057
|
34058
|
34059
|
34167
|
34170
|
34275
|
34295
|
34296
|
34297
|
34298
|
34299
|
34306
|
34423
|
34424
|
34425
|
34433
|
34434
|
34435
|
34436
|
34437
|
34438
|
34439
|
36759
|
49014
|
49015
|
49016
|
49017
|
49018
|
49019
|
49020
|
49021
|
55235
|
55236
|
55237
|
55238
|
55239
|
55240
|
55241
|
55242
|
55243
|
55244
|
55245
|
55978
|
59312