Commit 9d898e13 authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'permission93' into 'master-cakephp'

Permission93

Please accept permission93

See merge request !375
parents 42d8c58b 3e1047c5
......@@ -2,8 +2,22 @@
body {
padding-top: 50px;
}
.pagination .current a {
background-color: #EEEEEE;
}
</style>
<script type="text/javascript">
function confirmDelete(msg, link)
{
if (confirm(msg)) {
location.href = link;
} else {
return false;
}
}
</script>
<div style="padding: 15px 15px">
<div class="row"><?php echo $this->element('left_panel'); ?>
<div class="col-md-10"><legend><?php echo __('Realm Members List'); ?></legend>
......@@ -31,19 +45,30 @@ body {
<td>
<?php
if ($this->Access->check($groupName, 'RealmMembersDelete')) {
echo $this->Html->image(
"/resources/custom/images/silk/icons/table_delete.png",
array(
"alt" => "Delete",
"url" => array(
'controller' => 'realm_members',
'action' => 'remove',
$realmMember['RealmMember']['ID'],
$realmID
),
"title" => "Remove member"
)
);
?>
<a href="#" onclick="return confirmDelete(
'Are you sure you want to delete.',
'<?php
echo $this->Html->url(
array(
'controller' => 'realm_members',
'action' => 'remove',
$realmMember['RealmMember']['ID'],
$realmID
)
); ?>'
)">
<?php
echo $this->Html->image(
"/resources/custom/images/silk/icons/table_delete.png",
array(
"alt" => "Delete",
"title" => "Delete member"
)
);
?>
</a>
<?php
}
?>
</td>
......@@ -60,26 +85,39 @@ body {
)
);
if ($total > 1) {
echo $this->Paginator->prev(
'<<',
null,
null,
array(
'class' => 'disabled'
)
);
echo $this->Paginator->numbers();
// Shows the next and previous links.
echo $this->Paginator->next(
'>>',
null,
null,
array(
'class' => 'disabled'
)
);
// Prints X of Y, where X is current page and Y is number of pages.
?>
<ul class="pagination">
<?php
if ($this->Paginator->first()) {
echo $this->Paginator->first('First', array('tag' => 'li'), null, null);
} else {
echo '<li class="disabled"><a href="#">First</a></li>';
}
if ($this->Paginator->hasPrev()) {
echo $this->Paginator->prev('&laquo;', array('tag' => 'li', 'escape' => false), null, null);
} else {
echo '<li class="disabled"><a href="#">&laquo;</a></li>';
}
echo $this->Paginator->numbers(array('separator' => false, 'tag' => 'li', 'currentTag' => 'a'));
if ($this->Paginator->hasNext()) {
echo $this->Paginator->next('&raquo;', array('tag' => 'li', 'escape' => false), null, null);
} else {
echo '<li class="disabled"><a href="#">&raquo;</a></li>';
}
if ($this->Paginator->last()) {
echo $this->Paginator->last('Last', array('tag' => 'li'), null, null);
} else {
echo '<li class="disabled"><a href="#">Last</a></li>';
}
echo "<span style='margin-left:20px;'>Page : ".$this->Paginator->counter()."</span>";
?>
</ul>
<?php
}
?>
</td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment