{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: 1%;">
		<col style="width: 98%;">
	</colgroup>
	<thead>
		<tr>
			<td>
				{icon name="nodegroup"}
			</TD>
			<td colspan="2" class="nobr">
				<strong>{$nodegroup.name|escape} (#{$nodegroup.id})</strong>
			</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				{icon name="node"}
			</td>
			<td class="nobr">
				<strong>{trans("Members Count")}</strong>
			</td>
			<td>
				{$nodegroup.count}
			</td>
		</tr>
		{if $nodegroup.description}
			<tr>
				<td>
					{icon name="info"}
				</td>
				<td colspan="2">
					<table style="width: 100%;" cellpadding="3">
						<tr>
							<td class="fall superlight">
								{$nodegroup.description|escape|replace:"\n":"<BR>"}
							</td>
						</tr>
					</table>
				</td>
			</tr>
		{/if}
		<tr>
			<td colspan="3" class="lms-ui-box-buttons">
				{button icon="edit" label="Edit"
					href="?m=nodegroupedit&id={$nodegroup.id}{if $membersnetid}&membersnetid={$membersnetid}{/if}{if $othersnetid}&othersnetid={$othersnetid}{/if}"}
				{if !$nodegroup.count}
					{button icon="delete" label="Delete" id="delete-nodegroup" data_href="?m=nodegroupdel&id={$nodegroup.id}"}
				{/if}
			</td>
		</tr>
	</tbody>
</table>

{include file="node/nodegroupassignments.html"}

<script>

	$(function() {
		$('#delete-nodegroup').click(function () {
			confirmDialog($t("Are you sure, you want to delete that group?"), this).done(function () {
				location.href = $(this).attr('data-href');
			});
		});
	});

</script>
{/block}
