<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcEnterprise.Models.DataSet1+AdminMenusSortRow>>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=8" />
	<title>¹ÜÀíÒ³Ãæ</title>
	<link href="../../Content/Skin/Admin_Left.css" rel="stylesheet" type="text/css" />
	<script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			$(".Group").click(
                function () {
                	$(".Menu").hide();
                	$(this).next().show();
				});
		});
		$(document).ready(function () {
			$("ul:not(ul:has(li))").parent().prev().remove();
		});
	</script>
</head>
<body>
	<% foreach (var menu in Model)
	{
		if (menu.SortPath.Count(m => m == ',') == 3)
		{
			Response.Write(@"<h1 class=""Group"">" + menu.SortName + "</h1>");
			Response.Write(@"<div class=""Menu"">");
			Response.Write(@"<ul>");
			foreach (var subMenu in Model)
			{
				if (subMenu.SortPath.StartsWith(menu.SortPath) && subMenu.SortPath != menu.SortPath)
				{
					Response.Write(string.Format(@"<li><a href=""{0}"" target=""{1}"">{2}</a></li>", subMenu.Url, subMenu.IsBlank ? "_blank" : "main", subMenu.SortName));
				}
			}
			Response.Write("</ul>");
			Response.Write("</div>");
		}
	} %>
	<div class="MenuEnd">
		<div class="MenuEndRight">
		</div>
	</div>
</body>
</html>
