<?php TPL::output('admin/global/header.tpl.htm'); ?>

<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<!-- main -->
<div id="main-content">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3><?php echo $this->crumb['last']['name']; ?></h3>
			<ul class="content-box-tabs">
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
				<form id="batchs_form" action="admin/question/answer_batch/" method="post">
					<?php if(!$this->list){ ?>
					<div class="notification attention png_bg"> <a href="#" class="close"><img src="<?php echo GET_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
						<div>
							<?php if($this->keyword){ ?>
							Can't be found in search&nbsp;<?php echo $this->keyword; ?>&nbsp;related content, return<a href="javascript:;" onClick="$('#keyword').val('');$('#_search_form').submit();">Display all</a>
							<?php }else{ ?>
							No reply
							<?php } ?>
						</div>
					</div>
					<?php }else{ ?>
					<table class="list">
						<thead>
							<tr>
								<th style="width:20px;"><input type="checkbox" class="check-all"></th>
								<th style="width:380px;">Reply content</th>
								<th>Author</th>
								<th>Published time</th>
								<th>Agree</th>
								<th>Thank</th>
								<th>Comment</th>
								<th>No help</th>
								<!--th>Operation</th-->
							</tr>
						</thead>
						<tfoot>
							<tr>
								<td colspan="8">
									<div class="bulk-actions align-left"><a class="button" onClick="ajax_post($('#batchs_form'), _ajax_post_alert_processer); return false;" href="javascript:;">Delete selected</a></div>
									<div class="pagination"><?php echo $this->pagination; ?></div>
									<div class="clear"></div>
								</td>
							</tr>
						</tfoot>
						<tbody style="border-bottom: 1px solid #ddd;">
							<?php foreach ($this->list AS $key => $val) { ?>
							<tr>
								<td><input type="checkbox" name="answer_ids[]" value="<?php echo $val['answer_id']; ?>"></td>
								<td><a href="question/id-<?php echo $val['question_id']; ?>__item_id-<?php echo $val['answer_id']; ?>#answers" title="View Issues" target="_blank"><?php echo $val['answer_content']; ?></a></td>
								<td><a href="people/<?php echo $val['url_token']; ?>" target="_blank"><?php echo $val['user_name']; ?></a></td>
								<td><?php echo date("Y-m-d H:i:s", $val['add_time']); ?></td>
								<td><?php echo $val['agree_count']; ?></td>
								<td><?php echo $val['thanks_count']; ?></td>
								<td><?php echo $val['comment_count']; ?></td>
								<td><?php echo $val['uninterested_count']; ?></td>
							</tr>
							<?php } ?>
						</tbody>
					</table>
					<?php } ?>
				</form>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo GET_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="Close" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>

<!-- footer -->
<?php TPL::output('admin/global/footer.tpl.htm'); ?>
<!-- footer -->

</div>
<!-- main -->

</div>

</body>
</html>