Example #1
0
          <textarea class="form-control" placeholder="扯淡、吐槽、表扬、鼓励……想说啥就说啥!" id="comment" rows="3"></textarea>
          <button class="btn btn-info emotion" type="button"><span class="fa fa-smile-o">&nbsp;添加表情</span></button>
        	<button class="btn btn-success comment-send" type="button" id="addCommentSubmit" onclick="addComment(<?php echo $course->id?>)"><span class="fa fa-send">&nbsp;发表评论</span></button>
        </div>

				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comment-detail">

					<?php $i = 1; foreach (CourseComment::commentList($course->id) as $comment): ?>
						<div class="media col-lg-12 evaluation-con">
						  <div class="media-left media-middle">
						    <a href="#">
						      <img class="media-object img-circle" src="<?php echo User::findModel($comment->user_id)->head_picture?>" alt="" width="60px">
						    </a>
						  </div>
						  <div class="media-body">
						  	<span class="evaluation-name"><?php echo User::findModel($comment->user_id)->username?></span>
						    <h5 class="media-heading evaluation-content" id="comment-content-<?php echo $i?>"><?php echo $comment->content?></h5>
						    <?php if ($comment->course_id == $comment->root_id): ?>
						    	<span class="evaluation-time">时间:<?php echo Common::getAwayTime($comment->comment_time)?></span>
								<?php else: ?>
						    	<span class="evaluation-time">时间:<?php echo Common::getAwayTime($comment->comment_time)?>&nbsp;<a href="/resource/play?id=<?php echo Resource::getVideo($comment->course_id)->url?>">源自:<?php Course::findModel($comment->course_id)->name?></a></span>
						    <?php endif ?>
						    <span class="fa fa-thumbs-o-down comment-down" onclick="commentDown(<?php echo $comment->id?>)"><?php echo $comment->down_count?></span>
						    <span class="fa fa-thumbs-o-up comment-up" onclick="commentUp(<?php echo $comment->id?>)"><?php echo $comment->up_count?></span>
						  </div>
						</div>
					<?php $i++;endforeach ?>