Implementation of OPAC Message formatting
authorKyle M Hall <kyle.m.hall@gmail.com>
Mon, 28 Sep 2009 13:45:30 +0000 (09:45 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Tue, 29 Sep 2009 23:20:48 +0000 (19:20 -0400)
This patch implements the suggestions about the new and old message system made by Owen Leonard.

Includes type fix pointed out by Owen.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
opac/opac-user.pl

index 77ee406..62b6ff4 100644 (file)
@@ -81,8 +81,13 @@ $.tablesorter.addParser({
                       <h3>Messages For You</h3>
                       <ul>
                               <!--TMPL_LOOP NAME="bor_messages_loop" -->
-                                      <li>On <!--TMPL_VAR NAME="message_date_formatted"--> <!--TMPL_VAR NAME="branchname"--> wrote <i>"<!--TMPL_VAR NAME="message"-->"</i></li>
+                                       <li>
+                                               <strong><!--TMPL_VAR NAME="message"--></strong><br>
+                                               &nbsp;&nbsp;&nbsp;<i>Written on <!--TMPL_VAR NAME="message_date_formatted"--> by <!--TMPL_VAR NAME="branchname"--></i>
+                                       </li>
                                <!-- /TMPL_LOOP -->
+
+                               <!-- TMPL_IF NAME="opacnote" --><li><!-- TMPL_VAR name="opacnote" --></li><!-- /TMPL_IF -->
                       </ul>
               </div>
        <!-- /TMPL_IF -->
@@ -92,12 +97,6 @@ $.tablesorter.addParser({
                <!-- TMPL_IF NAME="patronupdate" --><div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div><!-- /TMPL_IF -->
                
 
-        <!-- TMPL_IF NAME="opacnote"-->
-               <div class="dialog message">
-            <h3>Message from the library</h3>
-            <p><!-- TMPL_VAR name="opacnote" --></p>
-               </div>
-        <!-- /TMPL_IF -->
         <!-- TMPL_IF NAME="flagged" -->
                <div class="dialog alert">
         <ul>
index 487c136..b61ad37 100755 (executable)
@@ -270,6 +270,13 @@ if ( GetMessagesCount( $borrowernumber, 'B' ) ) {
        $template->param( bor_messages => 1 );
 }
 
+if ( $borr->{'opacnote'} ) {
+  $template->param( 
+    bor_messages => 1,
+    opacnote => $borr->{'opacnote'},
+  );
+}
+
 $template->param(
     bor_messages_loop  => GetMessages( $borrowernumber, 'B', 'NONE' ),
     waiting_count      => $wcount,