Bug 10907: (follow-up) fix table sorting
authorGalen Charlton <gmc@esilibrary.com>
Thu, 23 Jan 2014 18:32:06 +0000 (18:32 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 23 Jan 2014 18:32:06 +0000 (18:32 +0000)
This patch fixes a problem wherein table sorting did not work if
OpacSuggestionManagedBy was off.

As a matter of style, this patch also modifies the (Boolean) syspref
check to be just:

[% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt
koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt

index fa89078..44ecf6f 100644 (file)
                                                 <th>Summary</th>
                                                 <th>Note</th>
                                                 [% IF Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 %]<th>Suggested for</th>[% END %]
-                                                [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) == 1 %]<th>Managed by</th>[% END %]
+                                                [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]<th>Managed by</th>[% END %]
                                                 <th>Status</th>
                                             </tr>
                                         </thead>
                                                             [% END %]
                                                         </td>
                                                     [% END %]
-                                                    [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) == 1 %]
+                                                    [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]
                                                     <td>
                                                         [% IF ( suggestions_loo.surnamemanagedby ) %]
                                                             <span class="tdlabel">Managed by:</span>
                 { "sType": "anti-the" },
                 null,
                 [% IF ( OPACViewOthersSuggestions ) %]null,[% END %]
-                null,
+                [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]null,[% END %]
                 null
             ]
         }));
index 61de641..8c62c7b 100644 (file)
@@ -31,7 +31,7 @@
                     { "sType": "anti-the" },
                     null,
                     [% IF ( OPACViewOthersSuggestions ) %]null,[% END %]
-                    null,
+                    [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]null,[% END %}
                     null
                 ]
             }));
             <th>Summary</th>
             <th>Note</th>
             [% IF ( OPACViewOthersSuggestions ) %]<th>Suggested for</th>[% END %]
-            [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) == 1 %]<th>Managed by</th>[% END %]
+            [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]<th>Managed by</th>[% END %]
             <th>Status</th>
         </tr></thead>
         <tbody>[% FOREACH suggestions_loo IN suggestions_loop %]
                 [% IF ( OPACViewOthersSuggestions ) %]<td>
                     [% IF ( suggestions_loo.branchcodesuggestedby ) %][% suggestions_loo.branchcodesuggestedby %][% ELSE %]&nbsp;[% END %]
                 </td>[% END %]
-                [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) == 1 %]
+                [% IF Koha.Preference( 'OpacSuggestionManagedBy' ) %]
                 <td>
                                        [% IF ( suggestions_loo.surnamemanagedby ) %][% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby %][% ELSE %]&nbsp;[% END %]
                 </td>