예제 #1
0
						<div class="media col-lg-12">
						  <div class="media-left media-middle col-lg-2">
						    <a href="#">
						      <img class="media-object img-circle" style="margin: 6% 0 0 0 " src="<?php echo User::findModel($question->user_id)->head_picture?>" alt="" width="60px">
						    </a>
						    <span class="qa-name" style="text-align: center"><?php echo User::findModel($question->user_id)->username?></span>
						  </div>
						  <div class="media-body">
						  	<span class="fa fa-question-circle fa-lg col-lg-1 qa-question-fa"></span>
						    <span class="media-heading qa-content" ><?php echo Markdown::convert($question->content)?></span>
						    <div class="qa-new">
						    	<span class="fa fa-comment fa-lg col-lg-1"></span>
						    	<?php if (Answer::replyLatest($question->id)): ?>
						    		<span>[最新回答]</span>
						    		<span><a href=""><?php echo User::findModel(Answer::replyLatest($question->id)->answer_user_id)->username?> :</a></span>
						    		<span><?php echo Answer::replyLatest($question->id)->content?></span>
						    	<?php else: ?>
						    		<span>[还没有人回答]</span>
						    	<?php endif ?>
						    	
						    </div>
						    <span class="evaluation-time col-lg-4">时间:<?php echo Common::getAwayTime($question->create_time)?></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 ?>
				</div>
			</div>
			<div class="tab-pane" id="attachment" style="margin-top:20px">
				<div class="container row">
예제 #2
0
파일: qa.php 프로젝트: songwanfu/SummerNut
					<li><a href="#section-ask" class="fa fa-question"><span>我的提问</span></a></li>
					<li><a href="#section-reply" class="fa fa-reply"><span>我的回答</span></a></li>
					<li><a href="#section-focus" class="fa fa-eye"><span>我的关注</span></a></li>
				</ul>
			</nav>
			<div class="content">
				<section id="section-ask">
					<?php if (Question::myQuestion($user->id) ): ?>
						<?php foreach (Question::myQuestion($user->id) as $question): ?>
							<div class="panel panel-default">
							  <div class="panel-heading">
							    <h3 class="panel-title"><?php echo Markdown::convert($question->content)?></h3>
							    <span style="font-size: 12px;color: gray;float: right;margin-top: -10px"><?php echo Common::getAwayTime($question->create_time)?></span>
							  </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>