<?php
include "top.php";
?> 
<div class="content-wrapper"> 
<section class="content-header sty-one">
<h1>templates <small><?php echo $this->Paginator->counter('{{count}} record(s)');?> </small></h1>
<ol class="breadcrumb">
<li><?php echo $this->Html->link('<i class="fa fa-home"></i>Home', array('controller'=>'Pages','action'=>'templates'),array('escape' => false));?></li>
<li><i class="fa fa-angle-right"></i> templates</li>
</ol>
</section>

<section class="content">
<div class="panel-heading">
<div class="btn"><?php echo $this->Html->link('Add New',array('controller'=>'marketings','action'=>'templatesadd'),array('escape'=>false));?></div>

</div>


<table class="table">
<tr>
<th>ID</th>
<th>NAME</th>
<th>CREATED</th>
<th>MODIFIED</th>
<th>ACTION</th>
</tr>
<?php
$i=1;
foreach($querypages as $value)
{	
?>
<tr>
<td><?php echo $i++;?></td>
<td><?php echo $value['name'];?></td>
<td><?php echo date_format($value['createdate'],'Y-m-d');?></td>
<td><?php echo date_format($value['modifieddate'],'Y-m-d');?></td>
<td>
<?php echo $this->Html->link('<i class="fa fa-pencil"></i>',array('controller'=>'marketings','action'=>'templatesedit',$value['id']),array('class'=>'btn','escape'=>false));?>
<?php echo $this->Html->link('<i class="fa fa-search"></i>','https://www.hindsparrow.com/adminarea/emails/sendnewsletter/'.$value['id'],array('target'=>'_blank','class'=>'btn','escape'=>false));?>
<?php echo $this->Html->link('<i class="fa fa-trash"></i>', array('pages'=>'marketings','action'=>'templatesremove',$value['id']),array("onclick"=>"return deleterecord('templatesremove/$value[id]')",'class'=>'btn','escape' => false));?>
</td>
</tr>
<?php
}
?>
</table>


<div class="pagination-panel">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="pagination">
<?php echo $this->Paginator->first('First',array('currentTag'=>'a','escape' => false));?>
<?php echo $this->Paginator->numbers();?>
<?php echo $this->Paginator->last('Last', array('currentTag' => 'a', 'escape' => false));?>
</div>
</div>
</div>
</div>
</div>

</section>
</div>
<?php
include "footer.php";
?>