Bugzilla – Attachment 27847 Details for
Bug 7180
Order from staged file improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10875: Add order from a staged file should not display inactive funds
Bug-10875-Add-order-from-a-staged-file-should-not-.patch (text/plain), 7.25 KB, created by
Jonathan Druart
on 2014-05-01 07:22:23 UTC
(
hide
)
Description:
Bug 10875: Add order from a staged file should not display inactive funds
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-05-01 07:22:23 UTC
Size:
7.25 KB
patch
obsolete
>From 8027aed2d9d5bad431b0051814161de9fe2faf42 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 11 Sep 2013 10:01:34 +0200 >Subject: [PATCH] Bug 10875: Add order from a staged file should not display > inactive funds > >When adding an order from a staged file, a link "show all funds" is now >added on the top of the page. >All inactive funds are hidden by default. > >http://bugs.koha-community.org/show_bug.cgi?id=7180 >--- > acqui/addorderiso2709.pl | 5 +++ > .../prog/en/modules/acqui/addorderiso2709.tt | 40 +++++++++++++++++--- > 2 files changed, 39 insertions(+), 6 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index f3c124e..5f174f4 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -306,9 +306,14 @@ foreach my $r ( @{$budgets_hierarchy} ) { > b_txt => $r->{budget_name}, > b_sort1_authcat => $r->{'sort1_authcat'}, > b_sort2_authcat => $r->{'sort2_authcat'}, >+ b_active => $r->{budget_period_active}, > b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0, > }; > } >+ >+@{$budget_loop} = >+ sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop}; >+ > $template->param( budget_loop => $budget_loop,); > > my $CGIsort1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index e800a6f..3c49456 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -26,6 +26,29 @@ > "aaSorting": [] > } ) ); > >+ //keep a copy of all budgets before removing the inactives >+ disabledBudgetsCopy = $("select[name='all_budget_id']").html(); >+ $("select[name='all_budget_id'] .b_inactive").remove(); >+ $("select[name='budget_id'] .b_inactive").remove(); >+ >+ $("#showallbudgets").click(function() { >+ if ($(this).is(":checked")) { >+ $("select[name='budget_id']").html(disabledBudgetsCopy); //Puts back all the funds >+ } >+ else { >+ $("select[name='budget_id'] .b_inactive").remove(); >+ } >+ }); >+ >+ $("#all_showallbudgets").click(function() { >+ if ($(this).is(":checked")) { >+ $("select[name='all_budget_id']").html(disabledBudgetsCopy); //Puts back all the funds >+ } >+ else { >+ $("select[name='all_budget_id'] .b_inactive").remove(); >+ } >+ }); >+ > $("select[name='budget_id']").change(function(){ > var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); > var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); >@@ -150,6 +173,8 @@ > <div id="records_to_import"> > <span class="checkall"><a id="checkAll" href="#">Check all</a></span> > <span class="uncheckall"><a id="unCheckAll" href="#">Uncheck all</a></span> >+ <label for="showallbudgets" style="float:none;width:auto;"> Show all funds:</label> >+ <input type="checkbox" id="showallbudgets" /> > <input type="hidden" name="op" value="import_records"/> > <input type="hidden" name="basketno" value="[% basketno %]" /> > <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >@@ -207,12 +232,14 @@ > <input type="hidden" size="20" name="budget_id" value="[% budget_id %]" />[% Budget_name %] > [% ELSE %] > <select id="fund_record_[% biblio.import_record_id %]" size="1" name="budget_id"> >- <option value=""></option> >+ <option value="">Select a fund</option> > [% FOREACH budget IN budget_loop %] > [% IF ( budget.b_id == biblio.budget_id ) %] > <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]" selected="selected">[% budget.b_txt %]</option> > [% ELSE %] >- <option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> >+ [% IF budget.b_active %]<option value="[% budget.b_id %]" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> >+ [% ELSE %]<option value="[% budget.b_id %]" class="b_inactive" data-sort1-authcat="[% budget.b_sort1_authcat %]" data-sort2-authcat="[% budget.b_sort2_authcat %]">[% budget.b_txt %]</option> >+ [% END %] > [% END %] > [% END %] > </select> >@@ -297,14 +324,15 @@ > <li> > <label for="all_budget_id">Fund: </label> > <select id="all_budget_id" size="1" name="all_budget_id"> >+ <option value="">Select a fund</option> > [% FOREACH budget_loo IN budget_loop %] >- [% IF ( budget_loo.b_sel ) %] >- <option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]" selected="selected">[% budget_loo.b_txt %]</option> >- [% ELSE %] >- <option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option> >+ [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option> >+ [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive" data-sort1-authcat="[% budget_loo.b_sort1_authcat %]" data-sort2-authcat="[% budget_loo.b_sort2_authcat %]">[% budget_loo.b_txt %]</option> > [% END %] > [% END %] > </select> >+ <label for="all_showallbudgets" style="float:none;width:auto;"> Show all:</label> >+ <input type="checkbox" id="all_showallbudgets" /> > </li> > [% END %] > </li> >-- >1.7.10.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 7180
:
6234
|
13019
|
15023
|
15048
|
15617
|
15677
|
15934
|
15935
|
16014
|
16505
|
16511
|
16544
|
16566
|
16613
|
19066
|
19067
|
19068
|
19316
|
19587
|
19588
|
19589
|
19590
|
19641
|
19645
|
20900
|
20901
|
20902
|
20903
|
20904
|
20926
|
20933
|
20934
|
20935
|
20978
|
20979
|
21004
|
21014
|
21017
|
21117
|
21462
|
21463
|
21464
|
21465
|
21466
|
21467
|
21468
|
21469
|
21470
|
21471
|
21472
|
21473
|
21474
|
21514
|
22546
|
22547
|
22548
|
22549
|
22550
|
22551
|
22552
|
22553
|
22554
|
22555
|
22556
|
22557
|
22558
|
22559
|
24052
|
24053
|
24054
|
24055
|
24056
|
24057
|
24058
|
24059
|
24060
|
24061
|
24062
|
24063
|
24064
|
24065
|
24636
|
24637
|
24638
|
24639
|
24640
|
24641
|
24642
|
24643
|
24644
|
24645
|
24646
|
24647
|
24648
|
24649
|
24708
|
24709
|
24710
|
24711
|
24712
|
24713
|
24714
|
24715
|
24716
|
24717
|
24718
|
24719
|
24720
|
24721
|
25908
|
26950
|
26951
|
26952
|
26953
|
26954
|
26955
|
26956
|
26957
|
26958
|
26959
|
26960
|
26961
|
26962
|
26963
|
26964
|
27128
|
27131
|
27136
|
27160
|
27325
|
27408
|
27409
|
27410
|
27411
|
27412
|
27413
|
27414
|
27415
|
27416
|
27417
|
27418
|
27419
|
27420
|
27421
|
27422
|
27423
|
27424
|
27451
|
27520
|
27561
|
27562
|
27563
|
27564
|
27565
|
27566
|
27567
|
27568
|
27569
|
27570
|
27571
|
27572
|
27573
|
27574
|
27575
|
27576
|
27577
|
27578
|
27829
|
27830
|
27831
|
27832
|
27833
|
27834
|
27835
|
27836
|
27837
|
27838
|
27839
|
27840
|
27841
|
27842
|
27843
|
27844
|
27845
|
27846
|
27847
|
27848
|
27849
|
27850
|
27851
|
27852
|
27853
|
27854
|
27855
|
27856
|
27857
|
27858
|
27859
|
27860
|
27861
|
27862
|
27863
|
27864
|
27865
|
27866