<extend name="Public:base" />

<block name="content">
	<div class="page-header">
	
	<span class="btn btn-primary">博客回复</span>
	</div>	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<th>ID</th>						
						<th>文章</th> 	
						<th>名字</th> 				
						<th>邮箱</th>		
						<th>内容</th>
						
						<th>地区</th>		
						<th>时间</th>	
				
						<th>设备</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
						<volist name="list" id="data" empty="$empty">
						<tr>						
							<td>{$data.reply_id}</td>							
							<td><a target="_blank" href="__ROOT__/blog/{$data.blog_id}">{$data.blog_title}</a></td>	
							<td>{$data.title}</td>						
							<td>{$data.email}</td>
							
							<td>{$data.content}</td>
							
							<td>{$data.ip_region}</td>
							<td>{$data.create_time}</td>
						
							<td>{$data.device}</td>
							<td>
								<switch name="data.status">    
									<case value="1">
										<span class="green bold">启用</span>
									</case>    
									<case value="0">
										<span class="red bold">禁言</span>
									</case>
								</switch>
							</td>
							<td>
								<?php if($data['status']==0){ ?>
								<a class="delete btn btn-xs btn-info" href='{:U("BlogReply/set_status",array("id"=>$data["reply_id"],status=>1))}' >
									<i class="icon-eye-open bigger-120"></i>
								</a>
								<?php }else{ ?>
								<a class="delete btn btn-xs btn-danger" href='{:U("BlogReply/set_status",array("id"=>$data["reply_id"],status=>0))}' >
									<i class="icon-trash bigger-120"></i>
								</a>
								<?php } ?>	
								
							</td>
						</tr>
						</volist>	
						
						<tr>
							<td colspan="20" class="page">{$page}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
</block>