自动生成菜单,相应控制其方法加上DisplayName、Description特性
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -12,6 +13,8 @@ using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
{
|
||||
[DisplayName("文章系统")]
|
||||
[Description("文章系统管理,包括文章、文章栏目")]
|
||||
public class ArticleController : AdminBaseController
|
||||
{
|
||||
#region 文章栏目
|
||||
@@ -20,6 +23,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MyAuthorize( "viewlist", "articlecategory")]
|
||||
[DisplayName("文章栏目")]
|
||||
public IActionResult ArticleCategoryList()
|
||||
{
|
||||
IList<ArticleCategory> list = ArticleCategory.GetListTree(0, -1, false, true);
|
||||
@@ -189,6 +193,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MyAuthorize("viewlist", "article")]
|
||||
[DisplayName("文章")]
|
||||
public IActionResult ArticleList()
|
||||
{
|
||||
//获取上级栏目
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
ViewBag.ListKinds = list;
|
||||
return View();
|
||||
}
|
||||
[MyAuthorize("viewlist", "guestbook")]
|
||||
[MyAuthorize("viewlist", "guestbook","JSON")]
|
||||
public IActionResult GetGuesbookList(string keyword, int page = 1, int limit = 20)
|
||||
{
|
||||
int numPerPage, currentPage, startRowIndex;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -19,6 +20,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
/// <summary>
|
||||
/// 后台用户管理控制器
|
||||
/// </summary>
|
||||
[DisplayName("管理员")]
|
||||
public class MemberController : AdminBaseController
|
||||
{
|
||||
#region 修改密码
|
||||
@@ -115,6 +117,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
|
||||
#region 管理组管理
|
||||
[MyAuthorize("viewlist", "adminrole")]
|
||||
[DisplayName("管理组")]
|
||||
public IActionResult AdminRole()
|
||||
{
|
||||
IList<AdminRoles> list = AdminRoles.FindAll(AdminRoles._.Id > 0, AdminRoles._.Rank.Asc(), null, 0, 0);
|
||||
@@ -366,6 +369,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
#region 管理员管理
|
||||
//管理员管理
|
||||
[MyAuthorize("viewlist", "admins")]
|
||||
[DisplayName("管理员")]
|
||||
public IActionResult Admins()
|
||||
{
|
||||
//加载管理组
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -13,6 +14,7 @@ using Microsoft.AspNetCore.Http;
|
||||
namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
{
|
||||
[Area("AdminCP")]
|
||||
[DisplayName("后台权限")]
|
||||
public class PermissionController : AdminBaseController
|
||||
{
|
||||
#region 事件管理
|
||||
@@ -107,6 +109,7 @@ namespace COMCMS.Web.Areas.AdminCP.Controllers
|
||||
#region 后台栏目管理
|
||||
//后台菜单列表
|
||||
[MyAuthorize( "viewlist", "adminmenu")]
|
||||
[DisplayName("后台栏目")]
|
||||
public IActionResult AdminMenuList()
|
||||
{
|
||||
IList<AdminMenu> list = AdminMenu.GetListTree(0, -1, false, true);
|
||||
|
||||
Reference in New Issue
Block a user