2013-10-17 22:57:32 +02:00
< div class = "comment" >
< div class = "avatar" >
<?php if ( $this -> context -> comment -> commenter ) : ?>
< a href = " <?php echo \Chibi\UrlHelper :: route ( 'user' , 'view' , [ 'name' => $this -> context -> comment -> commenter -> name ]) ?> " >
2013-10-17 23:37:41 +02:00
< img src = " <?php echo htmlspecialchars ( $this -> context -> comment -> commenter -> getAvatarUrl ( 40 )) ?> " alt = " <?php echo $this -> context -> comment -> commenter -> name ?: '[deleted user]' ?> " />
2013-10-17 22:57:32 +02:00
< / a >
<?php else : ?>
< img src = " <?php echo \Chibi\UrlHelper :: absoluteUrl ( '/media/img/pixel.gif' ) ?> " alt = "[deleted user]" >
<?php endif ?>
< / div >
< div class = "body" >
< div class = "header" >
< span class = "nickname" >
<?php if ( $this -> context -> comment -> commenter ) : ?>
< a href = " <?php echo \Chibi\UrlHelper :: route ( 'user' , 'view' , [ 'name' => $this -> context -> comment -> commenter -> name ]) ?> " >
<?php echo $this -> context -> comment -> commenter -> name ?>
< / a >
<?php else : ?>
< div class = "nickname" > [deleted user]< / div >
<?php endif ?>
< / span >
< span class = "date" >
<?php echo date ( 'Y-m-d H:i' , $this -> context -> comment -> comment_date ) ?>
< / span >
2013-10-17 23:37:41 +02:00
<?php $secondary = $this -> context -> comment -> commenter -> id == $this -> context -> user -> id ? 'own' : 'all' ?>
<?php if ( PrivilegesHelper :: confirm ( $this -> context -> user , Privilege :: DeleteComment , $secondary )) : ?>
< span class = "delete" >
< a class = "simple-action" 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?" >
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 >