{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="{url:/comment/discussion_list}">讨论管理</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="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':'discussion_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='discussion_list' />

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

                <div class="input-group">
                    <span class="input-group-addon">讨论商品ID</span>
                    <input class="form-control" name="search[goods.id=]"  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[d.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[d.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>
			</tr>
		</thead>
        <form action="{url:/comment/discussion_del}" method="post" name="discussion_list" onsubmit="return checkboxCheck('check[]','尚未选中任何记录！')">
		<tbody>
			{set:$queryObj=Api::run('getListByDiscussion');$resultData=$queryObj->find()}
            {foreach:items=$resultData}
			<tr>
				<td><input name="check[]" type="checkbox" value="{$item['id']}" /></td>
				<td><a href="{url:/member/member_edit/uid/$item['userid']}">{$item['username']}</a></td>
				<td><a href="{url:/site/products/id/$item['goods_id']}" target="_blank">{$item['goods_name']}</a></td>
				<td>{$item['time']}</td>
				<td>
					<a href="{url:/comment/discussion_edit/id/$item['id']}"><i class='operator fa fa-edit'></i></a>
					<a onclick="delModel({link:'{url:/comment/discussion_del/check/$item['id']}'})"><i class='operator fa fa-close'></i></a>
				</td>
			</tr>
			{/foreach}
		</tbody>
		</form>
	</table>
</div>
{$queryObj->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>