{js:my97date}
<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li>
			<i class="home-icon fa fa-home"></i>
			<a href="#">会员</a>
		</li>
		<li>
			<a href="#">咨询管理</a>
		</li>
		<li class="active">建议管理</li>
	</ul>
</div>

<div class="content">
	<table class="table list-table">
		<colgroup>
			<col width="35px" />
			<col width="150px" />
			<col />
			<col width="160px" />
			<col width="160px" />
			<col width="110px" />
		</colgroup>
		<caption>
            <a class="btn btn-default" onclick="selectAll('check[]')">
                <i class="fa fa-check"></i>全选
            </a>
            <a class="btn btn-default" onclick="delModel({'form':'suggestion_list',msg:'确定要删除选中的记录吗？'})">
                <i class="fa fa-close"></i>批量删除
            </a>
			<form class="form-inline pull-right" method="get" action="{url:/}">
				<input type='hidden' name='controller' value='comment' />
				<input type='hidden' name='action' value='suggestion_list' />

                <div class="input-group">
                    <span class="input-group-addon">建议人</span>
                    <input class="form-control" name="search[b.username=]"  type="text" value="" />
                </div>

                <div class="input-group">
                    <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                    <input class="form-control" name="search[a.time>=]"  type="text" value="" onfocus="WdatePicker()" placeholder="开始时间" />
                </div>

                <div class="input-group">
                    <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
                    <input class="form-control" name="search[a.time<=]"  type="text" value="" onfocus="WdatePicker()" placeholder="截止时间"  />
                </div>

				<button class="btn btn-default" type="submit">
				    <i class="fa fa-search"></i> 筛选
				</button>
			</form>
		</caption>
		<thead>
			<tr>
				<th></th>
				<th>建议人</th>
				<th>标题</th>
				<th>建议时间</th>
				<th>回复时间</th>
				<th>操作</th>
			</tr>
		</thead>

        <form action="{url:/comment/suggestion_del}" method="post" name="suggestion_list" onsubmit="return checkboxCheck('check[]','尚未选中任何记录！')">
		<tbody>
            {foreach:items=$this->query->find()}
			<tr>
				<td><input name="check[]" type="checkbox" value="{$item['id']}" /></td>
				<td><a href="{url:/member/member_edit/uid/$item['user_id']}">{$item['username']}</a></td>
				<td><a href="{url:/comment/suggestion_edit/id/$item['id']}">{$item['title']}</a></td>
				<td>{$item['time']}</td>
				<td>{if:$item['re_time']>0}{$item['re_time']}{else:}未回复{/if}</td>
				<td>
					<a href="{url:/comment/suggestion_edit/id/$item['id']}"><i class='operator fa fa-edit'></i></a>
					<a onclick="delModel({link:'{url:/comment/suggestion_del/check/$item['id']}'})"><i class='operator fa fa-close'></i></a>
				</td>
			</tr>
			{/foreach}
		</tbody>
		</form>
	</table>
</div>
{$this->query->getPageBar()}

<script type="text/javascript">
$(function()
{
	var searchData = {echo:JSON::encode(IReq::get('search'))};
	for(var index in searchData)
	{
		$('[name="search['+index+']"]').val(searchData[index]);
	}
})
</script>