View | Details | Raw Unified | Return to bug 17047
Collapse All | Expand All

(-)a/Koha/SharedContent.pm (-1 / +1 lines)
Lines 42-48 sub manaRequest { Link Here
42
42
43
    my $response  = $userAgent->request($mana_request);
43
    my $response  = $userAgent->request($mana_request);
44
44
45
    eval { $result = from_json( $response->decoded_content ); };
45
    eval { $result = from_json( $response->decoded_content, { utf8 => 1} ); };
46
    $result->{code} = $response->code;
46
    $result->{code} = $response->code;
47
    if ( $@ ){
47
    if ( $@ ){
48
        $result->{msg} = $response->{_msg};
48
        $result->{msg} = $response->{_msg};
(-)a/Koha/Subscription.pm (+1 lines)
Lines 61-66 sub get_search_info { Link Here
61
    my $self=shift;
61
    my $self=shift;
62
    my $searched_sub_id = shift;
62
    my $searched_sub_id = shift;
63
    my $biblio = Koha::Biblios->find( { 'biblionumber' => $searched_sub_id } );
63
    my $biblio = Koha::Biblios->find( { 'biblionumber' => $searched_sub_id } );
64
    return unless $biblio;
64
    my $biblioitem =
65
    my $biblioitem =
65
      Koha::Biblioitems->find( { 'biblionumber' => $searched_sub_id } );
66
      Koha::Biblioitems->find( { 'biblionumber' => $searched_sub_id } );
66
67
(-)a/installer/data/mysql/atomicupdate/mana_03-add_mana_autoshare.sql (-1 / +1 lines)
Lines 1-2 Link Here
1
INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
1
INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
2
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple');
2
('AutoShareWithMana','','','defines datas automatically shared with mana','multiple');
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-1 / +1 lines)
Lines 118-124 jQuery(function($){ Link Here
118
        dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")],
118
        dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")],
119
        weekHeader: _("Wk"),
119
        weekHeader: _("Wk"),
120
        dateFormat: "[% IF ( dateformat == "us" ) %]mm/dd/yy[% ELSIF ( dateformat == "metric" ) %]dd/mm/yy[% ELSIF ( dateformat == "dmydot" ) %]dd.mm.yy[% ELSE %]yy-mm-dd[% END %]",
120
        dateFormat: "[% IF ( dateformat == "us" ) %]mm/dd/yy[% ELSIF ( dateformat == "metric" ) %]dd/mm/yy[% ELSIF ( dateformat == "dmydot" ) %]dd.mm.yy[% ELSE %]yy-mm-dd[% END %]",
121
        firstDay: [% Koha.Preference('CalendarFirstDayOfWeek') %],
121
        firstDay: '[% Koha.Preference('CalendarFirstDayOfWeek') %]',
122
        isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
122
        isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
123
        showMonthAfterYear: false,
123
        showMonthAfterYear: false,
124
        yearSuffix: ''};
124
        yearSuffix: ''};
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-report-search-result.inc (-1 / +1 lines)
Lines 30-36 Link Here
30
                    [% END %]
30
                    [% END %]
31
                    <input hidden class="rowid" value="[% report.id %]">
31
                    <input hidden class="rowid" value="[% report.id %]">
32
                    <td>[% IF ( report.report_name ) %][% report.report_name %][% END %]</td>
32
                    <td>[% IF ( report.report_name ) %][% report.report_name %][% END %]</td>
33
                    <td title="[% report.savedsql %]"><div>
33
                    <td title="[% report.savedsql |html %]"><div>
34
                        [% IF report.notes.length > 200 %]
34
                        [% IF report.notes.length > 200 %]
35
                            [% report.notes.substr(0,200) %]<a class="showbutton">Show More</a></div><div hidden>
35
                            [% report.notes.substr(0,200) %]<a class="showbutton">Show More</a></div><div hidden>
36
                        [% END %]
36
                        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc (-2 / +1 lines)
Lines 4-10 Link Here
4
[% USE Branches %]
4
[% USE Branches %]
5
5
6
6
7
8
[% IF statuscode == "200" %]
7
[% IF statuscode == "200" %]
9
    <table id="mana_results_datatable" width=100%>
8
    <table id="mana_results_datatable" width=100%>
10
        <thead>
9
        <thead>
Lines 62-68 Link Here
62
        </tbody>
61
        </tbody>
63
    </table>
62
    </table>
64
[% ELSE %]
63
[% ELSE %]
65
    <h4> [% msg %] statuscode: [% statuscode %] </h4>
64
    <h4>Mana search fails with the code: [% statuscode %] </h4>
66
[% END %]
65
[% END %]
67
66
68
<div id="comment_box" class="modal" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label" style="display: none;">
67
<div id="comment_box" class="modal" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label" style="display: none;">
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-1 / +147 lines)
Lines 5-10 Link Here
5
            <ul class="dropdown-menu">
5
            <ul class="dropdown-menu">
6
                <li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li>
6
                <li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li>
7
                <li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li>
7
                <li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li>
8
                [% IF Koha.Preference('Mana')==1 %]
9
                <li id="newsql"><a href="" data-toggle="modal" data-target="#mana_search_result">New SQL from Mana</a> </li>
10
                [% END %]
8
            </ul>
11
            </ul>
9
        </div>
12
        </div>
10
    [% END %]
13
    [% END %]
Lines 64-75 Link Here
64
    [% END %]
67
    [% END %]
65
</div>
68
</div>
66
69
70
71
[% IF Koha.Preference('Mana')==1 %]
72
    <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;">
73
        <div class="modal-dialog modal-lg">
74
            <div class="modal-content">
75
                <div class="modal-header">
76
                    <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
77
                    <h3 id="mana_search_result_label"> Mana Search</h3>
78
                </div>
79
                <div>
80
                    <form id="search_form" style="margin-left: 5%">
81
                        Please enter a few key words:
82
                        <input type=text id=mana_search_field>
83
                        <input type=button class="mana_search_button" value="Search">
84
                    </form>
85
                    <div class="modal-body">
86
                    </div>
87
                </div>
88
            </div>
89
        </div>
90
    </div>
91
[% END %]
92
93
94
67
<script type="text/javascript">
95
<script type="text/javascript">
68
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this report? This cannot be undone.");
96
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this report? This cannot be undone.");
69
70
$(document).ready(function(){
97
$(document).ready(function(){
71
    $(".delete").on("click",function(){
98
    $(".delete").on("click",function(){
72
        return confirmDelete(MSG_CONFIRM_DELETE);
99
        return confirmDelete(MSG_CONFIRM_DELETE);
73
    });
100
    });
74
});
101
});
75
</script>
102
</script>
103
104
<script type="text/javascript">
105
    $(document).ready( function(){
106
        $(".mana_search_button").on("click",function(){
107
            mana_search($("#mana_search_field").val());
108
        });
109
    });
110
111
    $('#search_form').on( "submit", function(event) {
112
        event.preventDefault();
113
        mana_search($(this).children("#mana_search_field").val());
114
    });
115
116
    function mana_increment(mana_id, resourcename, fieldvalue, stepvalue = 1){
117
        $.ajax( {
118
            type: "POST",
119
            url: "/cgi-bin/koha/svc/mana/addvaluetofield",
120
            data: {id: mana_id, field: fieldvalue, resource: resourcename, step: stepvalue},
121
            datatype: "json",
122
        }).done( function() {
123
        }).fail( function(){ alert("") });
124
    }
125
126
    function mana_use( mana_id ){
127
        $.ajax( {
128
            type:"POST",
129
            url: "/cgi-bin/koha/svc/mana/use",
130
            data: {id:mana_id, resource: 'report', saveinbase: 1},
131
            dataType: "json",
132
        })
133
        .done( function (result){
134
            if ( result.errmsg ){
135
                alert( result.errmsg );
136
            }
137
            else{
138
                window.location = ("/cgi-bin/koha/reports/guided_reports.pl?reports=").concat(result.id).concat("&amp;phase=Show%20SQL&mana_success=1&phase=Edit%20SQL");
139
            }
140
        })
141
        .fail( function ( foo, msg, longmsg, bla ){
142
        });
143
    }
144
145
    function mana_search( textquery ){
146
        $.ajax({
147
            type: "POST",
148
            url: "/cgi-bin/koha/svc/mana/search",
149
            data: {biblionumber: $("#biblionumber").val(), resource: 'report', id: textquery, usecomments: 1},
150
            dataType: "html",
151
        })
152
        .done( function( result ) {
153
            $("#mana_search_result .modal-body").html(result);
154
            $("#mana_search_result_label").text("Results from Mana Knowledge Base");
155
            $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{
156
                "sPaginationType":"four_button",
157
                "autoWidth": false,
158
                "columnDefs": [
159
                    { "width": "35%", "targets": 1 }
160
                ],
161
                "aoColumnDefs": [
162
                    { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
163
                    { "sType": "title-string", "aTargets" : [ "title-string" ] },
164
                    { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
165
                ]
166
            }));
167
            if($("td.dataTables_empty").length == 0){
168
                 $("#mana_search").show();
169
            }
170
171
            $( "select[class='actionreport1']" ).show();
172
            $( "button[class='actionreport2']" ).hide();
173
            $("#CommentButton").on("click", function(){
174
                var resource_type = "report";
175
                var target_id = $("#selected_id").val();
176
                var manamsg = $("#manamsg").val();
177
                mana_comment(target_id, manamsg, resource_type);
178
                $("#comment_box").modal("hide");
179
            });
180
181
            $(".showbutton").on("click", function(){
182
                $(this).parent().hide();
183
                $(this).parent().next().show();
184
            });
185
186
            $("a[class='hidebutton']").on("click", function(){
187
                $(this).parent().hide();
188
                $(this).parent().prev().show();
189
            });
190
191
            $("#commentCloseButton").on("click", function(){
192
                $("#comment_box").modal("hide");
193
            });
194
195
            $(".actionreport1").on("click", function(){
196
                $("#selectedcomment").val($(this).val());
197
                $(this).parent("select").hide();
198
                $(this).parent("select").next().show();
199
            });
200
201
            $(".actionreport2").on("click", function(){
202
                $(this).hide();
203
                $(this).prev().show();
204
                mana_increment($("#selectedcomment").val(), 'resource_comment', 'nb', -1);
205
            });
206
        }).fail( function( result ){
207
        });
208
    }
209
210
    function mana_comment( target_id, manamsg, resource_type ){
211
        $.ajax( {
212
            type: "POST",
213
            url: "/cgi-bin/koha/svc/mana/share",
214
            data: {message: manamsg, resource: resource_type , resource_id: target_id},
215
            datatype: "json",
216
        })
217
    }
218
219
220
221
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-113 / +9 lines)
Lines 88-97 $(".goback").on("click",function(e){ Link Here
88
    window.history.back();
88
    window.history.back();
89
});
89
});
90
90
91
$(".mana_search_button").on("click",function(){
92
    mana_search($(this).prev().val());
93
});
94
95
$(".ShareButton").on("click", function(){
91
$(".ShareButton").on("click", function(){
96
    if($(this).closest("tr").find(".report_notes").text().length < 20 || $(this).closest("tr").find(".report_name").text().length < 20){
92
    if($(this).closest("tr").find(".report_notes").text().length < 20 || $(this).closest("tr").find(".report_name").text().length < 20){
97
        $("#shared_infos").hide();
93
        $("#shared_infos").hide();
Lines 108-116 $(".ShareButton").on("click", function(){ Link Here
108
    }
104
    }
109
});
105
});
110
106
111
$('#search_form').submit(function () {
112
    return false;
113
});
114
107
115
$("#addColumn").on("click",function(){
108
$("#addColumn").on("click",function(){
116
    addColumn();
109
    addColumn();
Lines 294-397 $("#delColumn").on("click",function(){ Link Here
294
[% END %]
287
[% END %]
295
});
288
});
296
289
297
function mana_increment(mana_id, resourcename, fieldvalue, stepvalue = 1){
298
    $.ajax( {
299
        type: "POST",
300
        url: "/cgi-bin/koha/svc/mana/addvaluetofield",
301
        data: {id: mana_id, field: fieldvalue, resource: resourcename, step: stepvalue},
302
        datatype: "json",
303
    }).done( function() {
304
    }).fail( function(){ });
305
}
306
307
function mana_use( mana_id ){
308
    $.ajax( {
309
        type:"POST",
310
        url: "/cgi-bin/koha/svc/mana/use",
311
        data: {id:mana_id, resource: 'report', saveinbase: 1},
312
        dataType: "json",
313
    })
314
    .done( function (result){
315
        window.location = ("/cgi-bin/koha/reports/guided_reports.pl?reports=").concat(result.id).concat("&amp;phase=Show%20SQL");
316
    })
317
    .fail( function ( foo, msg, longmsg){
318
    });
319
}
320
321
function mana_search( textquery ){
322
    $.ajax({
323
        type: "POST",
324
        url: "/cgi-bin/koha/svc/mana/search",
325
        data: {biblionumber: $("#biblionumber").val(), resource: 'report', id: textquery, usecomments: 1},
326
        dataType: "html",
327
    })
328
    .done( function( result ) {
329
        $("#mana_search_result .modal-body").html(result);
330
        $("#mana_search_result_label").text("Results from Mana Knowledge Base");
331
        $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{
332
            "sPaginationType":"four_button",
333
            "autoWidth": false,
334
            "columnDefs": [
335
                { "width": "35%", "targets": 1 }
336
            ],
337
            "aoColumnDefs": [
338
                { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
339
                { "sType": "title-string", "aTargets" : [ "title-string" ] },
340
                { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
341
            ]
342
        }));
343
        if($("td.dataTables_empty").length == 0){
344
             $("#mana_search").show();
345
        }
346
347
        $( "select[class='actionreport1']" ).show();
348
        $( "button[class='actionreport2']" ).hide();
349
        $("#CommentButton").on("click", function(){
350
            var resource_type = "report";
351
            var target_id = $("#selected_id").val();
352
            var manamsg = $("#manamsg").val();
353
            mana_comment(target_id, manamsg, resource_type);
354
            $("#comment_box").modal("hide");
355
        });
356
357
        $(".showbutton").on("click", function(){
358
            $(this).parent().hide();
359
            $(this).parent().next().show();
360
        });
361
362
        $("a[class='hidebutton']").on("click", function(){
363
            $(this).parent().hide();
364
            $(this).parent().prev().show();
365
        });
366
367
        $("#commentCloseButton").on("click", function(){
368
            $("#comment_box").modal("hide");
369
        });
370
371
        $(".actionreport1").on("click", function(){
372
            $("#selectedcomment").val($(this).val());
373
            $(this).parent("select").hide();
374
            $(this).parent("select").next().show();
375
        });
376
377
        $(".actionreport2").on("click", function(){
378
            $(this).hide();
379
            $(this).prev().show();
380
            mana_increment($("#selectedcomment").val(), 'resource_comment', 'nb', -1);
381
        });
382
    }).fail( function( result ){
383
    });
384
}
385
386
function mana_comment( target_id, manamsg, resource_type ){
387
    $.ajax( {
388
        type: "POST",
389
        url: "/cgi-bin/koha/svc/mana/share",
390
        data: {message: manamsg, resource: resource_type , resource_id: target_id},
391
        datatype: "json",
392
    })
393
}
394
395
290
396
291
397
</script>
292
</script>
Lines 503-508 canned reports and writing custom SQL reports.</p> Link Here
503
    </div>
398
    </div>
504
</div>
399
</div>
505
400
401
[% IF report_converted %]
402
    <div class="dialog message">
403
        The report "[% report_converted %]" has been converted.
404
    </div>
405
[% END %]
406
407
506
[% IF ( saved1 ) %]
408
[% IF ( saved1 ) %]
507
[% IF ( savedreports ) %]<h1>Saved reports</h1>
409
[% IF ( savedreports ) %]<h1>Saved reports</h1>
508
410
Lines 527-540 canned reports and writing custom SQL reports.</p> Link Here
527
    </div>
429
    </div>
528
    [% END %]
430
    [% END %]
529
431
530
   [% IF (Koha.Preference('Mana') == 1) %]
531
    <div id="mana_search" class="dialog message">
532
        <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>
533
    </div>
534
    [% END %]
535
536
</script>
432
</script>
537
<h1> [% savedreport.sql %]</h1>
433
538
<form action="/cgi-bin/koha/reports/guided_reports.pl" id="reports_form" method="post">
434
<form action="/cgi-bin/koha/reports/guided_reports.pl" id="reports_form" method="post">
539
<input type="hidden" name="phase" value="Delete Multiple" />
435
<input type="hidden" name="phase" value="Delete Multiple" />
540
        <table id="table_reports">
436
        <table id="table_reports">
Lines 565-571 canned reports and writing custom SQL reports.</p> Link Here
565
                            [% IF ( CAN_user_reports_delete_reports ) %] <!-- not break CSS -->
461
                            [% IF ( CAN_user_reports_delete_reports ) %] <!-- not break CSS -->
566
                                <input type="checkbox" name="ids" value="[% savedreport.id %]" />
462
                                <input type="checkbox" name="ids" value="[% savedreport.id %]" />
567
                            [% END %]
463
                            [% END %]
568
                        <input hidden class="report_sql" value="[% savedreport.savedsql %]">
464
                        <input hidden class="report_sql" value="[% savedreport.savedsql |html %]">
569
                        </td>
465
                        </td>
570
                        <td class="report_id"><label for="ids">[% savedreport.id %]</label></td>
466
                        <td class="report_id"><label for="ids">[% savedreport.id %]</label></td>
571
                        <td class="report_name">
467
                        <td class="report_name">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt (-1 / +1 lines)
Lines 165-171 Link Here
165
                        </ul>
165
                        </ul>
166
                        [% IF mana %]
166
                        [% IF mana %]
167
                            <div id="mana">
167
                            <div id="mana">
168
                                [% INCLUDE 'mana-subscription-search-result.inc' %]
168
                                [% INCLUDE 'mana/mana-subscription-search-result.inc' %]
169
                            </div>
169
                            </div>
170
                        [% ELSE %]
170
                        [% ELSE %]
171
            <div id="opened">
171
            <div id="opened">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (-6 / +15 lines)
Lines 406-411 function show_page_2() { Link Here
406
}
406
}
407
407
408
function mana_search() {
408
function mana_search() {
409
    $("#mana_search").html("<p>Mana kb is being asked for your subscription..</p>");
410
    $("#mana_search").show();
411
409
    $.ajax({
412
    $.ajax({
410
        type: "POST",
413
        type: "POST",
411
        url: "/cgi-bin/koha/svc/mana/search",
414
        url: "/cgi-bin/koha/svc/mana/search",
Lines 414-419 function mana_search() { Link Here
414
    })
417
    })
415
    .done( function( result ) {
418
    .done( function( result ) {
416
        $("#mana_search_result .modal-body").html(result);
419
        $("#mana_search_result .modal-body").html(result);
420
debugger;
417
        $("#mana_search_result_label").text("Results from Mana Knowledge Base");
421
        $("#mana_search_result_label").text("Results from Mana Knowledge Base");
418
        $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
422
        $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
419
            "sPaginationType": "four_button",
423
            "sPaginationType": "four_button",
Lines 429-436 function mana_search() { Link Here
429
            ]
433
            ]
430
        }));
434
        }));
431
        if( $("#mana_results_datatable").length && $("td.dataTables_empty").length == 0){
435
        if( $("#mana_results_datatable").length && $("td.dataTables_empty").length == 0){
432
            $("#mana_search").show();
436
            $("#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>");
437
        }
438
        else if ( $("#mana_results_datatable").length ){
439
            $("#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>");
433
        }
440
        }
441
        else{
442
            $("#mana_search").html( result );
443
        }
444
        $("#mana_search").show();
434
        $( "select[class='actionreport1']" ).show();
445
        $( "select[class='actionreport1']" ).show();
435
        $( "button[class='actionreport2']" ).hide();
446
        $( "button[class='actionreport2']" ).hide();
436
447
Lines 458-464 function mana_search() { Link Here
458
            mana_increment($("#selectedcomment").val(), 'resource_comment', 'nb', -1);
469
            mana_increment($("#selectedcomment").val(), 'resource_comment', 'nb', -1);
459
        });
470
        });
