<?php echo $this->partial('directory-nav.phtml'); ?>
<h3>Company directory</h3>
<h5><a href="/directories/company/<?php echo $this->companydirectoryid; ?>/overview">Add new company</a></h5>

<table id="companies" data-link="row" class="rowlink table table-striped table-bordered table-hover">
<tr><th>Number</th><th>Name</th><th>CEO</th><th>Sectors</th><th>Turnover</th></tr>
</table>

<ul class="pager">
<li class="previous" id="previous" class="disabled"><a href="#">&larr; Previous</a></li>
<li class="next" id="next"><a href="#">Next &rarr;</a></li>
</ul>

<script>

$(document).ready(function() {

	netsensia_Pager(
		1,
		10,
		'companies',
		'/ajax/company/list',
		function(key, value) {
			var url = '/directories/company/' + value.internalId;
			
			var newRow = '<tr>';
			newRow += '<td><a href="' + url + '">' + value.number + '</a></td>';
			newRow += '<td>' + value.name + '</td>';
			newRow += '<td>&nbsp;</td>';
			newRow += '<td>&nbsp;</td>';
			newRow += '<td>&nbsp;</td>';
			newRow += '</tr>';
	
			return newRow;
		}
	);	
});

</script>

<?php echo $this->partial('directory-nav.phtml'); ?>
<h3>Company directory</h3>
<h5><a href="/directories/company/new">Add new company</a></h5>

<table id="companies" data-link="row" class="rowlink table table-striped table-bordered table-hover">
<tr><th>Number</th><th>Name</th><th>CEO</th><th>Sectors</th><th>Turnover</th></tr>
</table>

<ul class="pager">
<li class="previous" id="previous" class="disabled"><a href="#">&larr; Previous</a></li>
<li class="next" id="next"><a href="#">Next &rarr;</a></li>
</ul>

<script>

$(document).ready(function() {

	netsensia_Pager(
		1,
		10,
		'companies',
		'/ajax/company/list',
		function(key, value) {
			var url = '/directories/company/' + value.internalId;
			
			var newRow = '<tr>';
			newRow += '<td><a href="' + url + '">' + value.number + '</a></td>';
			newRow += '<td>' + value.name + '</td>';
			newRow += '<td>&nbsp;</td>';
			newRow += '<td>&nbsp;</td>';
			newRow += '<td>&nbsp;</td>';
			newRow += '</tr>';
	
			return newRow;
		}
	);	
});

</script>

Allow non-CH companies to be added
Allow non-CH companies to be added
