@using WeApp @using WeApp.Authorization @using WeApp.Configuration @using WeApp.Views.Shared.Modals @using WeApp.Views.Shared.Table @{ ViewBag.Title = L("FunctionTitle"); string activeMenu = PermissionNames.PagesSystemMgFunctionMg; //The menu item will be active for this page. ViewBag.ActiveMenu = activeMenu; //The menu item will be active for this page. List functionType = ViewBag.FunctionType; //CurrentUserViewModel currentUser = ViewBag.CurrentUser; var table = new TableViewModel(IwbConsts.ApiAppUrl + "Functions/GetAll", activeMenu).SetFields(new List() { new FieldItem("functionName", L("functionName"),align:"left"), new FieldItem("functionType", L("functionType"),"TypeFormatter"), new FieldItem("url", L("functionUrl")), new FieldItem("icon", L("functionIcon"),"IconFormatter"), new FieldItem("sort", L("functionSort")), new FieldItem("", L("Actions"),"ActionsFormatter"), }).SetPageArray(1000).SetOther(" data-row-attributes=\"RowAttributes\" "); } @Html.Partial("Table/_Table", table) @section modal { @{ var inputs = new List() { new InputHide("id"), new InputHide("depth"), new InputHide("permissionName"), new InputHide("functionPath"), new Input("parentNo", L("functionParent"), InputTypes.List), new Input("functionNo", L("functionNo")), new Input("functionName", L("functionName")), new InputNumber("sort", L("functionSort")).SetRange(0,1000), new Input("icon", L("functionIcon")).SetNotRequired(), }; if (AbpSession.UserType == UsersAndRolesTypeDefinition.Supper) { inputs.AddRange(new List { new Input("functionType", L("functionType")).SetSelectOptions((List) ViewBag.FunctionType), new Input("controller", L("functionController")).SetNotRequired(), new Input("action", L("functionAction")).SetNotRequired(), new Input("url", L("functionUrl")).SetNotRequired(), new Input("class", L("functionClass")).SetNotRequired(), new Input("script", L("functionScript")).SetNotRequired(), }); } var modal = new ModalViewModel(L("function"), new ModalBodyViewModel(inputs)); @Html.Partial("Modals/_Modal", modal) } } @section scripts { }
@Html.DropDownList("hid-functionType", functionType)