Fix for 6426 - messaging not showing on patron categories

T:T variable name problems were causing the problem.

I used this opportunity to change the way the data is
output: Now the messaging preferences are only output
if there is a current setting.

Also corrected the js table sorter configuration for
the right columns and moved the template-based table
row striping to the tablesorter plugin config.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Owen Leonard 2011-07-13 15:45:38 -04:00 committed by Chris Cormack
parent f4892799e5
commit 4c58011f48

View file

@ -9,7 +9,8 @@
<script type="text/javascript" id="js">$(document).ready(function() { <script type="text/javascript" id="js">$(document).ready(function() {
$("#table_categorie").tablesorter({ $("#table_categorie").tablesorter({
sortList: [[0,0]], sortList: [[0,0]],
headers: { 10: { sorter: false}} widgets: ['zebra'],
headers: { 11: { sorter: false}}
}).tablesorterPager({container: $("#pagertable_categorie"),positionFixed: false,size: 20}); }).tablesorterPager({container: $("#pagertable_categorie"),positionFixed: false,size: 20});
}); </script> }); </script>
[% INCLUDE 'calendar.inc' %] [% INCLUDE 'calendar.inc' %]
@ -300,11 +301,7 @@ Confirm Deletion of Category [% categorycode |html %][% END %]</legend>
<th scope="col" colspan="2">&nbsp; </th> <th scope="col" colspan="2">&nbsp; </th>
</thead> </thead>
[% FOREACH loo IN loop %] [% FOREACH loo IN loop %]
[% UNLESS ( loop.odd ) %]
<tr class="highlight">
[% ELSE %]
<tr> <tr>
[% END %]
<td>[% loo.categorycode |html %]</td> <td>[% loo.categorycode |html %]</td>
<td> <td>
<a href="[% loo.script_name %]?op=add_form&amp;categorycode=[% loo.categorycode |url %]">[% loo.description |html %]</a> <a href="[% loo.script_name %]?op=add_form&amp;categorycode=[% loo.categorycode |url %]">[% loo.description |html %]</a>
@ -332,22 +329,25 @@ Confirm Deletion of Category [% categorycode |html %][% END %]</legend>
<td>[% IF ( loo.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %]</td> <td>[% IF ( loo.hidelostitems ) %]Hidden[% ELSE %]Shown[% END %]</td>
<td>[% loo.reservefee %]</td> <td>[% loo.reservefee %]</td>
[% IF ( EnhancedMessagingPreferences ) %] [% IF ( EnhancedMessagingPreferences ) %]
<td> <td style="white-space: nowrap; font-size:80%;">
[% IF ( loo.messaging_prefs ) %] [% IF ( loo.messaging_prefs ) %]
[% IF ( messaging_preference.Item_Due ) %]Item Due [% FOREACH prefs IN loo.messaging_prefs %]
[% ELSIF ( messaging_preference.Advance_Notice ) %]Advance Notice [% FOREACH transport IN prefs.transports %]
[% ELSIF ( messaging_preference.Upcoming_Events ) %]Upcoming Events [% IF ( transport.transport ) %]
[% ELSIF ( messaging_preference.Hold_Filled ) %]Hold Filled [% IF ( prefs.Item_Due ) %]Item Due
[% ELSIF ( messaging_preference.Item_Check_in ) %]Item Check-in [% ELSIF ( prefs.Advance_Notice ) %]Advance Notice
[% ELSIF ( messaging_preference.Item_Checkout ) %]Item Checkout [% ELSIF ( prefs.Upcoming_Events ) %]Upcoming Events
[% ELSIF ( prefs.Hold_Filled ) %]Hold Filled
[% ELSIF ( prefs.Item_Check_in ) %]Item Check-in
[% ELSIF ( prefs.Item_Checkout ) %]Item Checkout
[% ELSE %]Unknown [% ELSE %]Unknown
[% END %] : [% END %]:
[% FOREACH transport IN messaging_pref.transports %] <strong>[% transport.transport %]</strong><br />
[% transport.transport %] [% ELSE %]None<br />[% END %]
[% END %]
[% END %] [% END %]
<br />
[% ELSE %] [% ELSE %]
none None
[% END %] [% END %]
</td> </td>
[% END %] [% END %]