diff --git a/OpenAuth.Mvc/AutofacExt.cs b/OpenAuth.Mvc/AutofacExt.cs index b018aa6f..47ef8bba 100644 --- a/OpenAuth.Mvc/AutofacExt.cs +++ b/OpenAuth.Mvc/AutofacExt.cs @@ -41,8 +41,7 @@ namespace OpenAuth.Mvc builder.RegisterType(); builder.RegisterType(); builder.RegisterType(); - - + builder.RegisterType(); // Register your MVC controllers. builder.RegisterControllers(typeof(MvcApplication).Assembly); diff --git a/OpenAuth.Mvc/Views/ResourceManager/Add.cshtml b/OpenAuth.Mvc/Views/ResourceManager/Add.cshtml index 18cd0a91..65cc23d2 100644 --- a/OpenAuth.Mvc/Views/ResourceManager/Add.cshtml +++ b/OpenAuth.Mvc/Views/ResourceManager/Add.cshtml @@ -1,4 +1,4 @@ -@model OpenAuth.Domain.Resource +@model OpenAuth.Domain.Resource @{ ViewBag.Title = "Resource编辑界面"; Layout = null; @@ -8,76 +8,143 @@
- + - - + + + - - - - - + + - - + + @if (Model.Id == 0) //添加 + { + + + + + } + else //编辑 + { + + + + } + - - + + - - + + - - + + - - - - +
- @Html.HiddenFor(m =>m.Id) + @Html.HiddenFor(m => m.Id) + @Html.HiddenFor(m => m.CategoryId)
- - -
- +
- +
+ + +
    +
    + + +
    - - - -
      - + +
      - - + +
      - - + +
      - - -
      - +
      @@ -87,66 +154,4 @@
    • - - - \ No newline at end of file + \ No newline at end of file diff --git a/OpenAuth.Mvc/Views/ResourceManager/Index.cshtml b/OpenAuth.Mvc/Views/ResourceManager/Index.cshtml index ee4098d1..8a52cd91 100644 --- a/OpenAuth.Mvc/Views/ResourceManager/Index.cshtml +++ b/OpenAuth.Mvc/Views/ResourceManager/Index.cshtml @@ -1,4 +1,4 @@ -@{ +@{ string _prefix = "Resource"; var _treeId = _prefix + "Tree"; var _gridId = _prefix + "Grid"; diff --git a/OpenAuth.Mvc/Web.config b/OpenAuth.Mvc/Web.config index 75da5de8..66f47cd1 100644 --- a/OpenAuth.Mvc/Web.config +++ b/OpenAuth.Mvc/Web.config @@ -48,6 +48,7 @@ +