460
471
461
    }).fail(function(result){
472
    }).fail(function(result, msg, longmsg){
473
        console.log( msg );
474
        console.log( longmsg );
462
    });
475
    });
463
}
476
}
464
477
Lines 566-574 $(document).ready(function() { Link Here
566
579
567
580
568
    mana_search();
581
    mana_search();
569
    $("#myid").on("click", function(){
570
        debugger;
571
    })
572
    $("#displayexample").hide();
582
    $("#displayexample").hide();
573
    $("#mana_search_result").modal("hide");
583
    $("#mana_search_result").modal("hide");
574
    $("#aqbooksellerid").on('keypress', function(e) {
584
    $("#aqbooksellerid").on('keypress', function(e) {
Lines 914-920 $(document).ready(function() { Link Here
914
                [% END %]
924
                [% END %]
915
925
916
                        <div hidden id="mana_search" class="dialog message">
926
                        <div hidden id="mana_search" class="dialog message">
917
                            <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>
918
                        </div>
927
                        </div>
919
                        <div id="subscription_form_planning">
928
                        <div id="subscription_form_planning">
920
                            <fieldset class="rows">
929
                            <fieldset class="rows">
(-)a/reports/guided_reports.pl (+1 lines)
Lines 181-186 elsif ( $phase eq 'Show SQL'){ Link Here
181
        'notes'      => $report->{notes},
181
        'notes'      => $report->{notes},
182
	'sql'     => $report->{savedsql},
182
	'sql'     => $report->{savedsql},
183
	'showsql' => 1,
183
	'showsql' => 1,
184
        'mana_success' => $input->param('mana_success'),
184
    );
185
    );
185
}
186
}
186
187
(-)a/serials/serials-search.pl (+3 lines)
Lines 96-101 for my $field ( @$additional_fields ) { Link Here
96
96
97
my $expiration_date_dt = $expiration_date ? dt_from_string( $expiration_date ) : undef;
97
my $expiration_date_dt = $expiration_date ? dt_from_string( $expiration_date ) : undef;
98
my @subscriptions;
98
my @subscriptions;
99
my $mana_statuscode;
99
if ($searched){
100
if ($searched){
100
    if ($mana) {
101
    if ($mana) {
101
        my $result = Koha::SharedContent::manaGetRequest("subscription",{
102
        my $result = Koha::SharedContent::manaGetRequest("subscription",{
Lines 104-109 if ($searched){ Link Here
104
            ean          => $EAN,
105
            ean          => $EAN,
105
            publisher    => $publisher
106
            publisher    => $publisher
106
        });
107
        });
108
        $mana_statuscode = $result->{code};
107
        @subscriptions = @{ $result->{data} };
109
        @subscriptions = @{ $result->{data} };
108
    }
110
    }
109
    else {
111
    else {
Lines 127-132 if ($searched){ Link Here
127
if ($mana) {
129
if ($mana) {
128
    $template->param(
130
    $template->param(
129
        subscriptions => \@subscriptions,
131
        subscriptions => \@subscriptions,
132
        statuscode    => $mana_statuscode,
130
        total         => scalar @subscriptions,
133
        total         => scalar @subscriptions,
131
        title_filter  => $title,
134
        title_filter  => $title,
132
        ISSN_filter   => $ISSN,
135
        ISSN_filter   => $ISSN,
(-)a/serials/subscription-add.pl (-1 / +1 lines)
Lines 305-311 sub manage_subscription_numbering_pattern_id { Link Here
305
            return $existing->id;
305
            return $existing->id;
306
        }
306
        }
307
307
308
        $params->{label} = Koha::Subscription::Numberpattern->uniqueLabel($query->param('patternname'));
308
        $params->{label} = Koha::Subscription::Numberpatterns->uniqueLabel($query->param('patternname'));
309
        $params->{description} = $query->param('sndescription');
309
        $params->{description} = $query->param('sndescription');
310
310
311
311
(-)a/svc/mana/share (-1 / +19 lines)
Lines 45-47 $content->{resource_id} = $input->param("resource_id"); Link Here
45
$content->{resource_type} = $input->param("resource");
45
$content->{resource_type} = $input->param("resource");
46
$content->{message} = $input->param("message");
46
$content->{message} = $input->param("message");
47
Koha::SharedContent::manaPostRequest('resource_comment', $content);
47
Koha::SharedContent::manaPostRequest('resource_comment', $content);
48
- 
48
    my $package = "Koha::".ucfirst($input->param('resource'));
49
    my $resource;
50
    my $result;
51
eval{
52
    $result = Koha::SharedContent::manaGetRequestWithId($input->param('resource'), $input->param('id') );
53
};
54
if ( $@ or $result->{code} == 500 ){
55
    $resource->{errmsg} =  "Error: mana access got broken, please try again later\n\n ( error: $@ )";
56
}
57
else{
58
    if ( $input->param( 'saveinbase' )) {
59
        $resource = { id => $package->new_from_mana($result->{data})->id };
60
    }
61
    else{
62
        $resource = $result->{data};
63
    }
64
}
65
66
print(to_json($resource));

Return to bug 17047