{=var-set:nr=0=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}
{=var-set:nr=1=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}
{=var-set:nr=2=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}
{=var-set:nr=3=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}
{=var-set:nr=4=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}
{=var-set:nr=5=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}
{=var-set:nr=6=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}
{=var-set:nr=7=} {=include-block:Y_NI_Blocks.txt;netfs_local_dir=}

{=var-set:nr=0=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}
{=var-set:nr=1=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}
{=var-set:nr=2=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}
{=var-set:nr=3=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}
{=var-set:nr=4=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}
{=var-set:nr=5=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}
{=var-set:nr=6=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}
{=var-set:nr=7=} {=include-block:Y_NI_Blocks.txt;netfs_is_mount=}

{=include-block:Y_NI_Blocks.txt;head=}
<script type="text/javascript">
//<![CDATA[
function edit_popup()
{
	popup = window.open('/Y_Filemgr_Edit.yhtm?file={=if-file-exists:/var/etc/{=L:ni.netfs-{=mount_type=}=}~/var/etc/{=L:ni.netfs-{=mount_type=}=}~/etc/{=L:ni.netfs-{=mount_type=}=}=}', 'edit', 'width=800,height=600,resizable=yes');
	check_popup();
}

function check_popup()
{
	if(popup.closed == true)
	{
		restart_menu();
	}
	else
	{
		wait_for_popup();
	}
}

function wait_for_popup()
{
	window.setTimeout("check_popup()", 10);
}

function restart_menu()
{
	alert('{=L:ni.netfs-control.restart_menu=}');
	window.document.location.href='/Y_NI_NetFS-init.yhtm?mount_type={=mount_type=}&mount_type_s={=mount_type_s=}';
}

function do_submit()
{
	show_waitbox(true);
	document.f.submit();
}
//]]>
</script>
</head>
<body>
{=var-set:wait_text={=L:ni.netfs-control.title=}<br/>=}{=include-block:Y_Blocks.txt;snip_wait=}
<div class="work_box">
	<div class="work_box_head"><div class="work_box_head_h2">
	{=var-set:menu={=L:ni.netfs-control.title=}=}{=include-block:Y_NI_Blocks.txt;NI_work_menu=}
	</div></div>
	<div class="work_box_body">
	<table class="y_invisible_table" cellpadding="5">
		<tr>
			<td class="y_form_header" width="30%">
				{=L:ni.netfs-control.entrys=} {=L:ni.netfs-{=mount_type=}=}
			</td>
			<td class="y_form_header">
				<a href="javascript:edit_popup();" title="{=L:ni.edit=}: {=L:ni.netfs-{=mount_type=}=}">
					<img src="/images/modify.png">
				</a>
				{=if-equal:{=mount_type=}~0~
				<a href="javascript:Y_NI_Tools('do_mount_all', 5000);" title="{=L:ni.netfs-control.mount_all=}">
					<img src="/images/server_add.png">
				</a>
				<a href="javascript:Y_NI_Tools('do_umount_all', 5000);" title="{=L:ni.netfs-control.umount_all=}">
					<img src="/images/server_delete.png">
				</a>
				~
				=}
				{=if-equal:{=mount_type=}~1~
				<a href="javascript:Y_NI_Tools('do_autofs restart', 5000);" title="{=L:ni.netfs-control.autofs_restart=}">
					<img src="/images/server_link.png">
				</a>
				~
				=}
			</td>
		</tr>
		{=var-set:nr=0=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
		{=var-set:nr=1=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
		{=var-set:nr=2=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
		{=var-set:nr=3=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
		{=var-set:nr=4=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
		{=var-set:nr=5=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
		{=var-set:nr=6=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
		{=var-set:nr=7=} {=include-block:Y_NI_Blocks.txt;netfs_table_row=}
	</table>
	<br />
	<button type="button" ytype="save" title="{=L:ni.save=}: {=L:ni.netfs-{=mount_type=}=}" onclick="$('out').update(''); goUrl('/y/cgi?execute=func:netfs_write_config {=mount_type=}')">{=L:ni.save=}</button>
	{=if-equal:{=mount_type=}~1~
	<button type="button" ytype="refresh" title="{=L:ni.netfs-control.autofs_restart=}" onclick="Y_NI_Tools('do_autofs restart', 5000)">{=L:ni.reload=}</button>
	~
	=}
	</div>
</div>
<div class="work_box">
	<div class="work_box_head"><div class="work_box_head_h2">
	{=var-set:menu={=L:answer=}=}{=include-block:Y_NI_Blocks.txt;NI_work_menu=}</div></div>
	<div class="work_box_body">
		<div id="out"></div>
	</div>
</div>
</body>
</html>
