Bugzilla – Attachment 84142 Details for
Bug 17047
Mana Knowledge Base : Data sharing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17047: QA fixes: - don't search subscriptions when mana is disabled, - subscription detail page: don't show share button or search link if Mana is disabled, - fix report sharing, - submit report search form by pressing enter, - add a waittin
Bug-17047-QA-fixes---dont-search-subscriptions-whe.patch (text/plain), 8.38 KB, created by
Alex Arnaud
on 2019-01-17 15:28:22 UTC
(
hide
)
Description:
Bug 17047: QA fixes: - don't search subscriptions when mana is disabled, - subscription detail page: don't show share button or search link if Mana is disabled, - fix report sharing, - submit report search form by pressing enter, - add a waittin
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2019-01-17 15:28:22 UTC
Size:
8.38 KB
patch
obsolete
>From 2285b1a7056c4d3cdbe0e6ea18bcb94983602929 Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Thu, 17 Jan 2019 11:35:48 +0100 >Subject: [PATCH] Bug 17047: QA fixes: - don't search subscriptions when mana > is disabled, - subscription detail page: don't show share button or search > link if Mana is disabled, - fix report sharing, - submit report search > form by pressing enter, - add a waitting mouse cursor while searching, - > keep the search form above report results table, > >--- > .../includes/mana/mana-subscription-search-result.inc | 1 + > .../intranet-tmpl/prog/en/includes/reports-toolbar.inc | 18 ++++++++++++------ > .../intranet-tmpl/prog/en/includes/serials-menu.inc | 2 +- > .../intranet-tmpl/prog/en/includes/serials-toolbar.inc | 2 +- > .../prog/en/modules/reports/guided_reports_start.tt | 8 ++++++-- > koha-tmpl/intranet-tmpl/prog/js/subscription-add.js | 6 ++++-- > reports/guided_reports.pl | 4 +++- > 7 files changed, 28 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc >index 891ce4c..4570191 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc >@@ -2,6 +2,7 @@ > [% USE Koha %] > [% USE AuthorisedValues %] > [% USE Branches %] >+[% USE raw %] > [% INCLUDE 'mana.inc' %] > <script type="text/javascript"> > //<![CDATA[ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >index 446fe7b..cc1b083 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >@@ -124,12 +124,16 @@ > <h3 id="mana_search_result_label"> Mana Search</h3> > </div> > <div> >- <form id="search_form" style="margin-left: 5%"> >- Please enter a few key words: >- <input type=text id=mana_search_field> >- <input type=button class="mana_search_button" value="Search"> >- </form> > <div class="modal-body"> >+ <fieldset> >+ <form id="mana_search_form" style="margin-left: 5%"> >+ Please enter a few key words: >+ <input type="text" id="mana_search_field"> >+ <input type="submit" class="mana_search_button" value="Search"> >+ </form> >+ </fieldset> >+ <div class="mana_result_content"> >+ </div> > </div> > </div> > </div> >@@ -158,6 +162,7 @@ > } > > function mana_search( textquery ){ >+ $(document.body).css({'cursor' : 'wait'}); > $.ajax({ > type: "POST", > url: "/cgi-bin/koha/svc/mana/search", >@@ -165,7 +170,8 @@ > dataType: "html", > }) > .done( function( result ) { >- $("#mana_search_result .modal-body").html(result); >+ $(document.body).css({'cursor' : 'default'}); >+ $("#mana_search_result .modal-body .mana_result_content").html(result); > $("#mana_search_result_label").text(_("Results from Mana Knowledge Base")); > $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{ > "sPaginationType":"four_button", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc >index 257c429..af85c11 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc >@@ -31,7 +31,7 @@ > </a> > </li> > <li><a href="/cgi-bin/koha/serials/add_fields.pl">Add subscription fields</a></li> >- [% IF Koha.Preference('Mana') %] >+ [% IF Koha.Preference('Mana') == 1 %] > <li><a href="/cgi-bin/koha/serials/serials-search.pl?mana=1">Search on Mana</a></li> > [% END %] > </ul> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >index 281af8e..e8aabde 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-toolbar.inc >@@ -7,7 +7,7 @@ > [% ELSE %] > <div class="btn-group"><a id="newsubscription" class="btn btn-default btn-sm" href="/cgi-bin/koha/serials/subscription-add.pl"><i class="fa fa-plus"></i> New subscription</a></div> > [% END %] >- [% IF Koha.Preference('Mana') and Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %] >+ [% IF Koha.Preference('Mana') == 1 and Koha.Preference('AutoShareWithMana').grep('subscription').size == 0 %] > [% IF one_language_enabled==0 or mana_id %] > <div class="btn-group"><a data-toggle="modal" data-toggle="tooltip" title="Share the subscription with other librairies. Your email address will be associated to your sharing." data-target="#mana_share_modal" class="btn btn-default btn-sm"><i class="fa fa-share-alt"></i> Share</a></div> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 50df03b..b8c4b0c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -364,7 +364,7 @@ canned reports and writing custom SQL reports.</p> > <li><span class="label">Notes: </span><div id="shared_notes"></div></li> > </div> > <div class="rows"> >- <form method="post" id="mana_share_form" action="/cgi-bin/koha/reports/guided_reports.pl?phase=Share" class="validated" > >+ <form method="post" id="mana_share_form" action="/cgi-bin/koha/reports/guided_reports.pl" class="validated" > > <input type="hidden" name="phase" value="Share"> > > [% IF (languages_loop) %] >@@ -1490,7 +1490,11 @@ canned reports and writing custom SQL reports.</p> > }); > > $('div#ManaShareButton').click(function() { >- window.location="/cgi-bin/koha/reports/guided_reports.pl?phase=Share"; >+ $("#mana_share_form").submit(); >+ }); >+ >+ $("#mana_search_form").submit(function(e){ >+ e.preventDefault(); > }); > }); > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >index da8abd1..776c9fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >@@ -507,7 +507,9 @@ function mana_use(mana_id){ > } > > $(document).ready(function() { >- mana_search(); >+ if ( mana_enabled == 1 ) { >+ mana_search(); >+ } > $("#displayexample").hide(); > $("#mana_search_result").modal("hide"); > $("#aqbooksellerid").on('keypress', function(e) { >@@ -617,7 +619,7 @@ $(document).ready(function() { > }); > $("#subscription_add_next").on("click",function(){ > if ( Check_page1() ){ >- if ( mana_enabled ) { >+ if ( mana_enabled == 1 ) { > mana_search(); > } > show_page_2(); >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 511d939..80edc2a 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -678,7 +678,9 @@ elsif ( $phase eq 'Save Report' ) { > } > > elsif ($phase eq 'Share'){ >- my $result = Koha::SharedContent::send_entity($input->param('mana_language'), $borrowernumber, scalar $input->param('reportid'), 'report'); >+ my $lang = $input->param('mana_language') || ''; >+ my $reportid = $input->param('reportid'); >+ my $result = Koha::SharedContent::send_entity($lang, $borrowernumber, $reportid, 'report'); > if ( $result ) { > print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved&manamsg=".$result->{msg}); > }else{ >-- >2.7.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 17047
:
56175
|
56176
|
56177
|
56178
|
56179
|
56180
|
56181
|
59728
|
59729
|
59931
|
61905
|
62045
|
62046
|
62047
|
62048
|
62049
|
62050
|
62051
|
62052
|
62053
|
62054
|
62075
|
62465
|
62475
|
62485
|
62540
|
62542
|
62543
|
62544
|
62545
|
62546
|
62547
|
62548
|
62549
|
62550
|
62551
|
62552
|
62553
|
62589
|
62591
|
62592
|
62593
|
62594
|
62595
|
62596
|
62597
|
62598
|
62599
|
62603
|
62604
|
62605
|
62606
|
62607
|
62768
|
63476
|
63601
|
63618
|
63619
|
63620
|
63621
|
63622
|
63623
|
64484
|
64530
|
64618
|
64619
|
64620
|
64621
|
64622
|
64623
|
64624
|
64625
|
64626
|
64627
|
64628
|
64629
|
64630
|
64631
|
64632
|
64633
|
64634
|
64635
|
64636
|
64637
|
64638
|
64639
|
64640
|
64641
|
64642
|
64643
|
64648
|
64649
|
64650
|
64651
|
64652
|
64653
|
64654
|
64706
|
64962
|
65058
|
65059
|
65060
|
65061
|
65062
|
65063
|
65064
|
65065
|
65773
|
66667
|
66668
|
66987
|
67003
|
67004
|
67005
|
67006
|
67009
|
67010
|
67011
|
67012
|
67013
|
67014
|
67015
|
67016
|
67017
|
67018
|
67019
|
67020
|
67021
|
67022
|
67023
|
69034
|
69035
|
69036
|
69037
|
69038
|
69039
|
69040
|
69041
|
69091
|
70203
|
70204
|
70205
|
70206
|
70208
|
70209
|
70210
|
70211
|
70561
|
70874
|
72660
|
72661
|
72662
|
72663
|
72664
|
72665
|
72666
|
72667
|
72668
|
72669
|
72670
|
73699
|
73737
|
73738
|
73739
|
73740
|
73741
|
73742
|
73743
|
73744
|
73745
|
73746
|
73747
|
73748
|
73975
|
73976
|
73977
|
73978
|
73979
|
73980
|
73981
|
73982
|
73983
|
73984
|
73985
|
73986
|
76673
|
76674
|
76675
|
76676
|
76677
|
76678
|
76679
|
76680
|
76681
|
76682
|
76683
|
76684
|
78215
|
78216
|
78217
|
78218
|
78219
|
78220
|
78221
|
78222
|
78223
|
78224
|
78225
|
78226
|
78227
|
78228
|
78229
|
79868
|
79869
|
79870
|
79871
|
79872
|
79874
|
79877
|
79878
|
79879
|
79880
|
79881
|
79882
|
79883
|
79884
|
79885
|
79886
|
79887
|
79888
|
79922
|
79923
|
79924
|
79925
|
79926
|
79927
|
79928
|
79929
|
79930
|
79931
|
79932
|
79933
|
79934
|
79935
|
79936
|
79937
|
79938
|
79939
|
80183
|
80184
|
80185
|
80186
|
80187
|
80188
|
80189
|
80190
|
80191
|
80192
|
80193
|
80194
|
80195
|
80196
|
80197
|
80198
|
80199
|
80200
|
80471
|
80472
|
80473
|
80907
|
80908
|
80909
|
80910
|
80911
|
80912
|
80913
|
80914
|
80915
|
80916
|
80917
|
80918
|
80919
|
80920
|
80921
|
80922
|
80923
|
80924
|
81935
|
81936
|
81937
|
81938
|
81939
|
81940
|
81941
|
81942
|
81943
|
81944
|
81945
|
81946
|
81947
|
81948
|
81949
|
81950
|
81951
|
81952
|
81968
|
83863
|
83864
|
83865
|
83866
|
83867
|
83868
|
83869
|
83870
|
83871
|
83872
|
83873
|
83874
|
83875
|
83876
|
83877
|
83878
|
83879
|
83880
|
83881
|
83892
|
83893
|
83894
|
83895
|
83896
|
83897
|
83898
|
83899
|
83900
|
83901
|
83902
|
83903
|
83904
|
83905
|
83906
|
83907
|
83908
|
83909
|
83910
|
83911
|
83912
|
84142
|
84145
|
84210
|
84260
|
84261
|
84262
|
84263
|
84264
|
84265
|
84323
|
84324
|
84325
|
84326
|
84327
|
84328
|
84329
|
84332