|
Lines 145-150
canned reports and writing custom SQL reports.</p>
Link Here
|
| 145 |
</div> |
145 |
</div> |
| 146 |
</div> |
146 |
</div> |
| 147 |
|
147 |
|
|
|
148 |
[% IF report_converted %] |
| 149 |
<div class="dialog message"> |
| 150 |
The report "[% report_converted %]" has been converted. |
| 151 |
</div> |
| 152 |
[% END %] |
| 153 |
|
| 154 |
|
| 148 |
[% IF ( saved1 ) %] |
155 |
[% IF ( saved1 ) %] |
| 149 |
[% IF ( savedreports ) %]<h1>Saved reports</h1> |
156 |
[% IF ( savedreports ) %]<h1>Saved reports</h1> |
| 150 |
|
157 |
|
|
Lines 186-199
canned reports and writing custom SQL reports.</p>
Link Here
|
| 186 |
</div> |
193 |
</div> |
| 187 |
[% END %] |
194 |
[% END %] |
| 188 |
|
195 |
|
| 189 |
[% IF (Koha.Preference('Mana') == 1) %] |
|
|
| 190 |
<div id="mana_search" class="dialog message"> |
| 191 |
<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> |
| 192 |
</div> |
| 193 |
[% END %] |
| 194 |
|
| 195 |
</script> |
196 |
</script> |
| 196 |
<h1> [% savedreport.sql %]</h1> |
197 |
|
| 197 |
<form action="/cgi-bin/koha/reports/guided_reports.pl" id="reports_form" method="post"> |
198 |
<form action="/cgi-bin/koha/reports/guided_reports.pl" id="reports_form" method="post"> |
| 198 |
<input type="hidden" name="phase" value="Delete Multiple" /> |
199 |
<input type="hidden" name="phase" value="Delete Multiple" /> |
| 199 |
<table id="table_reports"> |
200 |
<table id="table_reports"> |
|
Lines 233-239
canned reports and writing custom SQL reports.</p>
Link Here
|
| 233 |
[% IF ( CAN_user_reports_delete_reports ) %] <!-- not break CSS --> |
234 |
[% IF ( CAN_user_reports_delete_reports ) %] <!-- not break CSS --> |
| 234 |
<input type="checkbox" name="ids" value="[% savedreport.id | html %]" /> |
235 |
<input type="checkbox" name="ids" value="[% savedreport.id | html %]" /> |
| 235 |
[% END %] |
236 |
[% END %] |
| 236 |
<input hidden class="report_sql" value="[% savedreport.savedsql %]"> |
237 |
<input hidden class="report_sql" value="[% savedreport.savedsql |html %]"> |
| 237 |
</td> |
238 |
</td> |
| 238 |
<td class="report_id"><label for="ids">[% savedreport.id | html %]</label></td> |
239 |
<td class="report_id"><label for="ids">[% savedreport.id | html %]</label></td> |
| 239 |
<td class="report_name"> |
240 |
<td class="report_name"> |
|
Lines 1135-1144
$(document).ready(function() {
Link Here
|
| 1135 |
window.history.back(); |
1136 |
window.history.back(); |
| 1136 |
}); |
1137 |
}); |
| 1137 |
|
1138 |
|
| 1138 |
$(".mana_search_button").on("click",function(){ |
|
|
| 1139 |
mana_search($(this).prev().val()); |
| 1140 |
}); |
| 1141 |
|
| 1142 |
$(".ShareButton").on("click", function(){ |
1139 |
$(".ShareButton").on("click", function(){ |
| 1143 |
if($(this).closest("tr").find(".report_notes").text().length < 20 || $(this).closest("tr").find(".report_name").text().length < 20){ |
1140 |
if($(this).closest("tr").find(".report_notes").text().length < 20 || $(this).closest("tr").find(".report_name").text().length < 20){ |
| 1144 |
$("#shared_infos").hide(); |
1141 |
$("#shared_infos").hide(); |
|
Lines 1155-1164
$(document).ready(function() {
Link Here
|
| 1155 |
} |
1152 |
} |
| 1156 |
}); |
1153 |
}); |
| 1157 |
|
1154 |
|
| 1158 |
$('#search_form').submit(function () { |
|
|
| 1159 |
return false; |
| 1160 |
}); |
| 1161 |
|
| 1162 |
$("#addColumn").on("click",function(){ |
1155 |
$("#addColumn").on("click",function(){ |
| 1163 |
addColumn(); |
1156 |
addColumn(); |
| 1164 |
}); |
1157 |
}); |
|
Lines 1344-1446
$(document).ready(function() {
Link Here
|
| 1344 |
return confirmDelete(MSG_CONFIRM_DELETE); |
1337 |
return confirmDelete(MSG_CONFIRM_DELETE); |
| 1345 |
}); |
1338 |
}); |
| 1346 |
}); |
1339 |
}); |
| 1347 |
function mana_increment(mana_id, resourcename, fieldvalue, stepvalue = 1){ |
|
|
| 1348 |
$.ajax( { |
| 1349 |
type: "POST", |
| 1350 |
url: "/cgi-bin/koha/svc/mana/addvaluetofield", |
| 1351 |
data: {id: mana_id, field: fieldvalue, resource: resourcename, step: stepvalue}, |
| 1352 |
datatype: "json", |
| 1353 |
}).done( function() { |
| 1354 |
}).fail( function(){ }); |
| 1355 |
} |
| 1356 |
|
| 1357 |
function mana_use( mana_id ){ |
| 1358 |
$.ajax( { |
| 1359 |
type:"POST", |
| 1360 |
url: "/cgi-bin/koha/svc/mana/use", |
| 1361 |
data: {id:mana_id, resource: 'report', saveinbase: 1}, |
| 1362 |
dataType: "json", |
| 1363 |
}) |
| 1364 |
.done( function (result){ |
| 1365 |
window.location = ("/cgi-bin/koha/reports/guided_reports.pl?reports=").concat(result.id).concat("&phase=Show%20SQL"); |
| 1366 |
}) |
| 1367 |
.fail( function ( foo, msg, longmsg){ |
| 1368 |
}); |
| 1369 |
} |
| 1370 |
|
| 1371 |
function mana_search( textquery ){ |
| 1372 |
$.ajax({ |
| 1373 |
type: "POST", |
| 1374 |
url: "/cgi-bin/koha/svc/mana/search", |
| 1375 |
data: {biblionumber: $("#biblionumber").val(), resource: 'report', id: textquery, usecomments: 1}, |
| 1376 |
dataType: "html", |
| 1377 |
}) |
| 1378 |
.done( function( result ) { |
| 1379 |
$("#mana_search_result .modal-body").html(result); |
| 1380 |
$("#mana_search_result_label").text("Results from Mana Knowledge Base"); |
| 1381 |
$("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults,{ |
| 1382 |
"sPaginationType":"four_button", |
| 1383 |
"autoWidth": false, |
| 1384 |
"columnDefs": [ |
| 1385 |
{ "width": "35%", "targets": 1 } |
| 1386 |
], |
| 1387 |
"aoColumnDefs": [ |
| 1388 |
{ 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
| 1389 |
{ "sType": "title-string", "aTargets" : [ "title-string" ] }, |
| 1390 |
{ 'sType': "anti-the", 'aTargets' : [ 'anti-the'] } |
| 1391 |
] |
| 1392 |
})); |
| 1393 |
if($("td.dataTables_empty").length == 0){ |
| 1394 |
$("#mana_search").show(); |
| 1395 |
} |
| 1396 |
|
| 1397 |
$( "select[class='actionreport1']" ).show(); |
| 1398 |
$( "button[class='actionreport2']" ).hide(); |
| 1399 |
$("#CommentButton").on("click", function(){ |
| 1400 |
var resource_type = "report"; |
| 1401 |
var target_id = $("#selected_id").val(); |
| 1402 |
var manamsg = $("#manamsg").val(); |
| 1403 |
mana_comment(target_id, manamsg, resource_type); |
| 1404 |
$("#comment_box").modal("hide"); |
| 1405 |
}); |
| 1406 |
|
| 1407 |
$(".showbutton").on("click", function(){ |
| 1408 |
$(this).parent().hide(); |
| 1409 |
$(this).parent().next().show(); |
| 1410 |
}); |
| 1411 |
|
| 1412 |
$("a[class='hidebutton']").on("click", function(){ |
| 1413 |
$(this).parent().hide(); |
| 1414 |
$(this).parent().prev().show(); |
| 1415 |
}); |
| 1416 |
|
| 1417 |
$("#commentCloseButton").on("click", function(){ |
| 1418 |
$("#comment_box").modal("hide"); |
| 1419 |
}); |
| 1420 |
|
| 1421 |
$(".actionreport1").on("click", function(){ |
| 1422 |
$("#selectedcomment").val($(this).val()); |
| 1423 |
$(this).parent("select").hide(); |
| 1424 |
$(this).parent("select").next().show(); |
| 1425 |
}); |
| 1426 |
|
| 1427 |
$(".actionreport2").on("click", function(){ |
| 1428 |
$(this).hide(); |
| 1429 |
$(this).prev().show(); |
| 1430 |
mana_increment($("#selectedcomment").val(), 'resource_comment', 'nb', -1); |
| 1431 |
}); |
| 1432 |
}).fail( function( result ){ |
| 1433 |
}); |
| 1434 |
} |
| 1435 |
|
| 1436 |
function mana_comment( target_id, manamsg, resource_type ){ |
| 1437 |
$.ajax( { |
| 1438 |
type: "POST", |
| 1439 |
url: "/cgi-bin/koha/svc/mana/share", |
| 1440 |
data: {message: manamsg, resource: resource_type , resource_id: target_id}, |
| 1441 |
datatype: "json", |
| 1442 |
}) |
| 1443 |
} |
| 1444 |
|
1340 |
|
| 1445 |
function addColumn() { |
1341 |
function addColumn() { |
| 1446 |
$("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected"); |
1342 |
$("#availableColumns option:selected").clone().appendTo("#selectedColumns").attr("selected", "selected"); |