Description
this template is use for me :)
How to
CSS
tr
{ /* make sure change cursor when over row , it looks like profesional LOL */
cursor: pointer;
cursor: hand;
}
#rowtable:hover
{
background:#a0dfff;
}
#rowtable.clicked
{ /*it means id='rowtable' class='clicked'*/
background:#00bfff;
}
Javascript
$().ready(function(){
$('tr').click(function() {
$(this).removeClass("clicked");
$(this).addClass("clicked").siblings().removeClass("clicked");
});
});
HTML
<div id="container">
<h2 class="page-header">View User</h2>
<div class="pagination pagination-large">
<ul class="pagination">
<?php
echo $this->Paginator->prev(__('prev'), array('tag' => 'li'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a'));
echo $this->Paginator->numbers(array('separator' => '','currentTag' => 'a', 'currentClass' => 'active','tag' => 'li','first' => 1));
echo $this->Paginator->next(__('next'), array('tag' => 'li','currentClass' => 'disabled'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a'));
?>
</ul>
</div>
<table style="margin:0 auto" class="table table-bordered">
<tr>
<th>Username</th>
<th>Fullname</th>
<th>Role</th>
<th>Last Login</th>
<th>Login IP Address</th>
<th>Status</th>
<th>Action</th>
</tr>
<tr id="rowtable">
<td>Admin</td>
<td>Mahendra M.W.</td>
<td>Administrator</td>
<td>10-12-2014</td>
<td>xx.xx.xx.xx</td>
<td>Aktif</td>
<td style="text-align:center">
<a class="btn btn-primary" style="width:80px;">Edit</a>
<a class="btn btn-primary" style="width:80px;">Disabled</a>
</td>
</tr>
<tr>
<th colspan="16" style="text-align:left">
<?php echo 'Page '.$this->Paginator->counter(array(
'separator' => ' of '
));?>
</th>
</tr>
</table>
<?php echo $this->Js->writeBuffer(); ?>
</div>
[Cakephp-Template] table pagination + Jquery + bootstrap
in
cakephp,
Template
- on 10:50:00 AM
- No comments
Post a Comment
Harap gunakan bahasa yang baik dan sopan, terima kasih