{extends file="layout.html"}
{block name=title}LMS: {$layout.pagetitle|striphtml}{/block}
{block name=module_content}
<!--// $Id$ //-->
<H1>{$layout.pagetitle}</H1>
<table class="lmsbox">
	<colgroup>
		<col style="width: 1%;">
		<col style="width: 99%;">
	</colgroup>
	<thead>
		<tr>
			<td>
				{icon name="customergroup"}
			</td>
			<td class="nobr" colspan="2">
				<strong>{$customergroup.name} ({$customergroup.id|string_format:"%04d"})</strong>
			</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				{icon name="customer"}
			</td>
			<td class="nobr" colspan="2">
				<strong>{trans("Members Count:")}</strong>
				{$customergroup.count}
			</td>
		</tr>
		{if $customergroup.description}
		<tr>
			<td>
				{icon name="info"}
			</td>
			<td colspan="2">
				<table width="100%" cellpadding="3">
					<tr>
						<td class="fall superlight">
							{$customergroup.description|escape|replace:"\n":"<br>"}
						</td>
					</tr>
				</table>
			</td>
		</tr>
		{/if}
		<tr>
			<td class="lms-ui-box-buttons" colspan="3">
				{button icon="edit" label="Edit"
					href="?m=customergroupedit&id={$customergroup.id}{if $membersnetid}&membersnetid={$membersnetid}{/if}{if $othersnetid}&othersnetid={$othersnetid}{/if}"}
				{if $customergroup.count == 0}
					{button icon="delete" label="Delete" id="delete-group" data_customer_group_id=$customergroup.id}
				{/if}
			</td>
		</tr>
	</tbody>
</table>
{include file="customer/customergroupassignments.html"}
<script>

	$('#delete-group').click(function() {
		confirmDialog($t("Are you sure, you want to delete that group?"), this).done(function() {
			location.href = '?m=customergroupdel&id=' + $(this).attr('data-customer-group-id');
		});
		return false;
	});

</script>
{/block}
