<div class="box box-left">
    <div class="title">
        <h5><?php echo $this->__('History');?></h5>
    </div>
    <div class="form">
        <?php if(isset($History) && is_array($History) ):?>
		<?php
			$Grid = App::Module('DataGrid');
			$Grid->setHeader(array('#','DATE', 'TIME', 'PATCH NAME'));
			$Grid->setFooter("Total update : " . (count($History)-1));
			foreach ($History as $key => $val) {
				if($key !=(count($History)-1)){
					$Grid->addRow(($key+1),$val['date'],$val['time'],$val['patch']);
				}
			}
			$Grid->Render();
		?>
		<?php else :?>
		<h3 class="first"> No version update history found</h3>
		<?php endif;?>
    </div>
</div>
<div class="box box-right">
    <div class="title">
        <h5>
			<?php echo $this->__("Setting");?></h5>
    </div>
    <div class="form">
		<?php if(App::Component('Updatemanager')->Helper('Data')->checkNewUpdate()):?>
			<h3 class="first" style="background-color:green;color:white">New Software Update is available (<a style="color:#AAA" href="<?php echo $this->baseUrl("/updatemanager"); ?>"><?php echo App::Config()->setting('last_ready_patch'); ?></a>)</h3> 
		<?php else:?>
			<h3 class="first">No New update available</h3> 
		<?php endif;?>
		<pre class="white_bg">Last Update check date : <?php echo App::Helper('Date')->dateFormated(App::Config()->setting('last_check_date')) ?>  
<a href="<?php echo $this->baseUrl("/updatemanager/history/clearlastcheck"); ?>">Check for update now</a></pre>			
		<form action="<?php echo $this->baseUrl("/updatemanager/history"); ?>" method="post">
            <div class="fields">
                <div class="field ">
                    <div class="label">
                        <label for="input"><?php echo $this->__('Check update on every');?></label>
                    </div>
                    <div class="input">
                       <?php echo App::Helper('Html')->selectTag('data[checkupdate_duration]',array('0'=>'Stop Auto Check','1'=>'Daily','7'=>'Weekly','30'=>'Monthly'),App::Config()->setting('checkupdate_duration','1'),null,array('off_blank'=>'Yes')); ?>
                    </div>
                </div>	
                <div class="field ">
                    <div class="label">
                        <label for="input"><?php echo $this->__('Update Check Repository');?></label>
                    </div>
                    <div class="input">
                       <?php echo App::Helper('Html')->inputTag('data[checkupdate_repo_uri]',App::Config()->setting('checkupdate_repo_uri',Component_updatemanager_Helpers_Data::REPO_CHECK_URI),array('class'=>'large')); ?>
                    </div>
                </div>	
                <div class="field ">
                    <div class="label">
                        <label for="input"><?php echo $this->__('Show Dashboard Widget');?></label>
                    </div>
                    <div class="input">
                       <?php echo App::Helper('Html')->selectTag('data[update_manager_history_widget]',array('Yes'=>'Yes','No'=>'No'),App::Config()->setting('update_manager_history_widget','Yes'),null,array('off_blank'=>'Yes')); ?>
                    </div>
                </div>	
				<div class="field ">
                    <div class="label">
                        <label for="input"><?php echo $this->__('Disable Dashboard Notification');?></label>
                    </div>
                    <div class="input">
                       <?php echo App::Helper('Html')->selectTag('data[update_manager_disable_notification]',array('Yes'=>'Yes','No'=>'No'),App::Config()->setting('update_manager_disable_notification','No'),null,array('off_blank'=>'Yes')); ?>
                    </div>
                </div>					
                <div class="buttons">
                    <input type="submit" name="submit" value="SAVE"/>
                </div>
            </div>
        </form>
    </div>
</div>
<br class="clearboth" />

