<?php $titulocabecera = "Secciones de Inicio";if(SYS_ADMIN_PLANTILLA){ ?>
					<!-- begin PAGE TITLE ROW -->
					<div class="row">
						<div class="col-lg-12">
							<div class="page-title">
								<h1><?php echo $titulocabecera; ?></h1>
								<ol class="breadcrumb">
									<li><i class="fa fa-dashboard"></i>  <a href="<?php echo $this->createUrl('dashboard/'); ?>">Dashboard</a></li>
									<li class="active"><?php echo $titulocabecera; ?></li>
								</ol>
							</div>
						</div>
						<!-- /.col-lg-12 -->
					</div>
					<!-- /.row -->
					<!-- end PAGE TITLE ROW -->
<?php }else{ ?>
			<div class="row">
				<div class="col-lg-12">
					<h3 class="page-title" style="margin: 0 0 20px;"><?php echo $titulocabecera; ?><small></small></h3>
					<div class="page-bar">
						<ul class="page-breadcrumb">
							<li><i class="fa fa-dashboard"></i><a href="<?php echo $this->createUrl('dashboard/'); ?>">Inicio</a><i class="fa fa-angle-right"></i></li>
							<li><span><?php echo $titulocabecera; ?></span></li>
						</ul>
					</div>
				</div>
			</div>
<?php } ?>
<!-- begin ADVANCED TABLES ROW -->
<div class="row">
	<div class="col-lg-12">
		<a href="<?php echo $this->createUrl('create');?>"><button class="btn btn-green"><i class="fa fa-plus" style="margin-right:8px"></i>Nuevo</button></a>
		<div style = "margin:15px;"></div>
		<div class="portlet portlet-default">
			<div class="portlet-heading">
				<div class="portlet-title"><h4>Secciones de Inicio</h4></div>
				<div class="clearfix"></div>
			</div>
			<div class="portlet-body">
				<div class="table-responsive">
					<table class="table table-striped table-bordered table-hover table-green">
						<thead>
							<tr>
								<th><?php echo Secciones::model()->getAttributeLabel('orden') ?></th>
								<th><?php echo Secciones::model()->getAttributeLabel('seccion') ?></th>
								<th><?php echo Secciones::model()->getAttributeLabel('contenido') ?></th>
								<th><center>Activo</center></th>
								<th><center>Opciones</center></th>
							</tr>
						</thead>
						<tbody id="secciones-tbody">
							<?php if(isset($model) && !empty($model)){ 
								foreach ($model as $item) { ?>
							<tr>
								<td><?php echo $item->orden?></td>
								<td><?php echo $item->seccion ?></td>
								<td><?php echo Yii::app()->funciones->cortarString($item->contenido,100) ?></td>
								<td>
									<span class="checkslide cambiarActivo" 
										url="<?php echo $this->createUrl('activo',array('id'=>$item->id_seccion)) ?>"
										name="<?php echo $item->seccion; ?>">
										<input type="checkbox" <?php echo ($item->activo == 1)? 'checked': '';?>>
										<label data-on="SI" data-off="NO"></label>
									</span>
								</td>
								<td>
									<div class="tooltip-demo">
										<center>
											<?php if($item->orden != 1){ ?><a href="#" class="orderup" id="<?php echo $item->id_seccion ?>" data-placement="top" data-toggle="tooltip" data-original-title="Subir" style="margin-right:8px;"><i class="fa fa-arrow-up"></i></a><?php } ?>
											<?php if($item->orden != $max){ ?><a href="#" class="orderdown" id="<?php echo $item->id_seccion ?>" data-placement="top" data-toggle="tooltip" data-original-title="Bajar" style="margin-right:8px;"><i class="fa fa-arrow-down"></i></a><?php } ?>
											<a href="<?php echo $this->createUrl('update',array('id'=>$item->id_seccion)) ?>" style="margin-right:8px;" data-placement="top" data-toggle="tooltip" data-original-title="Editar"><span><i class="fa fa-pencil"></i></span></a>
											<a  href="javaScript:void(0)"
												url="<?php echo $this->createUrl('delete',array('id'=>$item->id_seccion)) ?>" 
												class="eliminarRegistro"  
												name="<?php echo $item->seccion ?>"
												data-text = "<?php echo $item->seccion ?>"  
												data-placement="top" data-toggle="tooltip" data-original-title="Eliminar">
												<span><i class="fa fa-trash"></i></span>
											</a>
										</center>
									</div>
								</td>
							</tr>
							<?php }
							} ?>
						</tbody>
					</table>
				</div>
				<!-- /.table-responsive -->
			</div>
			<!-- /.portlet-body -->
		</div>
		<!-- /.portlet -->
	</div>
	<!-- /.col-lg-12 -->
</div>
<!-- /.row -->