{include file="header.tpl"}
<div id="rowContent">
  <div id="titleTab"><div class="textTitle"><span class="textTitleSub">{$title}</span></div>
</div>
<div id="rowContentInner">
		<table class="tblList">

		<form method="get" action="{$smarty.server.SCRIPT_NAME}">
				<tr>
					<td class="tblPagingLeft" colspan="7" align="right">
						{include file="pager.tpl" pager_data=$paging_data}
					</td>
				</tr>
				<tr class="tblHeader">
					<td>
						{capture assign=label}{t}Name{/t}{/capture}
						{include file="column_sort.tpl" label=$label sort_column="name" current_column="$sort_column" current_order="$sort_order"}
					</td>
					<td>
						{capture assign=label}{t}Description{/t}{/capture}
						{include file="column_sort.tpl" label=$label sort_column="description" current_column="$sort_column" current_order="$sort_order"}
					</td>
					<td>
						{capture assign=label}{t}Default{/t}{/capture}
						{include file="column_sort.tpl" label=$label sort_column="default" current_column="$sort_column" current_order="$sort_order"}
					</td>
					<td>
						{t}Functions{/t}
					</td>
					<td>
						<input type="checkbox" class="checkbox" name="select_all" onClick="CheckAll(this)"/>
					</td>
				</tr>
				{foreach from=$round_policies item=round_policy}
					{cycle assign=row_class values="tblDataWhite,tblDataGrey"}
					{if $round_policy.deleted == TRUE}
						{assign var="row_class" value="tblDataDeleted"}
					{/if}
					<tr class="{$row_class}">
						<td>
							{$round_policy.name}
						</td>
						<td>
							{$round_policy.description}
						</td>
						<td>
							{if $round_policy.default == TRUE }Yes{else}No{/if}
						</td>
						<td>
							{assign var="round_policy_id" value=$round_policy.id}
							{if $permission->Check('round_policy','view') }
							{*
								[ View ]
							*}
							{/if}
							{if $permission->Check('round_policy','edit') }
								[ <a href="{urlbuilder script="EditRoundPolicy.php" values="id=$round_policy_id" merge="FALSE"}">{t}Edit{/t}</a> ]
							{/if}
						</td>
						<td>
							<input type="checkbox" class="checkbox" name="ids[]" value="{$round_policy.id}">
						</td>
					</tr>
				{/foreach}
				<tr>
					<td class="tblActionRow" colspan="7">
						{if $permission->Check('branch','add') }
							<input type="submit" name="action" value="Add">
						{/if}
						{if $permission->Check('branch','delete') }
							<input type="submit" name="action" value="Delete" onClick="return confirmSubmit()">
						{/if}
						{if $permission->Check('branch','undelete') }
							<input type="submit" name="action" value="UnDelete">
						{/if}
					</td>
				</tr>
				<tr>
					<td class="tblPagingLeft" colspan="7" align="right">
						{include file="pager.tpl" pager_data=$paging_data}
					</td>
				</tr>
			<input type="hidden" name="sort_column" value="{$sort_column}">
			<input type="hidden" name="sort_order" value="{$sort_order}">
			<input type="hidden" name="page" value="{$paging_data.current_page}">
			</table>
		</form>
	</div>
</div>
{include file="footer.tpl"}
