Skip to content

Commit

Permalink
adding a element to show latest comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Feb 23, 2010
1 parent b49ced3 commit 0b5ee46
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions infinitas/management/views/elements/admin/comments/latest.ctp
@@ -0,0 +1,45 @@
<?php
foreach($comments as $comment){
?>
<div class="comment">
<div class="gravitar"><?php echo $this->Gravatar->image($comment['Comment']['email'], array('size' => '50')); ?></div>
<div class="text">
<h3><?php echo $this->Html->link($comment['Comment']['name'], $comment['Comment']['website'], array('target' => '_blank')); ?></h3>
<p><?php echo $comment['Comment']['comment']; ?></p>
<div class="actions">
<?php
$toggleText = $comment['Comment']['active'] ? 'Deactivate' : 'Activate';
echo $this->Html->link(
__($toggleText, true),
array(
'controller' => 'comments',
'action' => 'toggle',
$comment['Comment']['id']
),
array('class' => 'accept')
), ' | ',
$this->Html->link(
__('Reply', true),
array(
'controller' => 'comments',
'action' => 'reply',
$comment['Comment']['id']
),
array('class' => 'reply')
), ' | ',
$this->Html->link(
__('Delete', true),
array(
'controller' => 'comments',
'action' => 'delete',
$comment['Comment']['id']
),
array('class' => 'delete')
);
?>
</div>
</div>
</div>
<?php
}
?>

0 comments on commit 0b5ee46

Please sign in to comment.