Bugzilla – Attachment 38277 Details for
Bug 11625
Default to logged in library for circ rules and notices & slips
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11625 - Implement DefaultToLoggedInLibraryNoticesSlips
Bug-11625---Implement-DefaultToLoggedInLibraryNoti.patch (text/plain), 3.31 KB, created by
Kyle M Hall (khall)
on 2015-04-21 15:05:03 UTC
(
hide
)
Description:
Bug 11625 - Implement DefaultToLoggedInLibraryNoticesSlips
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-04-21 15:05:03 UTC
Size:
3.31 KB
patch
obsolete
>From a27028cd9648bee9091cf91194ce97ca3f6c4fc6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 21 Apr 2015 11:02:49 -0400 >Subject: [PATCH] Bug 11625 - Implement DefaultToLoggedInLibraryNoticesSlips > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/modules/tools/letter.tt | 2 +- > tools/letter.pl | 28 +++++++++++++------ > 2 files changed, 20 insertions(+), 10 deletions(-) > >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 3106498..1c7e46f 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() { > <p> > Select a library : > <select name="branchcode" id="branch" style="width:20em;"> >- <option value="">All libraries</option> >+ <option value="*">All libraries</option> > [% FOREACH branchloo IN branchloop %] > [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %] > [% END %] >diff --git a/tools/letter.pl b/tools/letter.pl >index e9f39d9..3914f5d 100755 >--- a/tools/letter.pl >+++ b/tools/letter.pl >@@ -58,15 +58,7 @@ sub protected_letters { > return { map { $_->[0] => 1 } @{$codes} }; > } > >-our $input = new CGI; >-my $searchfield = $input->param('searchfield'); >-my $script_name = '/cgi-bin/koha/tools/letter.pl'; >-our $branchcode = $input->param('branchcode'); >-my $code = $input->param('code'); >-my $module = $input->param('module') || ''; >-my $content = $input->param('content'); >-my $op = $input->param('op') || ''; >-my $dbh = C4::Context->dbh; >+our $input = new CGI; > > our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user( > { >@@ -79,6 +71,24 @@ our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user > } > ); > >+my $searchfield = $input->param('searchfield'); >+my $script_name = '/cgi-bin/koha/tools/letter.pl'; >+my $code = $input->param('code'); >+my $module = $input->param('module'); >+my $content = $input->param('content'); >+my $op = $input->param('op') || ''; >+ >+# Default to logged in branch for notice list only, if DefaultToLoggedInLibraryNoticesSlips is enabled >+our $branchcode = >+ !C4::Context->preference('DefaultToLoggedInLibraryNoticesSlips') ? $input->param('branchcode') >+ : $input->param('branchcode') eq '*' ? undef >+ : $input->param('branchcode') ? $input->param('branchcode') >+ : $op ? $input->param('branchcode') >+ : GetBranchesCount() == 1 ? undef >+ : C4::Branch::mybranch(); >+ >+my $dbh = C4::Context->dbh; >+ > our $my_branch = C4::Context->preference("IndependentBranches") && !$staffflags->{'superlibrarian'} > ? C4::Context->userenv()->{'branch'} > : undef; >-- >1.7.2.5
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 11625
:
24845
|
24861
|
24941
|
24984
|
24985
|
25839
|
25840
|
35460
|
35461
|
35462
|
35463
|
37055
|
37056
|
37057
|
37058
|
38093
|
38094
|
38095
|
38096
|
38276
|
38277
|
38278
|
38422
|
38424
|
41795
|
41796
|
41797
|
43496
|
43497
|
43498