Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding a element to show latest comments
- Loading branch information
1 parent
b49ced3
commit 0b5ee46
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
infinitas/management/views/elements/admin/comments/latest.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
?> |