Bugzilla – Attachment 15609 Details for
Bug 9692
Add a checkbox to display statistical fields in basket.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add a checkbox to display statistical fields in basket.tt
0005-ShowStats.patch (text/plain), 5.61 KB, created by
Mathieu Saby
on 2013-02-22 09:44:14 UTC
(
hide
)
Description:
Add a checkbox to display statistical fields in basket.tt
Filename:
MIME Type:
Creator:
Mathieu Saby
Created:
2013-02-22 09:44:14 UTC
Size:
5.61 KB
patch
obsolete
>From d92e566a952f092e59bd51bfce1c459858ab2646 Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Fri, 22 Feb 2013 10:29:28 +0100 >Subject: [PATCH] Bug 9692: Add a checkbox to display statistical fields in basket.tt > >This patch adds a checkbox in basket.tt to display the 2 statistical fields, and rename the "Show all details" checkbox to "Show all prices" >To test : >1. open a basket, with some orders comprising some values in statistical fields >2. check/uncheck the 2 boxes "Show all prices" and "Show statistical fields" > > >--- > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 53 ++++++++++++++++---- > 1 file changed, 44 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 386d699..e22343d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -9,7 +9,7 @@ > > <script type="text/javascript"> > //<![CDATA[ >- function updateColumnsVisibility(visible) { >+ function updatePricesColumnsVisibility(visible) { > if ( visible ) { > $("table .gste, .gsti").show(); > } else { >@@ -21,13 +21,32 @@ > } > } > >+ function updateStatisticsColumnsVisibility(visible) { >+ if ( visible ) { >+ $("table .statistics").show(); >+ } else { >+ [% IF ( listincgst ) %] >+ $("table .statistics").hide(); >+ [% ELSE %] >+ $("table .statistics").hide(); >+ [% END %] >+ } >+ } >+ > $(document).ready(function() { >- $("#show_all_details").click(function(){ >- updateColumnsVisibility($(this+":checked").val()); >+ $("#show_all_prices").click(function(){ >+ updatePricesColumnsVisibility($(this+":checked").val()); > }); > >- $("#show_all_details").attr('checked', false); >- updateColumnsVisibility(false); >+ $("#show_all_prices").attr('checked', false); >+ updatePricesColumnsVisibility(false); >+ >+ $("#show_statistics").click(function(){ >+ updateStatisticsColumnsVisibility($(this+":checked").val()); >+ }); >+ >+ $("#show_statistics").attr('checked', false); >+ updateStatisticsColumnsVisibility(false); > }); > //]]> > </script> >@@ -277,9 +296,13 @@ > <div id="acqui_basket_content" class="yui-g"> > [% IF ( books_loop ) %] > <h2>Orders</h2> >- <label for="show_all_details"> >- <input type="checkbox" style="vertical-align: middle;" id="show_all_details" /> >- Show all details >+ <label for="show_all_prices"> >+ <input type="checkbox" style="vertical-align: middle;" id="show_all_prices" /> >+ Show all prices >+ </label> >+ <label for="show_statistics"> >+ <input type="checkbox" style="vertical-align: middle;" id="show_statistics" /> >+ Show statistical fields > </label> > <table id="orders"> > <thead> >@@ -295,6 +318,8 @@ > <th>GST %</th> > <th>GST</th> > <th>Fund</th> >+ <th class="statistics">Statistic 1</th> >+ <th class="statistics">Statistic 2</th> > [% IF ( active ) %] > [% UNLESS ( closedate ) %] > <th>Modify</th> >@@ -314,6 +339,8 @@ > <th/> > <th>[% foot_loo.gstvalue %]</th> > <th/> >+ <th class="statistics" /> >+ <th class="statistics" /> > [% IF ( active ) %] > [% UNLESS ( closedate ) %] > <th> </th> >@@ -331,6 +358,8 @@ > <th/> > <th>[% total_gstvalue %]</th> > <th/> >+ <th class="statistics" /> >+ <th class="statistics" /> > [% IF ( active ) %] > [% UNLESS ( closedate ) %] > <th> </th> >@@ -373,6 +402,8 @@ > <td class="number [% IF books_loo.gstgsti.search('^0') %]error[% END %]">[% books_loo.gstgsti %]</td> > <td class="number [% IF books_loo.gstvalue.search('^0') %]error[% END %]">[% books_loo.gstvalue %]</td> > <td>[% books_loo.budget_name %]</td> >+ <td class="statistics">[% books_loo.sort1 %]</td> >+ <td class="statistics">[% books_loo.sort2 %]</td> > [% IF ( active ) %] > [% UNLESS ( closedate ) %] > <td> >@@ -429,6 +460,8 @@ > <th>GST %</th> > <th>GST</th> > <th>Fund</th> >+ <th class="statistic">Statistic 1</th> >+ <th class="statistic">Statistic 2</th> > </tr> > </thead> > <tbody> >@@ -459,7 +492,9 @@ > <td class="number gsti">[% order.totalgsti %]</td> > <td class="number">[% order.gstgsti %]</td> > <td class="number">[% order.gstvalue %]</td> >- <td>[% order.budget_name %] >+ <td>[% order.budget_name %]</td> >+ <td class="statistic">[% order.sort1 %]</td> >+ <td class="statistic">[% order.sort2 %]</td> > </tr> > [% END %] > </tbody> >-- >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 9692
:
15609
|
16265
|
59202
|
59283