From f05e50cee21450f67368cd435a3c9d0bec600c10 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Fri, 1 Feb 2008 23:23:50 -0600 Subject: [PATCH] Modified viewlog.pl to discern where it was called from and display the appropriate menu. If viewlog.pl is called from the circulation menu, then the circulation menu is displayed. If viewlog.pl is called otherwise, the tools menu is displayed. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- .../prog/en/includes/circ-menu.inc | 53 +++++++++++-------- .../prog/en/modules/tools/viewlog.tmpl | 6 ++- tools/viewlog.pl | 27 ++++++++++ 3 files changed, 62 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index fd21e8c07b..dda89bab43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -2,36 +2,43 @@
()
  • " alt=" ()" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" width="100" />
  • -
  • +
  • - - No address stored for patron. -
  • -
  • -
  • + + No address stored. +
  • + +
  • +
  • + - - No city stored. -
  • -
  • + + No city stored. +
  • +
  • - + + + + + + No phone stored. + + +
  • + + - - - - No phone stored. - - - - - - + + + + No email stored. +
  • Category:
  • -
  • Home Library:
  • +
  • Home Library:
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl index babc73216f..dd27d92f19 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tmpl @@ -182,7 +182,11 @@
- + + + + +
diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 69254fc8e5..0bf24833ce 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -53,6 +53,7 @@ my $basename = $input->param("basename"); my $mime = $input->param("MIME"); my $del = $input->param("sep"); my $output = $input->param("output") || "screen"; +my $src = $input->param("src"); # this param allows us to be told where we were called from -fbcit my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { @@ -65,6 +66,32 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); +warn "Source of call was $src"; + +if ($src eq 'circ') { # if we were called from circulation, use the circulation menu and get data to populate it -fbcit + use C4::Members; + my $borrowernumber = $object; + my $data = GetMember($borrowernumber,'borrowernumber'); + my $picture = GetPatronImage($data->{'cardnumber'}); + $template->param( menu => 1, + title => $data->{'title'}, + initials => $data->{'initials'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + firstname => $data->{'firstname'}, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + phone => $data->{'phone'}, + phonepro => $data->{'phonepro'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + picture => $picture, + ); +} + $template->param( DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), dateformat => C4::Dates->new()->format(), -- 2.20.1