aurweb/web/template/pkg_comments.php
Lukas Fleischer 4a4f26cda6 Use sane date format strings everywhere
We fixed this for the fields displayed on the package details page in
commit b5fffe9a02cd4fd3b7da66e403f02eea89c8fcad. This should fix the
remaining ones.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: canyonknight <canyonknight@gmail.com>
2012-07-06 11:25:50 +02:00

45 lines
1.4 KiB
PHP

<div class="pgbox">
<?php
$uid = uid_from_sid($SID);
while (list($indx, $carr) = each($comments)) { ?>
<div class="comment-header"><?php
if ($SID) {
$carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$carr['UsersID']}\">{$carr['UserName']}</a>";
}
$commentHeader = '<p style="display:inline;">' . __('Comment by: %s on %s', $carr['UserName'], gmdate('Y-m-d H:i', $carr['CommentTS'])) . '</p>';
if (canDeleteCommentArray($carr, $atype, $uid)) {
$durl = '<form method="post" action="packages.php?ID='.$row['ID'].'">';
$durl.= '<fieldset style="display:inline;">';
$durl.= '<input type="hidden" name="action" value="do_DeleteComment" />';
$durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'" />';
$durl.= '<input type="image" src="images/x.png" ';
$durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" ';
$durl.= ' />&nbsp;';
$durl.= '</fieldset>';
$commentHeader = $durl.$commentHeader."</form>";
}
echo $commentHeader;
?></div>
<blockquote class="comment-body">
<div>
<?php echo parse_comment($carr['Comments']) ?>
</div>
</blockquote>
<?php
}
?>
</div>
<?php
$count = package_comments_count(isset($_GET['ID']) ? $_GET['ID'] : pkgid_from_name($_GET['N']));
if ($count > 10 && !isset($_GET['comments'])) {
echo '<div class="pgbox">';
echo '<a href="'. $_SERVER['REQUEST_URI'] . '&amp;comments=all">'. __('Show all %s comments', $count) . '</a>';
echo '</div>';
}
?>