<extend name="Public:base" />

<block name="content">
	<div class="page-header">
	<a href="{:U('Special/add')}" class="btn btn-primary">添加专题</a>

	</div>	
	
<div class="row">
	<div class="col-xs-12">
		<div class="alert alert-block alert-success">
			1.点击添加专题按钮可以添加新的专题，专题描述可以点击后直接修改<br/>
			2.点击编辑按钮对专题内容进行修改<br/>
			3.点击删除按钮可以删除整个专题
		</div>
	</div>
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<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.special_id}</td>
							<td>{$data.special_desc}</td>
							<td>index.php?s=/Special/index/special_id/{$data.special_id}</td>
							<td>
								<?php if(empty($data['special_bgcolor']))
									{
										echo '白色';	
									}else {
										echo $data['special_bgcolor'];
									}
								?>
							</td>
							<td>
							<?php if(empty($data['special_bgimage']))
							{
								echo '无';
							}else { ?>
							<img src="{$data.image}" width="50" />
							<?php } ?>	
							</td>
							<td>
								<a  class="btn btn-xs btn-info" href='{:U("Special/edit",array("special_id"=>$data["special_id"]))}'>
									<i class="icon-edit bigger-120"></i>编辑
								</a> 
								<a  class="btn btn-xs btn-info" href='{:U("Special/addGoods",array("special_id"=>$data["special_id"]))}'>
									<i class="icon-edit bigger-120"></i>制作专题
								</a> 
								<a class="delete btn btn-xs btn-danger" href='{:U("Special/del",array("special_id"=>$data["special_id"]))}' >
									<i class="icon-trash bigger-120"></i>删除
								</a>
							</td>
						</tr>
						</volist>	
						
						<tr>
							<td colspan="20" class="page">{$page}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
</block>