From 87d94a85da8c779e408f648668139d3f3bdc017b Mon Sep 17 00:00:00 2001 From: hdl Date: Thu, 28 Jul 2005 17:30:18 +0000 Subject: [PATCH] Adding branch independancy management. Showing management buttons if same branch librarian. TODO : control of user branch before displayin modify pages. --- .../default/en/members/moremember.tmpl | 118 ++++++++++++++---- members/moremember.pl | 14 ++- 2 files changed, 104 insertions(+), 28 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl index e0ce4fc769..c36df25834 100644 --- a/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl @@ -63,21 +63,41 @@ (password defined)(no password)

- - " class="button">Modify - - " class="button">Modify - - Delete - " class="button">Issue books - " class="button">Change Password -

-
-

- - " class="button">Add Child + + + + " class="button">Modify + + " class="button">Modify + + Delete + " class="button">Issue books + " class="button">Change Password +

+
+

+ + " class="button">Add Child + + " class="button">Modify User Flags + + + + " class="button">Modify + + " class="button">Modify + + Delete + " class="button">Issue books + " class="button">Change Password +

+
+

+ + " class="button">Add Child + + " class="button">Modify User Flags - " class="button">Modify User Flags &print=page" class="button">Print Page &print=slip" class="button">Print Slip

@@ -99,12 +119,23 @@ No debts

+ + + "> + View Account + + "> + Pay Fines + + + "> View Account "> Pay Fines +

@@ -139,9 +170,18 @@ - - - + + + + + + + + + + + + @@ -167,7 +207,13 @@ Due Itemtype Charge - Renew + + + Renew + + + Renew + @@ -181,19 +227,37 @@

- - - ">On Request - no renewals - - " value="y">Y - " value="n">N + + + + + ">On Request - no renewals + + " value="y">Y + " value="n">N + + + + + + + ">On Request - no renewals + + " value="y">Y + " value="n">N + + - - - + + + + + + + None diff --git a/members/moremember.pl b/members/moremember.pl index 56c7a0cb14..75a69ce515 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -131,6 +131,14 @@ my %bor; $bor{'borrowernumber'}=$bornum; # Converts the branchcode to the branch name +my $samebranch; +if (C4::Context->preference("IndependantBranches")) { + my $userenv = C4::Context->userenv; + unless ($userenv->{flags} == 1){ + $samebranch = ($data->{'branchcode'} eq $userenv->{branch}); + } +} + $data->{'branchcode'} = &getbranchname($data->{'branchcode'}); # Converts the categorycode to the description @@ -196,6 +204,10 @@ $template->param( totalprice =>$totalprice, totaldue =>$total, issueloop => \@issuedata, - reserveloop => \@reservedata); + reserveloop => \@reservedata + ); +$template->param( + independantbranches => C4::Context->preference("IndependantBranches"), + samebranch => $samebranch) if (C4::Context->preference("IndependantBranches")); output_html_with_http_headers $input, $cookie, $template->output; -- 2.39.5