#include("./common/header.html", {title : node.node_name})
<div class="container">
    <div class="row">
        <div class="col-md-9">
        	<div class="panel panel-default">
        		<div class="panel-heading node-head" style="height: 100px;">
					<div>
						#if(null != node.pic && node.pic != '')
						<div class="pull-left mr10">
							<img width="73" height="73" src="${node.pic}" class="img-circle" />
						</div>
						#end
						<div class="pull-left">
							<span>Java China › ${node.node_name}</span>
							<span>${node.content}</span>
							<p class="mt10 mb10">${node.description ?! ''}</p>
						</div>
					</div>
					<div class="pull-right text-right mr10">
                		<span>帖子总数 ${node.topics}</span>
                		#if(null != login_user)
                		&nbsp;&nbsp;•&nbsp;
                		#if(is_favorite)
                		<a href="javascript:void(0);" nid="${node.nid}" class="favorite"><span>取消收藏</span></a>
                		#else
                		<a href="javascript:void(0);" nid="${node.nid}" class="favorite"><span>加入收藏</span></a>
                		#end
						<p class="mt20">
							<a href="${base_url('/topic/add?pid=') + node.nid}" class="btn btn-primary btn-sm">发布新帖子</a>
						</p>
						#end
                	</div>
                </div>
                <div class="panel-body home-panel">
					<div class="box-tab">
						<div class="tab-content">
							<div class="tab-pane active" id="home">
								#if(null == topicPage.results || topicPage.results.size() == 0)
								<div class="alert alert-info alert-dismissable">
									该节点下暂时还木有帖子呢 <i class="twa twa-lg twa-sparkles"></i>
								</div>
								#else
								<section class="widget bg-white post-comments">
									#for(topic : topicPage.results)
									<div class="media">
										<a class="pull-left" href="${base_url('/member/') + topic.user_name}"> 
											<img class="media-object avatar avatar-sm" src="${topic.avatar}" alt="${topic.user_name}">
										</a>
										<div class="comment">
											<div class="comment-author h6 no-margin">
												#if(topic.comments > 0)
												<div class="comment-meta small">
													<a href="${base_url('/topic/') + topic.tid + '#Reply' + topic.comments}" class="badge-comment">${topic.comments}</a>
												</div>
												<a href="${base_url('/topic/') + topic.tid + '#Reply' + topic.comments}">${topic.title}</a>
												#end
												<a href="${base_url('/topic/') + topic.tid}">${topic.title}</a>
											</div>
											<div class="comment-bt">
												<span class="label label-default"><a href="${base_url('/go/') + topic.node_slug}">${topic.node_name}</a></span> &nbsp;•&nbsp; 
												<strong><a href="${base_url('/member/') + topic.user_name}">${topic.user_name}</a></strong>
												 &nbsp;•&nbsp; <span>${timespan(topic.update_time)}</span>
												 #if(topic.comments > 0)
												 &nbsp;•&nbsp; 最后回复来自
												 <strong><a href="${base_url('/member/') + topic.reply_name}">${topic.reply_name}</a></strong>
												 #end
											</div>
										</div>
									</div>
									<hr/>
									#end
								</section>
								#end
								
								#if(topicPage.totalPage > 1)
								<ul class="pager">
									#if(topicPage.page > 1)
									<li class="pull-left"><a href="${base_url('/?tab=') + node.node_slug + '&p=' + topicPage.prev_page}">上一页</a></li>
									#end
									#if(topicPage.totalPage > 1 && topicPage.page != topicPage.totalPage)
									<li class="pull-right"><a href="${base_url('/?tab=') + node.node_slug + '&p=' + topicPage.next_page}">下一页</a></li>
									#end
								</ul>
								#end
								
							</div>
						</div>
					</div>
				</div>
			</div>
        	
        </div><!-- /.col-md-8 -->
		#include("./common/sidebar.html")
    </div>
</div>
#include("./common/footer.html")
</body>
</html>