<?php 
/********************************************************************************* 
 *  This file is part of Sentrifugo.
 *  Copyright (C) 2014 Sapplica
 *   
 *  Sentrifugo is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Sentrifugo is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Sentrifugo.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Sentrifugo Support <support@sentrifugo.com>
 ********************************************************************************/
?>

<link href="<?php echo SCRIPTS_PATH; ?>dragdrop/inettuts.css" rel="stylesheet" type="text/css" />

    <div class="slidingDiv">
	<?php echo $this->dashboards;?>
	</div>
	
    <div id="head">
        <h1><?php echo $this->dashboard; ?></h1>
        <a class="changeDashboard" href="#">Settings</a>
		
	</div>
<div id="dashboard">
    <div id="columns">
    
    	<?php 
    	$ulone = '<ul "id=column1" class="column">';
    	$ultwo = '<ul "id=column2" class="column">';
    	$ulthree = '<ul "id=column3" class="column">';
    	$i=1;    	
    	foreach($this->widgets as $widget) {
    		switch($i%3){
    			case 1:
    				$ulone .='<li class="widget color-white" id="widget'.$i.'">
    					<div class="widget-head">
                    <h3>'.$widget->getTitle().'</h3>
                </div>
                <div class="widget-content">
                   <iframe src="'.BASE_URL.$widget->getUrl().'" style="width: 100%; height: 100%; border: none;" frameborder="0"></iframe>
                </div>
            </li>'; 
    				break;
    			case 2:
    				$ultwo .='<li class="widget color-white" id="widget'.$i.'">
    					<div class="widget-head">
                    <h3>'.$widget->getTitle().'</h3>
                </div>
                <div class="widget-content">
                    tetset
                </div>
            </li>';     				
    				
    				break;
    			default:
    				$ulthree .='<li class="widget color-white" id="widget'.$i.'">
    					<div class="widget-head">
                    <h3>'.$widget->getTitle().'</h3>
                </div>
                <div class="widget-content">
                   teste
                </div>
            </li>'; 
    				
    				break;
    		}
    		
    		

    		$i++;
    	} 
    	
    	echo $ulone."</ul>".$ultwo."</ul>".$ulthree."</ul>";
    	?>
    </div>
  </div>  
    
    <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="<?php echo SCRIPTS_PATH; ?>dragdrop/jquery-ui-personalized-1.6rc2.min.js"></script>
    <script type="text/javascript" src="<?php echo SCRIPTS_PATH; ?>dragdrop/inettuts.js"></script>
	
	
