Small template cleanup: display library name and cat description instead of codes
authorRyan Higgins <rch@liblime.com>
Tue, 22 Apr 2008 22:46:22 +0000 (17:46 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 22 Apr 2008 22:54:19 +0000 (17:54 -0500)
in circ-menu include.  Also, change 'Default' on main login page to 'My Library'.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
circ/circulation.pl
koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/auth.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tmpl
members/boraccount.pl
members/moremember.pl
members/readingrec.pl
tools/viewlog.pl

index 9540a6e..390370d 100755 (executable)
@@ -652,6 +652,7 @@ $template->param(
     borrower                    => $borrower,
     borrowernumber              => $borrowernumber,
     branch                      => $branch,
+    branchname                  => GetBranchName($branch),
     printer                     => $printer,
     printername                 => $printer,
     firstname                   => $borrower->{'firstname'},
@@ -659,6 +660,7 @@ $template->param(
        dateexpiry => format_date($newexpiry),
     expiry                      => format_date($borrower->{'dateexpiry'}),
     categorycode      => $borrower->{'categorycode'},
+    categoryname      => $borrowercategory->{description},
     address     => $borrower->{'address'},
     address2     => $borrower->{'address2'},
     email      => $borrower->{'email'},
index 3f69347..b8b6238 100644 (file)
@@ -47,8 +47,8 @@
             <li> <span class="problem">No email stored.</span>    </li>
         <!-- /TMPL_IF -->
     <!-- /TMPL_IF -->
-    <li>Category: <!-- TMPL_VAR name="categorycode" --></li>
-    <li>Home Library: <!-- TMPL_IF NAME="branchcode" --><!-- TMPL_VAR NAME="branchcode" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="branch" --><!-- /TMPL_IF --></li>
+    <li>Category: <!-- TMPL_VAR NAME="categoryname" --> (<!-- TMPL_VAR NAME="categorycode" -->) 
+    <li>Home Library: <!-- TMPL_IF NAME="branchname" --><!-- TMPL_VAR NAME="branchname" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="branch" --><!-- /TMPL_IF --></li>
 </ul></div>
 <div id="menu">
 <ul>
index 99fd20a..3e56cab 100644 (file)
@@ -51,7 +51,7 @@
 <!-- TMPL_IF NAME="IndependantBranches" --><!-- TMPL_ELSE -->
 <p><label for="branch">Library:</label>
     <select name="branch" id="branch" class="input" tabindex="3">
-    <option value="">Default</option>
+    <option value="">My Library</option>
     <!-- TMPL_LOOP NAME="branchloop" -->
     <option value="<!-- TMPL_VAR NAME='branchcode' -->"><!-- TMPL_VAR NAME='branchname' --></option>
     <!-- /TMPL_LOOP -->
index c94d2a5..a0d3b33 100644 (file)
@@ -57,7 +57,7 @@
     <th><a href="member.pl?member=<!--TMPL_VAR Name="member" -->&amp;orderby=cardnumber">Card</a></th>
     <th><a href="member.pl?member=<!--TMPL_VAR Name="member" -->&amp;orderby=surname">Name</a></th>
     <th><a href="member.pl?member=<!--TMPL_VAR Name="member" -->&amp;orderby=borrowers.categorycode">Cat</a></th>
-    <th><a href="member.pl?member=<!--TMPL_VAR Name="member" -->&amp;orderby=branchcode">Branch</a></th>
+    <th><a href="member.pl?member=<!--TMPL_VAR Name="member" -->&amp;orderby=branchcode">Library</a></th>
     <th>Expires on</th>
     <th>OD/Issues</th>
     <th>Fines</th>
index fa133d4..6617e84 100755 (executable)
@@ -28,7 +28,7 @@ use C4::Output;
 use C4::Dates qw/format_date/;
 use CGI;
 use C4::Members;
-
+use C4::Branch;
 
 my $input=new CGI;
 
@@ -101,7 +101,8 @@ $template->param(
     cardnumber          => $data->{'cardnumber'},
     categorycode        => $data->{'categorycode'},
     category_type       => $data->{'category_type'},
-    category_description => $data->{'description'},
+ #   category_description => $data->{'description'},
+    categoryname                => $data->{'description'},
     address             => $data->{'address'},
     address2            => $data->{'address2'},
     city                => $data->{'city'},
@@ -109,6 +110,7 @@ $template->param(
     phone               => $data->{'phone'},
     email               => $data->{'email'},
     branchcode          => $data->{'branchcode'},
+       branchname                      => GetBranchName($data->{'branchcode'}),
     total               => sprintf("%.2f",$total),
     totalcredit         => $totalcredit,
     accounts            => \@accountrows );
index de5a6a5..22a56ef 100755 (executable)
@@ -340,6 +340,7 @@ $template->param(
   DHTMLcalendar_dateformat=>C4::Dates->DHTMLcalendar(), 
     roaddetails      => $roaddetails,
     borrowernumber   => $borrowernumber,
+    categoryname       => $borrowercategory->{description},
     reregistration   => $reregistration,
     branch          => $branch,        
     totalprice       => sprintf( "%.2f", $totalprice ),
index e47b5f6..5d737d1 100755 (executable)
@@ -25,6 +25,7 @@ use C4::Auth;
 use C4::Output;
 use CGI;
 use C4::Members;
+use C4::Branch;
 
 use C4::Dates qw/format_date/;
 my $input=new CGI;
@@ -98,7 +99,8 @@ $template->param(
                                                cardnumber => $data->{'cardnumber'},
                                            categorycode => $data->{'categorycode'},
                                            category_type => $data->{'category_type'},
-                                           category_description => $data->{'description'},
+                                          # category_description => $data->{'description'},
+                                           categoryname        => $data->{'description'},
                                            address => $data->{'address'},
                                                address2 => $data->{'address2'},
                                            city => $data->{'city'},
@@ -106,6 +108,7 @@ $template->param(
                                                phone => $data->{'phone'},
                                                email => $data->{'email'},
                                                branchcode => $data->{'branchcode'},
+                                               branchname => GetBranchName($data->{'branchcode'}),
                                                showfulllink => ($count > 50),                                  
                                                loop_reading => \@loop_reading);
 output_html_with_http_headers $input, $cookie, $template->output;
index 737e73e..f9c5952 100755 (executable)
@@ -27,6 +27,7 @@ use C4::Dates;
 use C4::Output;
 use C4::Log;
 use C4::Items;
+use C4::Branch;
 use Data::Dumper;
 
 use vars qw($debug);
@@ -83,6 +84,7 @@ if ($src eq 'circ') {   # if we were called from circulation, use the circulatio
                         firstname       => $data->{'firstname'},
                         cardnumber      => $data->{'cardnumber'},
                         categorycode    => $data->{'categorycode'},
+                        categoryname   => $data->{'description'},
                         address         => $data->{'address'},
                         address2        => $data->{'address2'},
                         city            => $data->{'city'},
@@ -90,6 +92,7 @@ if ($src eq 'circ') {   # if we were called from circulation, use the circulatio
                         phonepro        => $data->{'phonepro'},
                         email           => $data->{'email'},
                         branchcode      => $data->{'branchcode'},
+                        branchname             => GetBranchName($data->{'branchcode'}),
     );
 }