<?php
 	/**
 * unit_history_view.php - Unit History
 *
 * @author $Author: dtong $
 * @version $Id: unithistory_list_view.php,v 1.3 2011/04/06 14:03:19 dtong Exp $
 * @copyright Copyright (c) 2009, Tiller Software Co., Ltd.
*/
?>
<?php

$href = base_url();

$sortup_url   = osa_imagepath() . 'arrow_up.gif';
$sortdown_url = osa_imagepath() . 'arrow_down.gif';
$update_url   = base_url().'search/sort/get_history/sort/';

$imgreq	    = 'search.gif';
$img_req  	= "<img src=". osa_imagepath() . "$imgreq    title='Required field'   alt='Required field'    border='0' >";

$url = base_url().'unit/compare/version/' ;
//$div = 'unit_history';
//$formname = 'unit_history_form';
$formname = $display->formname;
$newdiv = 'unit_compare';
$title = lang('unit_compare_title');
//$click_compare = "onClick=\"ajaxPostIframe('$url','$title','900','700','$div','unit_history_form');  return false; \"";
$click_compare = "onClick=\" ajaxPostIframe('$url','$title','1000','800','$newdiv','$formname'); return false; \"";

$alt_sort = lang('unit_history_sort_title');

if (isset($display))
	$display->reset();
?>
<div style="margin-left:10%;margin-right:10%">
<form method="POST" name="<?php echo $formname; ?>" >
<center>
<?php
	if (isset($display->unit)) {
?>
<div style='margin-top:10px;margin-bottom:10px;'>
<div class='unit_history_coursename'><?php echo $display->unit->coursename; ?></div>
<div class='unit_history_unittitle'><?php echo $display->unit->title; ?></div>
</div>
<?php
	}
?>
<div style="margin-bottom:5px">
<input type="button" value="<?php echo lang('unit_history_btncancel'); ?>" name="cancel" <?php osa_btn()?>
	   onClick="closeDhtmlWindow('<?php echo $formname; ?>');" />
<span style="margin-left:30px">&nbsp;</span>
<input type="button" value="<?php echo lang('unit_history_btncompare'); ?>" name="compare" <?php osa_btn()?>
       <?php echo $click_compare ; ?>/>
</div>

<?php
   $display->cssclass_titlerow = 'table_head_col';
   $display->cssclass_datarow1 = 'table_body_row';
   $display->cssclass_datarow2 = 'table_body_row_none';
   //Need to tell which view to load on a full page refresh
   $display->view_file = 'tablelist/unithistory_list_view';
   //Loads the displaylist for the table generation
   //$this->load->view('mapping/display_list_view');
   $display->load_tableview();
?>
<div style="font-size:11px"><?php echo lang('unit_history_footer')?></div>
<div style="margin-top:5px">
<input type="button" value="<?php echo lang('unit_history_btncancel'); ?>" name="cancel" <?php osa_btn()?>
	   onClick="closeDhtmlWindow('<?php echo $formname; ?>');" />
<span style="margin-left:30px">&nbsp;</span>
<input type="button" value="<?php echo lang('unit_history_btncompare'); ?>" name="compare" <?php osa_btn()?>
       <?php echo $click_compare?>/>
</div>
</center>
</form>
</div>