{if $access['mns.create']}
	<div class="col-12">
		<table class="table">
			<tbody>
				<tr>
					<th class="border-end text-center text-muted">id</th>
					<th class="border-end text-center">License_key</th>
					<th class="border-end text-center">Domain</th>
					<th class="border-end text-center">Cms owner</th>
					<th class="border-end text-center">Expiration date</th>
				</tr>
				{foreach $licenses as $license}
					<tr>
						<td class="border-end text-center text-muted">{$license.id}</td>
						<td class="border-end">{$license.license_key}</td>
						<td class="border-end text-center">{$license.domain}</td>
						<td class="border-end text-center"><a href="mailto:{$license.owner_email}">{$license.cms_owner}</a></td>
						<td class="border-end text-center">
							{if $license.remaining_days == 'неограничено'}
								{$license.remaining_days}
							{elseif $license.remaining_days == 'истекла'}
								Лицензия истекла
							{else}
								{$license.remaining_days} дней
							{/if}
						</td>
					</tr>
				{/foreach}
			</tbody>
		</table>
	</div>
	<script>
		var currentLink = document.getElementById('licenseManagement');
		currentLink.classList.add('active');
	</script>
{/if}