Bugzilla – Attachment 83867 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: Minor changes
Bug-17047-Minor-changes.patch (text/plain), 25.66 KB, created by
Alex Arnaud
on 2019-01-14 09:58:44 UTC
(
hide
)
Description:
Bug 17047: Minor changes
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2019-01-14 09:58:44 UTC
Size:
25.66 KB
patch
obsolete
>From 7a681c8b8e722b34e2efd04685929438a58f183c Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Mon, 22 May 2017 08:40:25 +0000 >Subject: [PATCH] Bug 17047: Minor changes > >- search on reports module is now also validated by pressing enter. >- AutoShare now initialized with nothing autmaticaly shared. >- To create a report you now have to click on New report => New report from Mana. >- Error messages are displayed in case of fail >- Correct the display of sql reports containing "'" >- Importing a report from Mana now opens the edit page >- You don't get message after a successful import from mana (you simply get redirected) >- Fix an error when cretaing subscription >- Fix mana search >- Correct encoding issues > >Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04) >Signed-off-by: Michal Denar <black23@gmail.com> > >Signed-off-by: Michal Denar <black23@gmail.com> >--- > Koha/SharedContent.pm | 2 +- > Koha/Subscription.pm | 1 + > .../atomicupdate/mana_03-add_mana_autoshare.sql | 2 +- > .../intranet-tmpl/prog/en/includes/calendar.inc | 2 +- > .../en/includes/mana/mana-report-search-result.inc | 2 +- > .../mana/mana-subscription-search-result.inc | 3 +- > .../prog/en/includes/reports-toolbar.inc | 141 +++++++++++++++++++++ > .../en/modules/reports/guided_reports_start.tt | 122 ++---------------- > .../prog/en/modules/serials/serials-search.tt | 2 +- > .../prog/en/modules/serials/subscription-add.tt | 1 - > .../intranet-tmpl/prog/js/subscription-add.js | 17 ++- > reports/guided_reports.pl | 1 + > serials/serials-search.pl | 3 + > serials/subscription-add.pl | 2 +- > svc/mana/share | 19 +++ > 15 files changed, 194 insertions(+), 126 deletions(-) > >diff --git a/Koha/SharedContent.pm b/Koha/SharedContent.pm >index 9bd4d09..55d10c5 100644 >--- a/Koha/SharedContent.pm >+++ b/Koha/SharedContent.pm >@@ -42,7 +42,7 @@ sub manaRequest { > > my $response = $userAgent->request($mana_request); > >- eval { $result = from_json( $response->decoded_content ); }; >+ eval { $result = from_json( $response->decoded_content, { utf8 => 1} ); }; > $result->{code} = $response->code; > if ( $@ ){ > $result->{msg} = $response->{_msg}; >diff --git a/Koha/Subscription.pm b/Koha/Subscription.pm >index b1c8d61..68122e4 100644 >--- a/Koha/Subscription.pm >+++ b/Koha/Subscription.pm >@@ -133,6 +133,7 @@ sub get_search_info { > my $self=shift; > my $searched_sub_id = shift; > my $biblio = Koha::Biblios->find( { 'biblionumber' => $searched_sub_id } ); >+ return unless $biblio; > my $biblioitem = > Koha::Biblioitems->find( { 'biblionumber' => $searched_sub_id } ); > >diff --git a/installer/data/mysql/atomicupdate/mana_03-add_mana_autoshare.sql b/installer/data/mysql/atomicupdate/mana_03-add_mana_autoshare.sql >index 353ffc1..f5cc363 100644 >--- a/installer/data/mysql/atomicupdate/mana_03-add_mana_autoshare.sql >+++ b/installer/data/mysql/atomicupdate/mana_03-add_mana_autoshare.sql >@@ -1,2 +1,2 @@ > INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES >-('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'); >+('AutoShareWithMana','','','defines datas automatically shared with mana','multiple'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index 1d06bca..9314a75 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -118,7 +118,7 @@ jQuery(function($){ > dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")], > weekHeader: _("Wk"), > dateFormat: "[% IF ( dateformat == "us" ) %]mm/dd/yy[% ELSIF ( dateformat == "metric" ) %]dd/mm/yy[% ELSIF ( dateformat == "dmydot" ) %]dd.mm.yy[% ELSE %]yy-mm-dd[% END %]", >- firstDay: [% Koha.Preference('CalendarFirstDayOfWeek') | html %], >+ firstDay: '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]', > isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %], > showMonthAfterYear: false, > yearSuffix: ''}; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc >index 455f453..2de9fea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc >@@ -30,7 +30,7 @@ > [% END %] > <input hidden class="rowid" value="[% report.id %]"> > <td>[% IF ( report.report_name ) %][% report.report_name %][% END %]</td> >- <td title="[% report.savedsql %]"><div> >+ <td title="[% report.savedsql |html %]"><div> > [% IF report.notes.length > 200 %] > [% report.notes.substr(0,200) %]<a class="showbutton">Show More</a></div><div hidden> > [% END %] >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 35f666f..e269237 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 >@@ -4,7 +4,6 @@ > [% USE Branches %] > > >- > [% IF statuscode == "200" %] > <table id="mana_results_datatable" width=100%> > <thead> >@@ -62,7 +61,7 @@ > </tbody> > </table> > [% ELSE %] >- <h4> [% msg %] statuscode: [% statuscode %] </h4> >+ <h4>Mana search fails with the code: [% statuscode %] </h4> > [% END %] > > <div id="comment_box" class="modal" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label" style="display: none;"> >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 83ad6af..1b0618d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc >@@ -6,6 +6,9 @@ > <ul class="dropdown-menu"> > <li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li> > <li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li> >+ [% IF Koha.Preference('Mana')==1 %] >+ <li id="newsql"><a href="" data-toggle="modal" data-target="#mana_search_result">New SQL from Mana</a> </li> >+ [% END %] > </ul> > </div> > [% END %] >@@ -77,3 +80,141 @@ > > [% END %] > </div> >+ >+[% IF Koha.Preference('Mana')==1 %] >+ <div id="mana_search_result" class="modal fade container-fluid" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label" style="width: 100%; left:0%; margin-left: auto; display: none;"> >+ <div class="modal-dialog modal-lg"> >+ <div class="modal-content"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <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"> >+ </div> >+ </div> >+ </div> >+ </div> >+ </div> >+[% END %] >+ >+<script type="text/javascript"> >+ $(document).ready( function(){ >+ $(".mana_search_button").on("click",function(){ >+ mana_search($("#mana_search_field").val()); >+ }); >+ }); >+ >+ $('#search_form').on( "submit", function(event) { >+ event.preventDefault(); >+ mana_search($(this).children("#mana_search_field").val()); >+ }); >+ >+ function mana_increment(mana_id, resourcename, fieldvalue, stepvalue = 1){ >+ $.ajax( { >+ type: "POST", >+ url: "/cgi-bin/koha/svc/mana/addvaluetofield", >+ data: {id: mana_id, field: fieldvalue, resource: resourcename, step: stepvalue}, >+ datatype: "json", >+ }).done( function() { >+ }).fail( function(){ alert("") }); >+ } >+ >+ function mana_use( mana_id ){ >+ $.ajax( { >+ type:"POST", >+ url: "/cgi-bin/koha/svc/mana/use", >+ data: {id:mana_id, resource: 'report', saveinbase: 1}, >+ dataType: "json", >+ }) >+ .done( function (result){ >+ if ( result.errmsg ){ >+ alert( result.errmsg ); >+ } >+ else{ >+ window.location = ("/cgi-bin/koha/reports/guided_reports.pl?reports=").concat(result.id).concat("&phase=Show%20SQL&mana_success=1&phase=Edit%20SQL"); >+ } >+ }) >+ .fail( function ( foo, msg, longmsg, bla ){ >+ }); >+ } >+ >+ function mana_search( textquery ){ >+ $.ajax({ >+ type: "POST", >+ url: "/cgi-bin/koha/svc/mana/search", >+ data: {biblionumber: $("#biblionumber").val(), resource: 'report', id: textquery, usecomments: 1}, >+ dataType: "html", >+ }) >+ .done( function( result ) { >+ $("#mana_search_result .modal-body").html(result); >+ $("#mana_search_result_label").text("Results from Mana Knowledge Base"); >+ $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{ >+ "sPaginationType":"four_button", >+ "autoWidth": false, >+ "columnDefs": [ >+ { "width": "35%", "targets": 1 } >+ ], >+ "aoColumnDefs": [ >+ { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >+ { "sType": "title-string", "aTargets" : [ "title-string" ] }, >+ { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] } >+ ] >+ })); >+ if($("td.dataTables_empty").length == 0){ >+ $("#mana_search").show(); >+ } >+ >+ $( "select[class='actionreport1']" ).show(); >+ $( "button[class='actionreport2']" ).hide(); >+ $("#CommentButton").on("click", function(){ >+ var resource_type = "report"; >+ var target_id = $("#selected_id").val(); >+ var manamsg = $("#manamsg").val(); >+ mana_comment(target_id, manamsg, resource_type); >+ $("#comment_box").modal("hide"); >+ }); >+ >+ $(".showbutton").on("click", function(){ >+ $(this).parent().hide(); >+ $(this).parent().next().show(); >+ }); >+ >+ $("a[class='hidebutton']").on("click", function(){ >+ $(this).parent().hide(); >+ $(this).parent().prev().show(); >+ }); >+ >+ $("#commentCloseButton").on("click", function(){ >+ $("#comment_box").modal("hide"); >+ }); >+ >+ $(".actionreport1").on("click", function(){ >+ $("#selectedcomment").val($(this).val()); >+ $(this).parent("select").hide(); >+ $(this).parent("select").next().show(); >+ }); >+ >+ $(".actionreport2").on("click", function(){ >+ $(this).hide(); >+ $(this).prev().show(); >+ mana_increment($("#selectedcomment").val(), 'resource_comment', 'nb', -1); >+ }); >+ }).fail( function( result ){ >+ }); >+ } >+ >+ function mana_comment( target_id, manamsg, resource_type ){ >+ $.ajax( { >+ type: "POST", >+ url: "/cgi-bin/koha/svc/mana/share", >+ data: {message: manamsg, resource: resource_type , resource_id: target_id}, >+ datatype: "json", >+ }) >+ } >+</script> >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 17a64d1..ea27410 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 >@@ -155,6 +155,13 @@ canned reports and writing custom SQL reports.</p> > </div> > </div> > >+[% IF report_converted %] >+ <div class="dialog message"> >+ The report "[% report_converted %]" has been converted. >+ </div> >+[% END %] >+ >+ > [% IF ( saved1 ) %] > [% IF ( savedreports ) %]<h1>Saved reports</h1> > >@@ -196,14 +203,8 @@ canned reports and writing custom SQL reports.</p> > </div> > [% END %] > >- [% IF (Koha.Preference('Mana') == 1) %] >- <div id="mana_search" class="dialog message"> >- <p> You want more reports? Check the Mana Knowledge Base <p> <a style="cursor:pointer" data-toggle="modal" data-target="#mana_search_result">Quick Search</a></p> >- </div> >- [% END %] >- > </script> >-<h1> [% savedreport.sql %]</h1> >+ > <form action="/cgi-bin/koha/reports/guided_reports.pl" id="reports_form" method="post"> > <input type="hidden" name="phase" value="Delete Multiple" /> > <table id="table_reports"> >@@ -243,7 +244,7 @@ canned reports and writing custom SQL reports.</p> > [% IF ( CAN_user_reports_delete_reports ) %] <!-- not break CSS --> > <input type="checkbox" name="ids" value="[% savedreport.id | html %]" /> > [% END %] >- <input hidden class="report_sql" value="[% savedreport.savedsql %]"> >+ <input hidden class="report_sql" value="[% savedreport.savedsql |html %]"> > </td> > <td class="report_id"><label for="ids">[% savedreport.id | html %]</label></td> > <td class="report_name"> >@@ -1300,10 +1301,6 @@ canned reports and writing custom SQL reports.</p> > window.history.back(); > }); > >- $(".mana_search_button").on("click",function(){ >- mana_search($(this).prev().val()); >- }); >- > $(".ShareButton").on("click", function(){ > if($(this).closest("tr").find(".report_notes").text().length < 20 || $(this).closest("tr").find(".report_name").text().length < 20){ > $("#shared_infos").hide(); >@@ -1320,10 +1317,6 @@ canned reports and writing custom SQL reports.</p> > } > }); > >- $('#search_form').submit(function () { >- return false; >- }); >- > $("#addColumn").on("click",function(){ > addColumn(); > }); >@@ -1515,103 +1508,6 @@ canned reports and writing custom SQL reports.</p> > return confirmDelete(MSG_CONFIRM_DELETE); > }); > }); >- function mana_increment(mana_id, resourcename, fieldvalue, stepvalue = 1){ >- $.ajax( { >- type: "POST", >- url: "/cgi-bin/koha/svc/mana/addvaluetofield", >- data: {id: mana_id, field: fieldvalue, resource: resourcename, step: stepvalue}, >- datatype: "json", >- }).done( function() { >- }).fail( function(){ }); >- } >- >- function mana_use( mana_id ){ >- $.ajax( { >- type:"POST", >- url: "/cgi-bin/koha/svc/mana/use", >- data: {id:mana_id, resource: 'report', saveinbase: 1}, >- dataType: "json", >- }) >- .done( function (result){ >- window.location = ("/cgi-bin/koha/reports/guided_reports.pl?reports=").concat(result.id).concat("&phase=Show%20SQL"); >- }) >- .fail( function ( foo, msg, longmsg){ >- }); >- } >- >- function mana_search( textquery ){ >- $.ajax({ >- type: "POST", >- url: "/cgi-bin/koha/svc/mana/search", >- data: {biblionumber: $("#biblionumber").val(), resource: 'report', id: textquery, usecomments: 1}, >- dataType: "html", >- }) >- .done( function( result ) { >- $("#mana_search_result .modal-body").html(result); >- $("#mana_search_result_label").text("Results from Mana Knowledge Base"); >- $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{ >- "sPaginationType":"four_button", >- "autoWidth": false, >- "columnDefs": [ >- { "width": "35%", "targets": 1 } >- ], >- "aoColumnDefs": [ >- { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, >- { "sType": "title-string", "aTargets" : [ "title-string" ] }, >- { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] } >- ] >- })); >- if($("td.dataTables_empty").length == 0){ >- $("#mana_search").show(); >- } >- >- $( "select[class='actionreport1']" ).show(); >- $( "button[class='actionreport2']" ).hide(); >- $("#CommentButton").on("click", function(){ >- var resource_type = "report"; >- var target_id = $("#selected_id").val(); >- var manamsg = $("#manamsg").val(); >- mana_comment(target_id, manamsg, resource_type); >- $("#comment_box").modal("hide"); >- }); >- >- $(".showbutton").on("click", function(){ >- $(this).parent().hide(); >- $(this).parent().next().show(); >- }); >- >- $("a[class='hidebutton']").on("click", function(){ >- $(this).parent().hide(); >- $(this).parent().prev().show(); >- }); >- >- $("#commentCloseButton").on("click", function(){ >- $("#comment_box").modal("hide"); >- }); >- >- $(".actionreport1").on("click", function(){ >- $("#selectedcomment").val($(this).val()); >- $(this).parent("select").hide(); >- $(this).parent("select").next().show(); >- }); >- >- $(".actionreport2").on("click", function(){ >- $(this).hide(); >- $(this).prev().show(); >- mana_increment($("#selectedcomment").val(), 'resource_comment', 'nb', -1); >- }); >- }).fail( function( result ){ >- }); >- } >- >- function mana_comment( target_id, manamsg, resource_type ){ >- $.ajax( { >- type: "POST", >- url: "/cgi-bin/koha/svc/mana/share", >- data: {message: manamsg, resource: resource_type , resource_id: target_id}, >- datatype: "json", >- }) >- } > > function addColumn() { > $("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected"); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >index 1886094..00dd542 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt >@@ -297,7 +297,7 @@ > </ul> > [% IF mana %] > <div id="mana"> >- [% INCLUDE 'mana-subscription-search-result.inc' %] >+ [% INCLUDE 'mana/mana-subscription-search-result.inc' %] > </div> > [% ELSE %] > <div id="opened"> >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 ed1a2e3..147809e 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 >@@ -223,7 +223,6 @@ width: 300px; /* not enough for IE7 apparently */ > [% END %] > > <div hidden id="mana_search" class="dialog message"> >- <p>Subscription found on Mana Knowledge Base:</p><p> <a style="cursor:pointer" data-toggle="modal" data-target="#mana_search_result">Quick fill</a></p> > </div> > <div id="subscription_form_planning"> > <fieldset class="rows"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >index 4a091f2..3e75ffe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/subscription-add.js >@@ -393,6 +393,9 @@ function show_page_2() { > } > > function mana_search() { >+ $("#mana_search").html("<p>Mana kb is being asked for your subscription..</p>"); >+ $("#mana_search").show(); >+ > $.ajax({ > type: "POST", > url: "/cgi-bin/koha/svc/mana/search", >@@ -416,8 +419,15 @@ function mana_search() { > ] > })); > if( $("#mana_results_datatable").length && $("td.dataTables_empty").length == 0){ >- $("#mana_search").show(); >+ $("#mana_search").html("<p>Subscription found on Mana Knowledge Base:</p><p> <a style='cursor:pointer' data-toggle='modal' data-target='#mana_search_result'>Quick fill</a></p>"); >+ } >+ else if ( $("#mana_results_datatable").length ){ >+ $("#mana_search").html("<p>No subscription found on Mana Knowledge Base :(</p><p> Please feel free to share you pattern with all others librarians once you are done</p>"); > } >+ else{ >+ $("#mana_search").html( result ); >+ } >+ $("#mana_search").show(); > $( "select[class='actionreport1']" ).show(); > $( "button[class='actionreport2']" ).hide(); > >@@ -446,6 +456,8 @@ function mana_search() { > }); > > }).fail(function(result){ >+ console.log( msg ); >+ console.log( longmsg ); > }); > } > >@@ -548,9 +560,6 @@ function removeDisabledAttr() { > > $(document).ready(function() { > mana_search(); >- $("#myid").on("click", function(){ >- debugger; >- }) > $("#displayexample").hide(); > $("#mana_search_result").modal("hide"); > $("#aqbooksellerid").on('keypress', function(e) { >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index 89a5771..dd698d4 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -182,6 +182,7 @@ elsif ( $phase eq 'Show SQL'){ > 'notes' => $report->notes, > 'sql' => $report->savedsql, > 'showsql' => 1, >+ 'mana_success' => $input->param('mana_success'), > ); > } > >diff --git a/serials/serials-search.pl b/serials/serials-search.pl >index d6cb85c..d213c92 100755 >--- a/serials/serials-search.pl >+++ b/serials/serials-search.pl >@@ -96,6 +96,7 @@ for my $field ( @$additional_fields ) { > > my $expiration_date_dt = $expiration_date ? dt_from_string( $expiration_date ) : undef; > my @subscriptions; >+my $mana_statuscode; > if ($searched){ > if ($mana) { > my $result = Koha::SharedContent::manaGetRequest("subscription",{ >@@ -104,6 +105,7 @@ if ($searched){ > ean => $EAN, > publisher => $publisher > }); >+ $mana_statuscode = $result->{code}; > @subscriptions = @{ $result->{data} }; > } > else { >@@ -127,6 +129,7 @@ if ($searched){ > if ($mana) { > $template->param( > subscriptions => \@subscriptions, >+ statuscode => $mana_statuscode, > total => scalar @subscriptions, > title_filter => $title, > ISSN_filter => $ISSN, >diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl >index 23cce01..87006ba 100755 >--- a/serials/subscription-add.pl >+++ b/serials/subscription-add.pl >@@ -307,7 +307,7 @@ sub manage_subscription_numbering_pattern_id { > return $existing->id; > } > >- $params->{label} = Koha::Subscription::Numberpattern->uniqueLabel($query->param('patternname')); >+ $params->{label} = Koha::Subscription::Numberpatterns->uniqueLabel($query->param('patternname')); > $params->{description} = $query->param('sndescription'); > > >diff --git a/svc/mana/share b/svc/mana/share >index a294bd0..47db3e1 100755 >--- a/svc/mana/share >+++ b/svc/mana/share >@@ -45,3 +45,22 @@ $content->{resource_id} = $input->param("resource_id"); > $content->{resource_type} = $input->param("resource"); > $content->{message} = $input->param("message"); > Koha::SharedContent::manaPostRequest('resource_comment', $content); >+ my $package = "Koha::".ucfirst($input->param('resource')); >+ my $resource; >+ my $result; >+eval{ >+ $result = Koha::SharedContent::manaGetRequestWithId($input->param('resource'), $input->param('id') ); >+}; >+if ( $@ or $result->{code} == 500 ){ >+ $resource->{errmsg} = "Error: mana access got broken, please try again later\n\n ( error: $@ )"; >+} >+else{ >+ if ( $input->param( 'saveinbase' )) { >+ $resource = { id => $package->new_from_mana($result->{data})->id }; >+ } >+ else{ >+ $resource = $result->{data}; >+ } >+} >+ >+print(to_json($resource)); >-- >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