@@ -, +, @@
or not
---
Koha/Template/Plugin/CirculationRules.pm | 4 +-
.../prog/en/modules/admin/smart-rules.tt | 57 +++++++++++++---------
2 files changed, 36 insertions(+), 25 deletions(-)
--- a/Koha/Template/Plugin/CirculationRules.pm
+++ a/Koha/Template/Plugin/CirculationRules.pm
@@ -43,7 +43,7 @@ sub Get {
}
sub Search {
- my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_;
+ my ( $self, $branchcode, $categorycode, $itemtype, $rule_name, $want_rule) = @_;
$branchcode = undef if $branchcode eq q{} or $branchcode eq q{*};
$categorycode = undef if $categorycode eq q{} or $categorycode eq q{*};
@@ -58,8 +58,8 @@ sub Search {
}
)->next;
+ return $rule if $want_rule;
return $rule->rule_value if $rule;
}
-
1;
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt
@@ -543,28 +543,39 @@
- Defaults |
- [% SET patron_maxissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxissueqty' ) %]
-
+ [% IF ( dcharp ) %]
+
+ Defaults
+
+ [% ELSE %]
+ Not set
+ [% END %]
+ |
+
+
|
- [% SET patron_maxonsiteissueqty = CirculationRules.Search( current_branch, undef, undef, 'patron_maxonsiteissueqty' ) %]
-
+
|
- [% SET rule_value = CirculationRules.Search( current_branch, undef , undef, 'max_holds' ) %]
-
+
|
|
|
|
- Unset
+ [% IF (dcharp) %]
+ Unset
+ [% END %]
|
--