コード例 #1
0
ファイル: qa.php プロジェクト: songwanfu/SummerNut
							  </div>
							  <div class="panel-body">
							    <span>[最新回答] <?php echo empty(Answer::replyLatest($question->id)->content) ? '暂无' : Answer::replyLatest($question->id)->content?></span>
							    <a href="/course/qadetail?qid=<?php echo $question->id?>"><span class="fa fa-comments comment-down"><?php echo count(Answer::replyList($question->id))?></span></a>
							    <a href="/course/qadetail?qid=<?php echo $question->id?>"><span class="fa fa-eye comment-up"><?php echo $question->views?></span></a>
							  </div>
							</div>
						<?php endforeach ?>
					<?php else: ?>
					  <div class="alert alert-warning" role="alert"><?php echo Yii::t('app', 'No more questions.');?></div>
					<?php endif ?>
					
				</section>
				<section id="section-reply">
					<?php if (Answer::myReplyList($user->id)): ?>
						<?php foreach (Answer::myReplyList($user->id) as $reply): ?>
						  <div class="alert alert-success" role="alert">
						  	<span>[回复<a href="#"><?php echo User::findModel($reply->answered_user_id)->username?>]</a>:<?php echo $reply->content?></span>
						  	<a href="/course/qadetail?qid=<?php echo $reply->question_id?>"><span class="fa fa-eye" style="float: right;margin-left: 5px"></span></a>
						  	<span class="zone-reply-time"><?php echo Common::getAwayTime($reply->create_time)?></span>
						  </div>
						<?php endforeach ?>
					<?php else: ?>
						<div class="alert alert-warning" role="alert"><?php echo Yii::t('app', 'No more answers.');?></div>
					<?php endif ?>
				</section>
				<section id="section-focus">
       		<div class="alert alert-warning" role="alert"><?php echo Yii::t('app', 'No more focus questions.');?></div>
				</section>
			</div>
		</div>