@@ -, +, @@ --- .../prog/en/modules/admin/smart-rules.tt | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -70,6 +70,7 @@ Patron category Item type Actions + Note Current checkouts allowed Current on-site checkouts allowed Loan period @@ -97,7 +98,6 @@ Item level holds Article requests Rental discount (%) - Note Actions @@ -121,6 +121,11 @@ Delete + + [% IF rule.note %] + View note + [% ELSE %] [% END %] + [% IF ( rule.unlimited_maxissueqty ) %] Unlimited [% ELSE %] @@ -254,6 +259,7 @@ + @@ -326,7 +332,6 @@ - @@ -338,6 +343,7 @@ Patron category Item type   + Note Current checkouts allowed Current on-site checkouts allowed Loan period @@ -365,7 +371,6 @@ Item level holds Article requests Rental discount (%) - Note   @@ -797,6 +802,8 @@ var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone."); $(document).ready(function() { + $('[data-toggle="popover"]').popover(); + $(".delete").on("click",function(){ return confirmDelete(MSG_CONFIRM_DELETE); }); @@ -834,7 +841,11 @@ itm = $(this).text(); itm = itm.replace(/^\s*|\s*$/g,''); var current_column = $("#edit_row td:eq("+i+")"); - if ( i == 7 ) { + if ( i == 3 ) { + // specific processing for the Note column + var note = $(this).find("a[name='viewnote']").data("content"); + $(current_column).find("input[type='text']").val(note); + } else if ( i == 8 ) { // specific processing for the Hard due date column var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); var input_value = ''; @@ -845,7 +856,7 @@ } $(current_column).find("input[type='text']").val(input_value); $(current_column).find("select").val(select_value); - } else if ( i == 13 ) { + } else if ( i == 14 ) { // specific processing for cap_fine_to_replacement_price var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') ); @@ -870,7 +881,7 @@ // Remove potential previous input added $(current_column).find("input").remove(); $(current_column).append(""); - } else if ( i == 3 || i == 4 || i == 24 ) { + } else if ( i == 4 || i == 5 || i == 25 ) { // If the value is not an integer for // - "Current checkouts allowed" // - "Current on-site checkouts allowed" --