Lines 416-428
Link Here
|
416 |
[% IF ( CAN_user_reports_delete_reports ) %] |
416 |
[% IF ( CAN_user_reports_delete_reports ) %] |
417 |
<li> |
417 |
<li> |
418 |
<a |
418 |
<a |
419 |
class="dropdown-item submit-form-link" |
419 |
class="dropdown-item delete-report" |
420 |
href="#" |
420 |
href="#" |
421 |
data-id="[% savedreport.id | html %]" |
421 |
data-id="[% savedreport.id | html %]" |
422 |
data-action="guided_reports.pl" |
422 |
data-title="[% savedreport.report_name | html %]" |
423 |
data-method="post" |
423 |
data-group="[% savedreport.groupname | html %]" |
424 |
data-op="cud-delete" |
424 |
data-subgroup="[% savedreport.subgroupname | html %]" |
425 |
data-confirmation-msg="[% t('Are you sure you want to delete this report?') | html %]" |
425 |
data-notes="[% savedreport.notes | html %]" |
|
|
426 |
data-author="[% savedreport.borrowerfirstname | html %] [% savedreport.borrowersurname | html %]" |
427 |
data-lastRun="[% savedreport.last_run | $KohaDates with_hours => 1 %]" |
426 |
><i class="fa fa-trash-can" aria-hidden="true"></i> Delete</a |
428 |
><i class="fa fa-trash-can" aria-hidden="true"></i> Delete</a |
427 |
> |
429 |
> |
428 |
</li> |
430 |
</li> |
Lines 1695-1700
Link Here
|
1695 |
</div> |
1697 |
</div> |
1696 |
<!-- /#runtime_parameters --> |
1698 |
<!-- /#runtime_parameters --> |
1697 |
|
1699 |
|
|
|
1700 |
[% IF ( savedreports ) %] |
1701 |
<div class="modal" id="deleteModal" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true"> |
1702 |
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post"> |
1703 |
[% INCLUDE 'csrf-token.inc' %] |
1704 |
<input type="hidden" name="id" id="delete_modal_id" value="" /> |
1705 |
<input type="hidden" name="op" value="cud-delete" /> |
1706 |
<div class="modal-dialog"> |
1707 |
<div class="modal-content"> |
1708 |
<div class="modal-header"> |
1709 |
<h1 class="modal-title" id="deleteModalLabel">Are you sure you want to delete this report?</h1> |
1710 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
1711 |
</div> |
1712 |
<div class="modal-body"> |
1713 |
<h2><div id="delete_modal_title"></div></h2> |
1714 |
<div class="rows"> |
1715 |
<ol> |
1716 |
<li> |
1717 |
<span class="label">Group:</span> |
1718 |
<span class="delete_modal_info" id="delete_modal_group"></span> |
1719 |
</li> |
1720 |
<li> |
1721 |
<span class="label">Subgroup:</span> |
1722 |
<span class="delete_modal_info" id="delete_modal_subgroup"></span> |
1723 |
</li> |
1724 |
<li> |
1725 |
<span class="label">Notes:</span> |
1726 |
<span class="delete_modal_info" id="delete_modal_notes"></span> |
1727 |
</li> |
1728 |
<li> |
1729 |
<span class="label">Author:</span> |
1730 |
<span class="delete_modal_info" id="delete_modal_author"></span> |
1731 |
</li> |
1732 |
<li> |
1733 |
<span class="label">Last run:</span> |
1734 |
<span class="delete_modal_info" id="delete_modal_lastrun"></span> |
1735 |
</li> |
1736 |
</ol> |
1737 |
</div> |
1738 |
</div> |
1739 |
<div class="modal-footer"> |
1740 |
<button type="submit" class="btn btn-danger"><i class="fa fa-trash-can" aria-hidden="true"></i> Delete</button> |
1741 |
<button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button> |
1742 |
</div> |
1743 |
</div> |
1744 |
</div> |
1745 |
</form> |
1746 |
</div> |
1747 |
[% END %] |
1748 |
|
1698 |
[% MACRO jsinclude BLOCK %] |
1749 |
[% MACRO jsinclude BLOCK %] |
1699 |
[% Asset.js("js/charts.js") | $raw %] |
1750 |
[% Asset.js("js/charts.js") | $raw %] |
1700 |
[% Asset.js("lib/d3c3/d3.min.js") | $raw %] |
1751 |
[% Asset.js("lib/d3c3/d3.min.js") | $raw %] |
Lines 2200-2205
Link Here
|
2200 |
} |
2251 |
} |
2201 |
}); |
2252 |
}); |
2202 |
|
2253 |
|
|
|
2254 |
$("body").on("click", ".delete-report", function(e){ |
2255 |
e.preventDefault(); |
2256 |
const report = $(this)[0].dataset; |
2257 |
for( const key in report ){ |
2258 |
if( report[key] ){ |
2259 |
if( key == "id" ){ |
2260 |
$("#delete_modal_id").val( report[key] ); |
2261 |
} else { |
2262 |
$("#delete_modal_" + key ).html( report[key] ).show(); |
2263 |
} |
2264 |
} else { |
2265 |
$("#delete_modal_" + key ).parent().hide(); |
2266 |
} |
2267 |
} |
2268 |
$("#delete_report_id").html("id"); |
2269 |
$('#deleteModal').modal('show'); |
2270 |
}); |
2271 |
|
2272 |
$("#deleteModal").on("hidden.bs.modal", function(){ |
2273 |
$("#delete_modal_id").val(""); |
2274 |
$(".delete_modal_info").html(""); |
2275 |
}); |
2276 |
|
2203 |
$("body").on("click", ".update_sql", function(e){ |
2277 |
$("body").on("click", ".update_sql", function(e){ |
2204 |
e.preventDefault(); |
2278 |
e.preventDefault(); |
2205 |
var ltitle = $(this).text(); |
2279 |
var ltitle = $(this).text(); |
Lines 2611-2617
Link Here
|
2611 |
<a id="preview-modal-editreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=' + reportid + '&op=edit_form"><i class="fa-solid fa-pencil" aria-hidden="true"></i> ' + _("Edit") + '</a>\ |
2685 |
<a id="preview-modal-editreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=' + reportid + '&op=edit_form"><i class="fa-solid fa-pencil" aria-hidden="true"></i> ' + _("Edit") + '</a>\ |
2612 |
<a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?op=duplicate&id=' + reportid + '"><i class="fa fa-copy" aria-hidden="true"></i> ' + _("Duplicate") + '</a>\ |
2686 |
<a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?op=duplicate&id=' + reportid + '"><i class="fa fa-copy" aria-hidden="true"></i> ' + _("Duplicate") + '</a>\ |
2613 |
<a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/tools/scheduler.pl?id=' + reportid + '"><i class="fa-solid fa-clock" aria-hidden="true"></i> ' + _("Schedule") + '</a>\ |
2687 |
<a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/tools/scheduler.pl?id=' + reportid + '"><i class="fa-solid fa-clock" aria-hidden="true"></i> ' + _("Schedule") + '</a>\ |
2614 |
<a class="btn btn-default submit-form-link" href="#" data-id="' + reportid + '" data-action="guided_reports.pl" data-method="post" data-op="cud-delete" data-confirmation-msg="' + _("Are you sure you want to delete this report?") + '"><i class="fa fa-trash-can" aria-hidden="true"></i>' + _("Delete") + '</a>\ |
2688 |
<a class="btn btn-default submit-form-link" href="#" data-id="' + reportid + '" data-action="guided_reports.pl" data-method="post" data-op="cud-delete" data-confirmation-msg="' + _("Are you sure you want to delete this report?") + '"><i class="fa fa-trash-can" aria-hidden="true"></i> ' + _("Delete") + '</a>\ |
2615 |
<a id="preview-modal-runreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=' + reportid + '&op=run"><i class="fa fa-play" aria-hidden="true"></i> ' + _("Run report") + '</a>\ |
2689 |
<a id="preview-modal-runreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=' + reportid + '&op=run"><i class="fa fa-play" aria-hidden="true"></i> ' + _("Run report") + '</a>\ |
2616 |
<a href="#" id="preview-sql-modal-cancel" data-bs-dismiss="modal" class="btn btn-default"><i class="fa fa-times" aria-hidden="true"></i> ' + _("Close") + '</a>\ |
2690 |
<a href="#" id="preview-sql-modal-cancel" data-bs-dismiss="modal" class="btn btn-default"><i class="fa fa-times" aria-hidden="true"></i> ' + _("Close") + '</a>\ |
2617 |
</div>\ |
2691 |
</div>\ |
2618 |
- |
|
|