<table>
	<col class='column_source'/>
	<col class='column_delete'/>
	<col class='column_name'/>
<?php if($this->has_tables): ?>
	<col class='column_delete'/>
	<col class='column_table'/>
<?php endif?>
<?php if($this->settings_instructionTitle()!=""): ?>
	<col class='column_instruction'/>
<?php endif?>
<?php if($this->settings_actionTitle()!=""): ?>
	<col class='column_action'/>
<?php endif?>
	<col class='column_slack'/>	
	<thead> 
		<tr>
			<th class='icon_copy' title='Select the item to be copied when create new forms.'></th>
			<th class='icon_delete' title='Select forms to delete, or reset.'></th>
			<th>Name</th>
			<th class='icon_delete' title='Select tables to delete.'></th>
<?php if($this->has_tables): ?>
			<th>Table</th>
<?php endif?>
<?php if($this->settings_instructionTitle()!=""): ?>
			<th><?php echo $this->settings_instructionTitle();?></th>
<?php endif?>
<?php if($this->settings_actionTitle()!=""): ?>
			<th><?php echo $this->settings_actionTitle();?></th>
<?php endif?>
			<th></th>
		</tr>
	</thead>
	<tbody>
<?php $this->alternate();foreach($this->locations as $this->name=>$this->location):?>
		<tr class='<?php echo $this->alternate();?>'>
<?php if(null!==$this->location['name']): ?>
			<td>
				<input type = 'radio' <?php $this->checked('default',$this->name);?> name='source_setting' value='<?php echo $this->name;?>' />
			</td>
			<td>
				<input type = 'checkbox' name='delete_setting[]' value='<?php echo $this->name;?>' />
			</td>
			<td>
				<?php echo $this->location['name'];?>
			</td>
<?php else:?>
	<td colspan=3></td>
<?php endif?>
<?php if($this->has_tables): ?>
	<?php if(null!==$this->location['table']): ?>
			<td>
				<input type = 'checkbox' name='delete_table[]' value='<?php echo $this->location['table'];?>' />
			</td>
			<td>
			<a href='#' title='Click to download table as CSV file'>
			<?php echo $this->location['table'];?> (<?php echo $this->location['count'];?>)
			</a>
	<?php else:?>
	<td colspan=2></td>
	<?php endif?>
			</td>
<?php endif?>
<?php if($this->settings_instructionTitle()!=""): ?>
			<td><?php echo $this->settings_instructionColumn()?></td>
<?php endif?>
<?php if($this->settings_actionTitle()!=""): ?>
			<td><?php echo $this->settings_actionColumn()?></td>
<?php endif?>
			<td></td>
		</tr>
	</tbody>
<?php endforeach?>
</table>
<input type='submit' class='button' value='Apply' />
