<? $this->load->view( $this->aSystemVar['template_viewer_root'] . 'admin/_header') ?>

	<div class="bigCaption">Categories</div>

	<?= form_open('admin/category_lang', array( 'id' => 'approve_category_form') ); ?>
		<!-- <div class="tableSubmit"><input type="submit" value="submit" class="admSubmit" /></div> -->
		<div><input type="hidden" id="action" name="action" value="" /></div>
		<table cellpadding="0" cellspacing="1" width="100%" class="contentList">

				<tr class="head">
					<td class="id">id</td>
					<td class="checkbox"><input type="checkbox" /></td>
					<td class="title">title</td>
					<? foreach ( $this->aSystemVar['lang_list'] as $aItem ) : ?>
						<td class="textCenter">
							<strong><?=$aItem['Title']?></strong>
						</td>
					<? endforeach; ?>
				</tr>
				<?
				$i = 0;
				foreach( $Category_lang['CategoryList'] as $aCategory ):

					if( ($i%2) == 0 )
					{
						$sClassName = 'odd';
					}
					else
					{
						$sClassName = 'even';
					}
				 ?>
				<tr class="<?= $sClassName ?>">
					<td class="id textCenter">
						<?= $aCategory['Id'] ?>
					</td>
					<td><input type="checkbox" name="CategoryId[]" value="<?= $aCategory['Id'] ?>" id="c<?= $aCategory['Id'] ?>" /></td>
					<td style="padding-left:<?= (4+(20*$aCategory['Sublevel'])) ?>px">
						<span class="<?= $aCategory['Status'] ?>"><?= anchor('admin/category_list/list/' . $aCategory['Id'], $aCategory['Title'] );  ?></span>
					</td>
					<? foreach ( $this->aSystemVar['lang_list'] as $aItem ) : ?>
						<td class="view textCenter" style="font-weight:bold;">
							<? 
								if ( @$Category_lang['LangList'][$aCategory['Id']][$aItem['BaseName']] )
								{
									echo anchor('admin/category_trans/'.$aCategory['Id'].'/'.$aItem['BaseName'], 'ok');
								}
								else
								{
									echo anchor('admin/category_trans/'.$aCategory['Id'].'/'.$aItem['BaseName'], 'no', array('style'=>'color:#ff0000;'));
								}
							?>
						</td>
					<? endforeach; ?>
				</tr>
				<? $i++;

				endforeach; ?>
				
		</table>
		<!-- <div class="tableSubmit"><input type="submit" value="submit" class="admSubmit" /></div> -->
	<?= form_close(); ?>
	
<? $this->load->view( $this->aSystemVar['template_viewer_root'] . 'admin/_footer') ?>