@using VberZero @using VberAdmin.Web.Models.Table @using VberZero.Session @using VberAdmin.Web.Models.Input @using VberAdmin.Web.Models.Modals @{ string activeMenu = PermissionNames.VberSystemMgFunctionMg; ViewBag.ActiveMenu = activeMenu; string functionType = ViewBag.FunctionType; var table = new VmTable(VzConsts.ApiAppUrl + "Function/GetAll", activeMenu) .WithTree() .AddItems(new List() { new VmTableItem("displayName", L("functionName")), new VmTableItem("functionType", L("functionType"), "TypeFormatter"), new VmTableItem("url", L("functionUrl")), new VmTableItem("icon", L("functionIcon"), "IconFormatter"), new VmTableItem("sort", L("functionSort")), //new VmTableItem("", L("Actions"), "ActionsFormatter"), }); var inputs = new List() { new VmInputHidden("id"), new VmInputHidden("parentNo"), new VmInput("parentName", L("functionParent")).WithDisabled(), //new Input("functionNo", L("functionNo")), new VmInput("displayName", L("functionName")).WithRequired(), new VmInputNumber("sort", L("functionSort")).WithRange(0,1000), new VmInput("icon", L("functionIcon")), }; if (AbpSession.GetUserName() == VberZero.BaseSystem.Users.User.AdminUserName) { inputs.AddRange(new List { new VmInput("functionType", L("functionType")).WithSelect(ViewBag.FunctionType), new VmInput("url", L("functionUrl")), new VmInput("class", L("functionClass")), new VmInput("script", L("functionScript")), }); } var modal = new VmModal( ) .WithHeaderAndFooter(L("function"),"") .WithBody(new VmModalBody().AddInputs(inputs)); } @await Html.PartialAsync("_Table",table) @await Html.PartialAsync("_Modal", modal) @section scripts { }