[Koha-cvs] koha koha-tmpl/opac-tmpl/prog/en/opac-user.tmpl... [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Fri Dec 8 17:33:51 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/12/08 16:33:51

Modified files:
	koha-tmpl/opac-tmpl/prog/en: opac-user.tmpl 
	opac           : opac-user.pl 

Log message:
	some display enhancement and corrections.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/opac-tmpl/prog/en/opac-user.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.5&r2=1.1.2.6
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-user.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.23.2.3&r2=1.23.2.4

Patches:
Index: koha-tmpl/opac-tmpl/prog/en/opac-user.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/opac-tmpl/prog/en/opac-user.tmpl,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -b -r1.1.2.5 -r1.1.2.6
--- koha-tmpl/opac-tmpl/prog/en/opac-user.tmpl	7 Dec 2006 15:42:15 -0000	1.1.2.5
+++ koha-tmpl/opac-tmpl/prog/en/opac-user.tmpl	8 Dec 2006 16:33:51 -0000	1.1.2.6
@@ -7,14 +7,15 @@
 <!-- TMPL_INCLUDE name="masthead.inc" -->
 <!-- TMPL_INCLUDE name="navigation.inc" -->
 
+<!-- TMPL_INCLUDE name="usermenu.inc" -->
 <!-- CONTENT -->
     <!-- TMPL_LOOP NAME="BORROWER_INFO" -->
+        <br />
         <h2 style="display:inline;">
             Welcome <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> 
         </h2>
         (<a href="/cgi-bin/koha/opac-logout.pl">Click here</a> if you're not <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->)
         <br /><br />
-        <!-- TMPL_INCLUDE name="usermenu.inc" -->
         <!-- TMPL_IF name="textmessaging"-->
             <h3>Message from the library</h3>
             <p><!-- TMPL_VAR name="textmessaging" --></p>
@@ -64,6 +65,7 @@
     <!-- /TMPL_LOOP -->
 
     <!-- TMPL_IF NAME="waiting_count" -->
+    <!-- TMPL_IF NAME="atdestination" -->
     <h3>Reserved Items Waiting</h3>
         <table>
             <tr>
@@ -72,21 +74,33 @@
                 <th>Pick Up Branch</th>
             </tr>
             <!-- TMPL_LOOP NAME="WAITING" -->
-                <!-- TMPL_IF NAME="atdestination" --><tr>
-                <td><img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" /></td>
+                <tr>
+                    <td>
+                        <img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
+                    </td>
+                    <td>
+                        <a href="opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
+                            <!-- TMPL_VAR NAME="waiting_title" -->
+                        </a>
+                        <span class="item-details">
+                            <!-- TMPL_VAR NAME="author" -->
+                        </span>
+                    </td>
+                    <td>
+                        <!-- TMPL_VAR NAME="reservedate" -->
+                    </td>
                     <td>
-                        <a href="opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="btitle" --></a><span class="item-details">
-    <!-- TMPL_VAR NAME="author" --></span></td><td><!-- TMPL_VAR NAME="reservedate" --></td><td><!-- TMPL_IF NAME="atdestination" -->
+                        <!-- TMPL_IF NAME="atdestination" -->
                     <strong>Waiting</strong> at <!-- TMPL_VAR Name="branch" -->
                     <!-- TMPL_ELSE -->
                     In transit from <!-- TMPL_VAR NAME="holdingbranch" --> to <!-- TMPL_VAR Name="branch" -->
-                    <!-- /TMPL_IF --></td>
-                </tr><!-- /TMPL_IF -->
+                        <!-- /TMPL_IF -->
+                    </td>
+                </tr>
             <!-- /TMPL_LOOP -->
         </table>
     <!-- /TMPL_IF -->
-
-
+    <!-- /TMPL_IF -->
 
     <!-- TMPL_IF NAME="issues_count" -->
         <h3>Issues (<!-- TMPL_VAR NAME="issues_count" --> total)</h3>
@@ -105,7 +119,11 @@
                 <tr>
             <!-- /TMPL_IF -->
                 <td>
-                    <img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->" />
+                    <!-- TMPL_IF name="imageurl" -->
+                        <img src="<!-- TMPL_VAR name="imageurl" -->" title="<!-- TMPL_VAR name="description" -->"/>
+                    <!-- TMPL_ELSE -->
+                        <!-- TMPL_VAR name="description" -->
+                    <!-- /TMPL_IF -->
                 </td>
                 <td>
                     <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>

Index: opac/opac-user.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-user.pl,v
retrieving revision 1.23.2.3
retrieving revision 1.23.2.4
diff -u -b -r1.23.2.3 -r1.23.2.4
--- opac/opac-user.pl	8 Dec 2006 11:24:58 -0000	1.23.2.3
+++ opac/opac-user.pl	8 Dec 2006 16:33:51 -0000	1.23.2.4
@@ -15,7 +15,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: opac-user.pl,v 1.23.2.3 2006/12/08 11:24:58 toins Exp $
+# $Id: opac-user.pl,v 1.23.2.4 2006/12/08 16:33:51 toins Exp $
 
 use strict;
 require Exporter;
@@ -27,7 +27,7 @@
 use C4::Reserves2;
 use C4::Members;
 use C4::Interface::CGI::Output;
-use HTML::Template;
+use C4::Biblio;
 use C4::Date;
 use C4::Letters;
 
@@ -81,6 +81,9 @@
 my $overdues_count = 0;
 my @overdues;
 my @issuedat;
+my $imgdir = getitemtypeimagesrc();
+my $itemtypes = GetItemTypes();
+#warn "" . Data::Dumper::Dumper($issues);
 foreach my $key ( keys %$issues ) {
     my $issue = $issues->{$key};
     $issue->{'date_due'} = format_date( $issue->{'date_due'} );
@@ -122,6 +125,12 @@
     else {
         $issue->{'issued'} = 1;
     }
+    # imageurl:
+    my $itemtype = $issue->{'itemtype'};
+    if ( $itemtype ) {
+        $issue->{'imageurl'}    = $imgdir."/".$itemtypes->{$itemtype}->{'imageurl'};
+        $issue->{'description'} = $itemtypes->{$itemtype}->{'description'};
+    }
     push @issuedat, $issue;
     $count++;
 }
@@ -142,6 +151,8 @@
     $res->{$publictype} = 1;
     $res->{'waiting'} = 1 if $res->{'found'} eq 'W';
     $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
+    my $biblioData = GetBiblioData($res->{'biblionumber'});
+    $res->{'reserves_title'} = $biblioData->{'title'};
 }
 
 $template->param( RESERVES       => $reserves );
@@ -158,10 +169,13 @@
         if ( $res->{'holdingbranch'} eq $res->{'branch'} ) {
             $res->{'atdestination'} = 1;
         }
+        my $biblioData = GetBiblioData($res->{'biblionumber'});
+        $res->{'waiting_title'} = $biblioData->{'title'};
         push @waiting, $res;
         $wcount++;
     }
 }
+
 $template->param( WAITING => \@waiting );
 
 # current alert subscriptions





More information about the Koha-cvs mailing list