From bc54a9747b3d4e0c80e3a807d752ebbe3b16d671 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 28 Jan 2014 10:27:07 -0500 Subject: [PATCH] Bug 11625 - Default to logged in library for circ rules and notices & slips This patch makes the default circ rules and notices/slips to edit the logged in branch, if one is set. Test Plan: 1) Apply this patch 2) Log into staff side, and set your library 3) Browse to Administration/Circulation and fines rules 4) Note the rule set selected is for your library 5) Select "All libraries" 6) Note the rule set selected is for "All libraries" 7) Browse to Toos/Notices & slips 8) Note the notice set selected is for your library 9) Select "All libraries" 10) Not the rule set selected is for "All libraries" 11) Click "New Notice" 12) Note the Library field is set to "All libraries" Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Passes QA script and tests. Small ergonomic improvement, no regressions found. --- admin/smart-rules.pl | 2 +- .../intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- tools/letter.pl | 26 +++++++++++++------- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 942e9bf..23f407b 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -43,7 +43,7 @@ my ($template, $loggedinuser, $cookie) }); my $type=$input->param('type'); -my $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' ); +my $branch = $input->param('branch') || C4::Branch::mybranch(); my $op = $input->param('op') || q{}; if ($op eq 'delete') { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index cfda11c..9663a8d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -162,7 +162,7 @@ $(document).ready(function() {

Select a library :