photo/application/views/translate.php
2014-06-30 14:22:57 +10:00

34 lines
1.1 KiB
PHP

<?php $pag = new Pagination(array('total_items'=>$o->count(),'items_per_page'=>10)); ?>
<?php echo (string)$pag; ?>
<?php echo Form::hidden('page',$pag->current_page()); ?>
<table class="table table-striped table-condensed table-hover" id="list-table">
<thead><tr>
<th>Text</th>
<th>Translation</th>
<th>Ignore</th>
</tr></thead>
<tbody>
<?php $i=0;foreach ($o as $oo) : ?>
<?php
if (++$i < $pag->current_first_item())
continue;
elseif ($i > $pag->current_last_item())
break;
?>
<?php while (preg_match('/</',$oo->sentence) OR preg_match('/>/',$oo->sentence)) :
$oo->sentence = preg_replace('/</','&lt',$oo->sentence);
$oo->sentence = preg_replace('/>/','&gt',$oo->sentence);
endwhile
?>
<tr>
<td width="49%"><?php echo $oo->sentence; ?></td>
<td width="49%"><?php echo Form::input(sprintf('x[%s]',$oo->id),$oo->translation,array('style'=>'width: 100%;')); ?></td>
<!-- <td><?php echo Form::checkbox('ignore',FALSE); ?></td> -->
</tr>
<?php endforeach ?>
</tbody>
</table>