Skip to content

Commit

Permalink
1. 修改功能菜单展示
Browse files Browse the repository at this point in the history
2. 添加权限校验
  • Loading branch information
Halifa committed Jul 8, 2017
1 parent 85863e0 commit 7bd11fd
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
<ul>
@foreach (var firItem in Model)
{
<li>
<a fid="@firItem.ID" pfid="@firItem.ParentID" href="#">@firItem.FucTitle</a>
@if (firItem.ChildList.Count>0)
{
<ul role="group" class="jstree-children">
@foreach (var secItem in firItem.ChildList)
{
<li>
<a fid="@secItem.ID" pfid="@secItem.ParentID" href="#">@secItem.FucTitle</a>
</li>
}
</ul>
}
</li>
@Html.Partial("_FunctionItemPartial", firItem)
}
</ul>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@using TonyBlogs.DTO.UserFunction

@model UserFunctionTreeItemDTO

@{
Layout = null;
}

<li>
<a fid="@Model.ID" pfid="@Model.ParentID" href="#">@Model.FucTitle</a>
@if (Model.ChildList.Count > 0)
{
<ul role="group" class="jstree-children">
@foreach (var secItem in Model.ChildList)
{
@Html.Partial("_FunctionItemPartial", secItem)
}
</ul>
}
</li>
21 changes: 21 additions & 0 deletions TonyBlogs.WebApp/Filters/AuthFilter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace TonyBlogs.WebApp.Filters
{
public class AuthFilter : FilterAttribute, IActionFilter
{
public void OnActionExecuted(ActionExecutedContext filterContext)
{
throw new NotImplementedException();
}

public void OnActionExecuting(ActionExecutingContext filterContext)
{
throw new NotImplementedException();
}
}
}
4 changes: 4 additions & 0 deletions TonyBlogs.WebApp/TonyBlogs.WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
<Compile Include="Areas\Admin\Controllers\UserInfoController.cs" />
<Compile Include="ControllerFactory\AutofacControllerFactory.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Filters\AuthFilter.cs" />
<Compile Include="Filters\ExcepFilter.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
Expand Down Expand Up @@ -1129,6 +1130,9 @@
<ItemGroup>
<Content Include="Areas\Admin\Views\Account\Index.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\Admin\Views\Function\_FunctionItemPartial.cshtml" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
Expand Down

0 comments on commit 7bd11fd

Please sign in to comment.