<div class="row">
    <div class="col-lg-12">
        <ol class="breadcrumb">
            <?php      
            $currentAction = '';
            $agregarNuevo = '';
            if($action =='edit'){
                $sizeAction = 'Editar Tamaño ';
                $currentAction = "<li class='active'><i class='fa fa-pencil'></i> ".$_translator->_getTranslation('Editar')."</li>";
                $agregarNuevo = "<a href='Size.php' class='btn btn-sm btn-default'><i class='fa fa-plus'></i> ".$_translator->_getTranslation('Agregar marca')."</a>";
                $agregarNuevo .= '<hr>';
            }elseif($action =='' || $action =='insert'){
                $sizeAction = 'Agregar Tamaño ';
                $currentAction = "<li class='active'><i class='fa fa-plus'></i> ".$_translator->_getTranslation('Agregar')."</li>";
            } ?>
            <li><i class="fa fa-dashboard"></i>  <a href="<?php echo ROOT_HOST?>/Controller/Home.php"><?php echo $_translator->_getTranslation('Home')?></a></li>
            <li class="active"><i class="fa fa-tags"></i> <?php echo $_translator->_getTranslation('Tamaños')?></li>
            <?php echo $currentAction?>
        </ol>
    </div>
</div>
<div class="row">
    <div class="col-lg-12">
        <div id="flashmessenger"><?php $flashmessenger->showMessage();?></div>
        <div class="box">
           <div class="box-header"> 
                <h3><i class='fa-fw fa fa-tags'></i><?php echo $_translator->_getTranslation($sizeAction);?></h3>
                <div class='box-icon'><i class='icon fa fa-tasks'></i></div>
            </div>
            <div class='box-content'>
                <div class="row">
                    <div class="col-md-12 col-xs-12 text-right">
                        <?php echo $agregarNuevo;?>                        
                        <div class="clear"></div>
                    </div> 
                    <?php 
                        echo $_form->openForm();
                        echo $_form->showActionController();
                        echo $_form->showId();
                    ?>
                    <div class="col-lg-6">
                        <?php echo $_form->showElement('descripcion');?>
                       <div class="text-right">
                            <?php $element = $_form->getElement('send'); echo $_form->createOnlyElement($element);?>
                            <?php $element = $_form->getElement('cancelar'); echo $_form->createOnlyElement($element);?>                               
                        </div>
                    </div>      
                    <?php echo $_form->closeForm();?>
                </div>
                <div class="row">
                    <div class="col-lg-12">
                        <hr/>
                        <div class='table-responsive'>
                        <table id="tblTamaños" class="table table-striped table-hover table-condensed">
                            <thead>
                            <th class="text-center col-md-1">Accion</th>
                            <th class="text-center"><?php echo $_translator->_getTranslation('No.');?></th>
                            <th class="text-center"><?php echo $_translator->_getTranslation('Descripcion');?></th>
                            </thead>
                            <tbody>
                            <?php 
                                if($_listaTamanos){
                                    foreach($_listaTamanos as $tamano){?>
                                        <tr>
                                            <td>
                                                <a href="Size.php?action=edit&id=<?php echo $tamano['id']?>"><i class="fa fa-pencil btn btn-sm btn-default"></i></a>
                                                <a onclick="return deleteRegistry('Size.php?action=delete&id=<?php echo $tamano['id']?>')" 
                                               href="#"><i class="fa fa-trash btn btn-sm btn-danger"></i></a>
                                            </td>
                                            <td class="text-center"><?php echo $tamano['id']?></td>
                                            <td class="text-center"><?php echo $tamano['descripcion']?></td>
                                        </tr><?php
                                    }                   
                                }?>
                            </tbody>
                        </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" language="javascript">
	$('#tblTamaños').DataTable({
            paginate:true,
            filter:true,
            pageLength: 100
        });
        $('#tblTamaños')
		.removeClass( 'display' )
		.addClass('table table-striped table-bordered');
</script>