Bugzilla – Attachment 84210 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: (follow-up) Improve mana messages, enable by default, show messages if not configured
Bug-17047-follow-up-Improve-mana-messages-enable-b.patch (text/plain), 8.34 KB, created by
Nick Clemens (kidclamp)
on 2019-01-18 19:10:40 UTC
(
hide
)
Description:
Bug 17047: (follow-up) Improve mana messages, enable by default, show messages if not configured
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-01-18 19:10:40 UTC
Size:
8.34 KB
patch
obsolete
>From 0be09dba6178dda45a7489151bceb389e13521d4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 18 Jan 2019 19:09:22 +0000 >Subject: [PATCH] Bug 17047: (follow-up) Improve mana messages, enable by > default, show messages if not configured > >--- > admin/admin-home.pl | 2 ++ > .../data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql | 2 +- > installer/data/mysql/sysprefs.sql | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 12 ++++++++---- > .../prog/en/modules/serials/subscription-add.tt | 9 ++++----- > serials/subscription-add.pl | 3 +++ > 6 files changed, 19 insertions(+), 11 deletions(-) > >diff --git a/admin/admin-home.pl b/admin/admin-home.pl >index ae16bf6680..f6a7b23ac1 100755 >--- a/admin/admin-home.pl >+++ b/admin/admin-home.pl >@@ -25,6 +25,7 @@ use Koha::Plugins; > my $query = new CGI; > > my $plugins_enabled = C4::Context->preference('UseKohaPlugins') && C4::Context->config("enable_plugins"); >+my $mana_url = C4::Context->config('mana_config'); > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { >@@ -38,5 +39,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > ); > > $template->param( plugins_enabled => $plugins_enabled, ); >+$template->param( mana_url => $mana_url, ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql b/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql >index 9fccb5c131..66725aa973 100644 >--- a/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql >+++ b/installer/data/mysql/atomicupdate/mana_02-add_Mana_syspref.sql >@@ -1,2 +1,2 @@ > INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >-('Mana','0',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'); >+('Mana','1',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 634e57830b..bc012d370f 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -275,7 +275,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('LocalHoldsPriorityItemControl', 'holdingbranch', 'holdingbranch|homebranch', 'decides if the feature operates using the item''s home or holding library.', 'Choice'), > ('LocalHoldsPriorityPatronControl', 'PickupLibrary', 'HomeLibrary|PickupLibrary', 'decides if the feature operates using the library set as the patron''s home library, or the library set as the pickup library for the given hold.', 'Choice'), > ('makePreviousSerialAvailable','0','','make previous serial automatically available when collecting a new serial. Please note that the item-level_itypes syspref must be set to specific item.','YesNo'), >-('Mana','0',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'), >+('Mana','1',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','YesNo'), > ('ManInvInNoissuesCharge','1',NULL,'MANUAL_INV charges block checkouts (added to noissuescharge).','YesNo'), > ('MARCAuthorityControlField008','|| aca||aabn | a|a d',NULL,'Define the contents of MARC21 authority control field 008 position 06-39','Textarea'), > ('MarcFieldDocURL', NULL, NULL, 'URL used for MARC field documentation. Following substitutions are available: {MARC} = marc flavour, eg. "MARC21" or "UNIMARC". {FIELD} = field number, eg. "000" or "048". {LANG} = user language, eg. "en" or "fi-FI"', 'free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >index 6212e30e7a..2cc41d5b8e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt >@@ -13,10 +13,14 @@ > <div class="main container-fluid"> > <div class="row"> > <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2"> >- [% IF ( Koha.Preference('Mana') == 2) %] >- <div class="dialog alert"> >- <p><center> You haven't decided if you want to activate Mana Knowlede Base, please let us know by clicking<center></p> >- <a href=/cgi-bin/koha/admin/share_content.pl><center>Here</center></a> >+ [% IF ( Koha.Preference('Mana') == 1) && !mana_url %] >+ <div class="dialog message"> >+ <p><center>The Mana Knowledge Base feature is enabled but not configured.</center></p> >+ <p>This feature allows you to retrieve and share data (subscription patterns and reports) with other Koha libaries.</p> >+ <p> >+ Ask your system administrator to configure this feature, or remove this note by disabling the 'Mana' system preference >+ <a href=/cgi-bin/koha/admin/share_content.pl>here.</a> >+ </p> > </div> > [% END %] > <h1>Koha administration</h1> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 77db9bdca9..2d00bb0cd0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -214,11 +214,10 @@ width: 300px; /* not enough for IE7 apparently */ > > <div id="page_2"> > <div class="col-md-6"> >- [% IF ( Koha.Preference('Mana') == 2) %] >+ [% IF ( Koha.Preference('Mana') == 1) && !mana_url %] > <fieldset> >- <p><center>You haven't activated the Mana Knowledge Base, click >- <a href=/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=request+to+mana+webservice>here</a> >- to configure.</center></p> >+ <p><center>The Mana Knowledge Base can be used to import subscription patterns submitted by other libraries and save you extra work. Ask your system administrator to configure this service and complete the configuration, or remove this message by disabling the system preference >+ <a href=/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=request+to+mana+webservice>here</a></center></p> > </fieldset> > [% END %] > >@@ -529,7 +528,7 @@ width: 300px; /* not enough for IE7 apparently */ > [% FOREACH field IN dont_export_field_loop %] > tags.push("[% field.fieldid | html %]"); > [% END %] >- var mana_enabled = [% Koha.Preference('Mana') | html %] >+ var mana_enabled = [% IF (Koha.Preference('Mana') && mana_url) %]1[% ELSE %]0[% END %]; > var MSG_LINK_TO_VENDOR = _("If you wish to claim late or missing issues you must link this subscription to a vendor. Click OK to ignore or Cancel to return and enter a vendor"); > var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record"); > var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date."); >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 491f9fbcef..31198c6518 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -68,6 +68,9 @@ my $sub_on; > my $subs; > our $firstissuedate; > >+my $mana_url = C4::Context->config('mana_config'); >+$template->param( 'mana_url' => $mana_url ); >+ > if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { > > my $subscriptionid = $query->param('subscriptionid'); >-- >2.11.0
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