Implementation of OPAC Message formatting

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>
This commit is contained in:
Kyle M Hall 2009-09-28 09:45:30 -04:00 committed by Galen Charlton
parent 3bb9de4108
commit 318fd2d57d
2 changed files with 13 additions and 7 deletions

View 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>

View File

@ -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,