Some refactoring
[timetracker.git] / WEB-INF / templates / header.tpl
index 2d3bb20..3affffc 100644 (file)
@@ -55,7 +55,7 @@ With 101% height we essentially force the scrollbar to always appear. -->
         </tr>
       </table>
       <!-- End of top image -->
-      
+
 {if $authenticated}
   {if $user->isAdmin()}
       <!-- Top menu for admin -->
@@ -160,11 +160,11 @@ With 101% height we essentially force the scrollbar to always appear. -->
       <!-- End of page title and user details -->
 
       <!-- Output errors -->
-{if !$errors->isEmpty()}
+{if $err->yes()}
       <table cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
         <tr>
           <td class="error">
-  {foreach $errors->getErrors() as $error}
+  {foreach $err->getErrors() as $error}
             {$error.message}<br> {* No need to escape as they are not coming from user and may contain a link. *}
   {/foreach}
           </td>
@@ -174,15 +174,15 @@ With 101% height we essentially force the scrollbar to always appear. -->
       <!-- End of output errors -->
 
       <!-- Output messages -->
-{if !$messages->isEmpty()}
+{if $msg->yes()}
       <table cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
         <tr>
           <td class="info_message">
-  {foreach $messages->getErrors() as $message}
+  {foreach $msg->getErrors() as $message}
             {$message.message}<br> {* No need to escape. *}
   {/foreach}
           </td>
         </tr>
       </table>
 {/if}
-      <!-- End of output messages -->
\ No newline at end of file
+      <!-- End of output messages -->