Bugzilla – Attachment 99760 Details for
Bug 24159
Allow daysMode for calculating due and renewal dates to be set at the circulation rules level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24159: Add UI changes
Bug-24159-Add-UI-changes.patch (text/plain), 8.77 KB, created by
Jonathan Druart
on 2020-02-28 14:14:32 UTC
(
hide
)
Description:
Bug 24159: Add UI changes
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-28 14:14:32 UTC
Size:
8.77 KB
patch
obsolete
>From 275b44c92debb6413c273229c83b22fa5e4ebbd5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 28 Feb 2020 14:28:21 +0100 >Subject: [PATCH] Bug 24159: Add UI changes > >Sponsored-by: Institute of Technology Carlow >--- > admin/smart-rules.pl | 3 +++ > .../prog/en/modules/admin/smart-rules.tt | 27 ++++++++++++++++--- > 2 files changed, 26 insertions(+), 4 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 236ca8f062..d01563e74b 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -96,6 +96,7 @@ if ($op eq 'delete') { > chargeperiod => undef, > chargeperiod_charge_at => undef, > issuelength => undef, >+ useDaysMode => undef, > lengthunit => undef, > hardduedate => undef, > hardduedatecompare => undef, >@@ -279,6 +280,7 @@ elsif ($op eq 'add') { > my $onshelfholds = $input->param('onshelfholds') || 0; > my $issuelength = $input->param('issuelength'); > $issuelength = $issuelength eq q{} ? undef : $issuelength; >+ my $useDaysMode = $input->param('useDaysMode'); > my $lengthunit = $input->param('lengthunit'); > my $hardduedate = $input->param('hardduedate') || undef; > $hardduedate = eval { dt_from_string( $input->param('hardduedate') ) } if ( $hardduedate ); >@@ -304,6 +306,7 @@ elsif ($op eq 'add') { > chargeperiod => $chargeperiod, > chargeperiod_charge_at => $chargeperiod_charge_at, > issuelength => $issuelength, >+ useDaysMode => $useDaysMode, > lengthunit => $lengthunit, > hardduedate => $hardduedate, > hardduedatecompare => $hardduedatecompare, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index e0f50bf619..ff39f5850c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -130,6 +130,7 @@ > [% SET maxissueqty = all_rules.$c.$i.maxissueqty %] > [% SET maxonsiteissueqty = all_rules.$c.$i.maxonsiteissueqty %] > [% SET issuelength = all_rules.$c.$i.issuelength %] >+ [% SET useDaysMode = all_rules.$c.$i.useDaysMode %] > [% SET lengthunit = all_rules.$c.$i.lengthunit %] > [% SET hardduedate = all_rules.$c.$i.hardduedate %] > [% SET hardduedatecompare = all_rules.$c.$i.hardduedatecompare %] >@@ -156,7 +157,7 @@ > [% SET article_requests = all_rules.$c.$i.article_requests %] > [% SET rentaldiscount = all_rules.$c.$i.rentaldiscount %] > >- [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] >+ [% SET show_rule = maxissueqty || maxonsiteissueqty || issuelength || useDaysMode || lengthunit || hardduedate || hardduedatebefore || hardduedateexact || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || renewalsallowed || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || article_requests %] > [% IF show_rule %] > [% SET row_count = row_count + 1 %] > <tr row_countd="row_[% row_count | html %]"> >@@ -198,6 +199,14 @@ > [% END %] > </td> > <td>[% issuelength | html %]</td> >+ <td> >+ [% SWITCH useDaysMode %] >+ [% CASE 'Calendar' %]<span title="Use the calendar to skip days the library is closed">Calendar</span> >+ [% CASE 'Datedue' %]<span title="Use the calendar to push the due date to the next open day">Datedue</span> >+ [% CASE 'Days' %]<span title="Ignore the calendar">Days</span> >+ [% CASE 'Dayweek' %]<span title="Use the calendar to push the due date to the next open matching weekday for weekly loan periods, or the next open day otherwise">Dayweek</span> >+ [% CASE %]<span title="Use the system preference 'useDaysMode' as a default value">Default</span> >+ [% END %] > <td> > [% IF ( lengthunit == 'days' ) %] > Days >@@ -335,6 +344,15 @@ > <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td> > <td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td> > <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td> >+ <td> >+ <select name="useDaysMode" id="useDaysMode"> >+ <option value="">Default</option> >+ <option value="Calendar">Calendar</option> >+ <option value="Datedue">Datedue</option> >+ <option value="Days">Days</option> >+ <option value="Dayweek">Dayweek</option> >+ </select> >+ </td> > <td> > <select name="lengthunit" id="lengthunit"> > <option value="days" selected="selected">Days</option> >@@ -419,6 +437,7 @@ > <th>Current checkouts allowed</th> > <th>Current on-site checkouts allowed</th> > <th>Loan period</th> >+ <th>Days mode</th> > <th>Unit</th> > <th>Hard due date</th> > <th>Fine amount</th> >@@ -988,7 +1007,7 @@ > // 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 ) { >+ } else if ( i == 9 ) { > // specific processing for the Hard due date column > var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); > var input_value = ''; >@@ -999,7 +1018,7 @@ > } > $(current_column).find("input[type='text']").val(input_value); > $(current_column).find("select").val(select_value); >- } else if ( i == 14 ) { >+ } else if ( i == 15 ) { > // 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') ); >@@ -1024,7 +1043,7 @@ > // Remove potential previous input added > $(current_column).find("input").remove(); > $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />"); >- } else if ( i == 4 || i == 5 || i == 24 || i == 25 || i == 26 ) { >+ } else if ( i == 5 || i == 6 || i == 25 || i == 26 || i == 27 ) { > // If the value is not an integer for > // - "Current checkouts allowed" > // - "Current on-site checkouts allowed" >-- >2.20.1
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 24159
:
99758
|
99759
|
99760
|
99761
|
99762
|
100608
|
100609
|
100610
|
100611
|
100612
|
100613
|
100614
|
100615
|
101053
|
101054
|
101556
|
101649
|
101698
|
102009
|
102148
|
102303
|
102554
|
102555
|
102556
|
102557
|
102558
|
102559
|
102560
|
102561
|
102562
|
102563
|
104197
|
104198
|
104199
|
104200
|
104201
|
104202
|
104203
|
104204
|
106007
|
106008
|
106013
|
106014
|
106015
|
106016
|
106017
|
106018
|
106019
|
106020
|
106021
|
106022