Beispiel #1
0
        public SideBarGroup[] GetSideBarItems()
        {
            var sbgs = new SideBarGroup[1];

            sbgs[0]      = new SideBarGroup();
            sbgs[0].Name = "Group 1";
            sbgs[0].Add("Item 1", 0, SidebarCLicked);

            return(sbgs);
        }
Beispiel #2
0
        public SideBarGroup[] GetSideBarItems()
        {
            var sbgs = new SideBarGroup[1];

            sbgs[0] = new SideBarGroup();
            sbgs[0].Name = "Group 1";
            sbgs[0].Add("Item 1", 0, SidebarCLicked);

            return sbgs;
        }
Beispiel #3
0
        public override SideBarGroup[] AddItems()
        {
            var sbgs = new SideBarGroup[1];

            sbgs[0]      = new SideBarGroup();
            sbgs[0].Name = "Tasks Example";
            sbgs[0].Add("Create task", 0, CreateTask);
            sbgs[0].Add("Create client with extra fields", 0, CreateClientWithExtraFields);

            return(sbgs);
        }
Beispiel #4
0
        public override SideBarGroup[] AddItems()
        {
            var sbgs = new SideBarGroup[1];

            sbgs[0]      = new SideBarGroup();
            sbgs[0].Name = "Cloony";

            sbgs[0].Add("Create tasks", 0, CreateTasks);

            return(sbgs);
        }
Beispiel #5
0
        public ActionResult SiderBar()
        {
            SiderBarModel model = new SiderBarModel();

            model.SiderBarGroups = new List <SideBarGroup>();

            var paths = GetCurentUserPaths();

            var categoryMenus = paths.Where(p => p.IsCategory && p.Status == 1).OrderBy(p => p.OrderNo).ToList();

            foreach (var categoryMenu in categoryMenus)
            {
                SideBarGroup group = new SideBarGroup()
                {
                    Name = categoryMenu.Name,
                    Icon = categoryMenu.Icon.IsNullOrEmpty() || categoryMenu.Icon.EndsWith(".png") ? "&#xe626;" : categoryMenu.Icon
                };
                group.SiderBarItems = new List <SiderBarItem>();

                foreach (var menu in paths.Where(p => !p.IsCategory && p.CategoryId == categoryMenu.Id && p.Status == 1).OrderBy(p => p.OrderNo))
                {
                    SiderBarItem barItem = new SiderBarItem()
                    {
                        Name = menu.Name,
                        Url  = menu.Url
                    };

                    group.SiderBarItems.Add(barItem);
                }

                model.SiderBarGroups.Add(group);
            }

            //string str= model.ToJson();
            //return Content(str);

            return(PartialView(model));
        }