<h3>Комментарии:</h3>
<?php
self::addStyle('/css/comments.css');
self::addScript('/js/comment.js');

$comments = Comment::model()->getAll(array('where'=>'`parentType`="'.$parentType.'" AND `parentId`="'.$parentId.'"'));

if($comments) {
	foreach ($comments as $comment) {
		self::renderPartial('comments/comment.php',array('comment'=>$comment));
	}
} else {
	print 'Ваш комментарий может стать первым!';
}

if (App::$user) {
	self::renderPartial('comments/form.php',array('parentId'=>$parentId, 'parentType' => $parentType));
} else {
	self::renderPartial('comments/deny.php', array());
}
