<!-- includes/common/auto_table_view.inc -->
<div class="table-view">
{if !$display_cmd}{assign var="display_cmd" value="edit"}{/if}
<table cellspacing="0" summary="data table">
{foreach from=$table_view item="row" name="table_view"}
{if $smarty.foreach.table_view.first}
	<tr>
		<th>No.</th>
{foreach from=$row item="column" key="key"}
		{if $column.label}{assign var="columnid" value=$key|replace:'-':''}
		<th class="col-{$columnid}">{$column.label}<span id="asc-{$columnid}"><a href="./?sort={$key}&amp;order=asc">{$W.asc_mark}</a></span><span id="desc-{$columnid}"><a href="./?sort={$key}&amp;order=desc">{$W.desc_mark}</a></span></th>{/if}
{/foreach}
	</tr>
{/if}
	<tr>
		<td><a href="{$display_cmd}?id={$row.id.body}">{$row.sequence.value}</a></td>
{foreach from=$row item="column" name="data"}
		{if $column.label}<td>{$column.body}</td>{/if}
{/foreach}
	</tr>
{foreachelse}
	<tr>
		<td>{$W.data}{$W.is_nothing}</td>
	</tr>
{/foreach}
</table>
</div>
<!-- end of includes/common/auto_table_view.inc -->