2013-10-17 22:57:32 +02:00
< div class = "comment" >
< div class = "avatar" >
2013-12-18 15:10:53 +01:00
<?php $commenter = $this -> context -> comment -> getCommenter () ?>
<?php if ( $commenter ) : ?>
< a href = " <?php echo \Chibi\UrlHelper :: route ( 'user' , 'view' , [ 'name' => $commenter -> name ]) ?> " >
< img src = " <?php echo htmlspecialchars ( $commenter -> getAvatarUrl ( 40 )) ?> " alt = " <?php echo $commenter -> name ?> " />
2013-10-17 22:57:32 +02:00
< / a >
<?php else : ?>
2013-12-18 15:10:53 +01:00
< img src = " <?php echo \Chibi\UrlHelper :: absoluteUrl ( '/media/img/pixel.gif' ) ?> " alt = " <?php echo UserModel :: getAnonymousName () ?> " >
2013-10-17 22:57:32 +02:00
<?php endif ?>
< / div >
< div class = "body" >
< div class = "header" >
< span class = "nickname" >
2013-12-18 15:10:53 +01:00
<?php if ( $commenter ) : ?>
< a href = " <?php echo \Chibi\UrlHelper :: route ( 'user' , 'view' , [ 'name' => $commenter -> name ]) ?> " >
<?php echo $commenter -> name ?>
2013-10-17 22:57:32 +02:00
< / a >
<?php else : ?>
2013-12-18 15:10:53 +01:00
<?php echo UserModel :: getAnonymousName () ?>
2013-10-17 22:57:32 +02:00
<?php endif ?>
< / span >
< span class = "date" >
2013-12-18 15:10:53 +01:00
<?php echo date ( 'Y-m-d H:i' , $this -> context -> comment -> commentDate ) ?>
2013-10-17 22:57:32 +02:00
< / span >
2013-10-17 23:37:41 +02:00
2013-12-18 15:10:53 +01:00
<?php if ( PrivilegesHelper :: confirm ( Privilege :: DeleteComment , PrivilegesHelper :: getIdentitySubPrivilege ( $commenter ))) : ?>
2013-10-17 23:37:41 +02:00
< span class = "delete" >
2013-11-30 14:22:49 +01:00
< a class = "simple-action confirmable" href = " <?php echo \Chibi\UrlHelper :: route ( 'comment' , 'delete' , [ 'id' => $this -> context -> comment -> id ]) ?> " data-confirm-text = "Are you sure you want to delete this comment?" >
2013-10-17 23:37:41 +02:00
delete
< / a >
< / span >
<?php endif ?>
2013-10-17 22:57:32 +02:00
< / div >
< div class = "content" >
<?php echo $this -> context -> comment -> getText () ?>
< / div >
< / div >
< div class = "clear" > < / div >
< / div >