Dotclear


Ignore:
Timestamp:
05/02/11 17:54:27 (14 years ago)
Author:
xave <xave@…>
Branch:
userprefs
Children:
111:c9a6e9bc3eed, 149:1b528e6efec0
Message:

Dashboard items div is now hidden when empty.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/index.php

    r106 r109  
    309309 
    310310# Dashboard columns 
    311 echo '<div id="dashboard-items">'; 
     311$dashboardItems = ''; 
    312312 
    313313# Dotclear updates notifications 
     
    318318      
    319319     if ($updater->getNotify() && $new_v) { 
    320           echo 
     320          $dashboardItems .= 
    321321          '<div id="upg-notify" class="static-msg"><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 
    322322          '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 
     
    335335      
    336336     if (count($list) > 0) { 
    337           echo 
     337          $dashboardItems .= 
    338338          '<div id="module-errors" class="error"><p>'.__('Some plugins are installed twice:').'</p> '. 
    339339          '<ul>'.implode("\n",$list).'</ul></div>'; 
     
    343343 
    344344foreach ($__dashboard_items as $i) 
    345 { 
    346      echo '<div>'; 
    347      foreach ($i as $v) { 
    348           echo $v; 
    349      } 
    350      echo '</div>'; 
    351 } 
    352 echo '</div>'; 
     345{     
     346     if ($i->count() > 0) 
     347     { 
     348          $dashboardItems .= '<div>'; 
     349          foreach ($i as $v) { 
     350               $dashboardItems .= $v; 
     351          } 
     352          $dashboardItems .= '</div>'; 
     353     } 
     354} 
     355echo ($dashboardItems ? '<div id="dashboard-items">'.$dashboardItems.'</div>' : ''); 
    353356 
    354357dcPage::close(); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map