Exemple #1
0
        public static void Seed(PortalEntityModel context)
        {
            if (!context.Posts.Any())
            {
                var image = context.Images.First(x => x.ImageCategory == ImageCategory.General);

                var firstPost = new Post
                {
                    PostTitle       = "My First Post",
                    PostDescription = "This is just an example post to get you started, why not change it or create a new post?",
                    PostBody        = "<p>Coming Soon...</p>",
                    IsPublished     = true,
                    DateAdded       = DateTime.Now,
                    DateUpdated     = DateTime.Now,
                    PostCategoryId  = context.PostCategories.First().PostCategoryId,
                    PostImages      = new List <PostImage>
                    {
                        new PostImage()
                        {
                            ImageId = image.ImageId, PostImageType = PostImageType.Banner
                        }
                    }
                };

                context.Posts.Add(firstPost);
            }
        }
Exemple #2
0
        public static void Seed(PortalEntityModel context)
        {
            var roleList = context.Roles.ToList();

            var newRoles = new List <Role>();

            if (!roleList.Any(x => x.RoleName == "Admin"))
            {
                newRoles.Add(new Role {
                    RoleName = "Admin"
                });
            }

            if (!roleList.Any(x => x.RoleName == "Authenticated"))
            {
                newRoles.Add(new Role {
                    RoleName = "Authenticated"
                });
            }

            if (!roleList.Any(x => x.RoleName == "Editor"))
            {
                newRoles.Add(new Role {
                    RoleName = "Editor"
                });
            }

            if (newRoles.Any())
            {
                context.Roles.AddRange(newRoles);
            }
        }
Exemple #3
0
        public static void Seed(PortalEntityModel context)
        {
            if (!context.Menus.Any(x => x.MenuName == "Main Menu"))
            {
                var menuItems = new List <MenuItem>();

                var authenticatedRole = context.Roles.First(x => x.RoleName == "Authenticated");

                menuItems.Add(new MenuItem {
                    LinkText = "Home", LinkURL = "/Home/Index", LinkIcon = "fa-home"
                });
                menuItems.Add(new MenuItem {
                    LinkText = "Blog", LinkURL = "/Blog/Read/Index", LinkIcon = "fa-book"
                });

                context.Menus.Add(new MenuSystem {
                    MenuName = "Main Menu", MenuItems = menuItems
                });

                context.SaveChanges();

                context.Menus.First(x => x.MenuName == "Main Menu").MenuItems.Add(new MenuItem
                {
                    LinkText      = "My Profile",
                    LinkURL       = "/MyProfile/Index",
                    LinkIcon      = "fa-user",
                    MenuItemRoles = new List <MenuItemRole>
                    {
                        new MenuItemRole {
                            RoleId = authenticatedRole.RoleId
                        }
                    }
                });
            }
        }
Exemple #4
0
        public static void Seed(PortalEntityModel context)
        {
            if (context.Pages.Any())
            {
                return;
            }

            context.Pages.Add(new Page
            {
                PageId           = 1,
                PageName         = "Home",
                PageController   = "Home",
                PageAction       = "Index",
                DateAdded        = DateTime.Now,
                DateUpdated      = DateTime.Now,
                PageAssociations = new List <PageAssociation>
                {
                    new PageAssociation {
                        PageSection = new PageSection {
                            PageSectionBody = "<section id=\"section-1\" class=\"header-split background-static height-medium background-picture\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/sample-2.jpg');background-size: cover;\"> <div id=\"element-2-1491154727776-1\" class=\"details-wrapper\"><div id=\"element-3-1491154727776-1\" class=\"details component-container vertical-alignment\"><div id=\"element-4-1491154727776-1\" class=\"freestyle\"><h1 id=\"element-5-1491154727776-1\" class=\"mce-content-body\" style=\"position: relative; text-align: right;\">PortalCMS 1.3</h1><p id=\"element-6-1491154727776-1\" class=\"mce-content-body\" style=\"position: relative; text-align: right;\">Your website is now ready to use, to start register your first account. The first account registered becomes the owner.</p></div><a id=\"element-8-1491154727776-1\" href=\"/Authentication/Registration/Index\" data-title=\"Register First Account\" class=\"launch-modal btn square\" target=\"\">Register Account</a><a id=\"element-1-1491154800156-1\" href=\"http://www.portalcms.online\" class=\"btn square\" target=\"_blank\">Learn More...</a></div></div><div id=\"element-9-1491154727776-1\" class=\"overlay overlay-light ui-droppable\"></div></section>"
                        },
                    },
                    new PageAssociation {
                        PageSection = new PageSection {
                            PageSectionBody = "<section id=\"section-2\" class=\"blank height-medium background-static background-colour\" style=\"background-color: #ffffff;\"><div id=\"element-2-1491155804593-2\" class=\"container component-container ui-droppable\"><div id=\"element-3-1491155804593-2\" class=\"freestyle\"><h2 id=\"element-4-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Getting Started</h2><p id=\"element-5-1491155804593-2\" class=\"mce-content-body\" style=\"position: relative;\">We try to make it as simple to get started&nbsp;as possible, but there will always be a bit of a learning curve. Read on to learn about some quick ways to get started.</p></div></div><div id=\"element-6-1491155804593-2\" class=\"container component-container ui-droppable\"><div id=\"element-7-1491155804593-2\" class=\"row component-container ui-droppable\"><div id=\"element-8-1491155804593-2\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"element-9-1491155804593-2\" class=\"image image-icon\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/icon-9.png');\"></div><div id=\"element-10-1491155804593-2\" class=\"freestyle\"><h4 id=\"element-11-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Add Content</h4><p id=\"element-12-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">The \"Add\" button in the bottom right of your screen allows you to add Sections and Components to your Page</p></div></div><div id=\"element-13-1491155804593-2\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"element-14-1491155804593-2\" class=\"image image-icon\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/icon-7.png');\"></div><div id=\"element-15-1491155804593-2\" class=\"freestyle\"><h4 id=\"element-17-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Edit Content</h4><p id=\"element-18-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Click on any text or images to change them completely. Or look in the top left of a Section for more controls.</p></div></div><div id=\"element-18-1491155804593-2\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"element-19-1491155804593-2\" class=\"image image-icon\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/icon-11.png');\"></div><div id=\"element-20-1491155804593-2\" class=\"freestyle\"><h4 id=\"element-23-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Write Blog Posts</h4><p id=\"element-24-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Write a blog Post by clicking \"Add\" in the bottom right of your screen. Or Edit the sample post.</p></div></div><div id=\"element-23-1491155804593-2\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"element-24-1491155804593-2\" class=\"image image-icon\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/icon-12.png');\"></div><div id=\"element-25-1491155804593-2\" class=\"freestyle\"><h4 id=\"element-11-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Use the Admin Panel</h4><p id=\"element-12-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Click on the Admin Cog in the bottom right of your screen to get into the Admin Panel.</p></div></div><div id=\"element-28-1491155804593-2\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"element-29-1491155804593-2\" class=\"image image-icon\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/icon-10.png');\"></div><div id=\"element-30-1491155804593-2\" class=\"freestyle\"><h4 id=\"element-11-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Upload Media</h4><p id=\"element-12-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Click on the \"Add\" button in the bottom right of your screen to upload your own Images.</p></div></div><div id=\"element-33-1491155804593-2\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"element-34-1491155804593-2\" class=\"image image-icon\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/icon-8.png');\"></div><div id=\"element-35-1491155804593-2\" class=\"freestyle\"><h4 id=\"element-11-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Delete Content</h4><p id=\"element-12-1491154890495-6\" class=\"mce-content-body\" style=\"position: relative;\">Click on the Cog in the top left of each Section to delete it and start off with a fresh clean Page.</p></div></div></div></div></section>"
                        },
                    },
                }
            });
        }
Exemple #5
0
        public static void Seed(PortalEntityModel context)
        {
            if (!context.Images.Any())
            {
                var images = new List <Image>();

                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/icon-1.png", ImageCategory = ImageCategory.Icon
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/icon-2.png", ImageCategory = ImageCategory.Icon
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/icon-3.png", ImageCategory = ImageCategory.Icon
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/icon-4.png", ImageCategory = ImageCategory.Icon
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/icon-5.png", ImageCategory = ImageCategory.Icon
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/icon-6.png", ImageCategory = ImageCategory.Icon
                });

                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/pattern-1.png", ImageCategory = ImageCategory.Texture
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/texture-linen.png", ImageCategory = ImageCategory.Texture
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/texture-notebook.png", ImageCategory = ImageCategory.Texture
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/texture-office.png", ImageCategory = ImageCategory.Texture
                });

                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/sample-1.jpg", ImageCategory = ImageCategory.General
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/sample-2.jpg", ImageCategory = ImageCategory.General
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/sample-3.jpg", ImageCategory = ImageCategory.General
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/sample-4.jpg", ImageCategory = ImageCategory.General
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/sample-5.jpg", ImageCategory = ImageCategory.General
                });
                images.Add(new Image {
                    ImagePath = "/Areas/Builder/Content/Images/Sample/sample-6.jpg", ImageCategory = ImageCategory.General
                });

                context.Images.AddRange(images);
            }
        }
Exemple #6
0
        public static void Seed(PortalEntityModel context)
        {
            var settingList = context.Settings.ToList();

            var newSettings = new List <Setting>();

            if (!settingList.Any(x => x.SettingName == "Website Name"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Website Name", SettingValue = "Portal CMS"
                });
            }

            if (!settingList.Any(x => x.SettingName == "Description Meta Tag"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Description Meta Tag", SettingValue = "Portal CMS is a fully featured content management system with a powerful integrated page builder."
                });
            }

            if (!settingList.Any(x => x.SettingName == "Google Analytics Tracking ID"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Google Analytics Tracking ID", SettingValue = ""
                });
            }

            if (!settingList.Any(x => x.SettingName == "Email From Address"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Email From Address", SettingValue = ""
                });
            }

            if (!settingList.Any(x => x.SettingName == "SendGrid UserName"))
            {
                newSettings.Add(new Setting {
                    SettingName = "SendGrid UserName", SettingValue = ""
                });
            }

            if (!settingList.Any(x => x.SettingName == "SendGrid Password"))
            {
                newSettings.Add(new Setting {
                    SettingName = "SendGrid Password", SettingValue = ""
                });
            }

            if (!settingList.Any(x => x.SettingName == "CDN Address"))
            {
                newSettings.Add(new Setting {
                    SettingName = "CDN Address", SettingValue = ""
                });
            }

            if (newSettings.Any())
            {
                context.Settings.AddRange(newSettings);
            }
        }
 public static void Seed(PortalEntityModel context)
 {
     if (!context.PostCategories.Any())
     {
         context.PostCategories.Add(new PostCategory {
             PostCategoryName = "Blog"
         });
     }
 }
Exemple #8
0
        public void Initialise()
        {
            var connection = Effort.DbConnectionFactory.CreateTransient();

            _mockContext = new PortalEntityModel(connection);
            _mockContext.Database.CreateIfNotExists();

            _userService = new UserService(_mockContext);
            _roleService = new RoleService(_mockContext, _userService);
        }
Exemple #9
0
        public static void Seed(PortalEntityModel context)
        {
            var copyList    = context.CopyItems.ToList();
            var newCopyList = new List <CopyItem>();

            if (!copyList.Any(x => x.CopyName == "No Posts Message"))
            {
                newCopyList.Add(new CopyItem {
                    CopyName = "No Posts Message", CopyBody = "<h4>No More Posts</h4><p>There aren't any more Posts to show you yet, but we are writing more so check back soon.</p>", DateAdded = DateTime.Now, DateUpdated = DateTime.Now
                });
            }

            if (!copyList.Any(x => x.CopyName == "No Comments Message"))
            {
                newCopyList.Add(new CopyItem {
                    CopyName = "No Comments Message", CopyBody = "<h4>No Comments Left Yet</h4><p>Why not add your own comments or thoughts to get the chat started?</p>", DateAdded = DateTime.Now, DateUpdated = DateTime.Now
                });
            }

            if (!copyList.Any(x => x.CopyName == "No Gallery Message"))
            {
                newCopyList.Add(new CopyItem {
                    CopyName = "No Gallery Message", CopyBody = "<h4>No Gallery Images</h4><p>Sometimes we add relevant images to a photo gallery, but we don't have any for this post.</p>", DateAdded = DateTime.Now, DateUpdated = DateTime.Now
                });
            }

            if (!copyList.Any(x => x.CopyName == "Sign In Message"))
            {
                newCopyList.Add(new CopyItem {
                    CopyName = "Sign In Message", CopyBody = "<p>Please enter your sign in details below.</p>", DateAdded = DateTime.Now, DateUpdated = DateTime.Now
                });
            }

            if (!copyList.Any(x => x.CopyName == "Update Account Message"))
            {
                newCopyList.Add(new CopyItem {
                    CopyName = "Update Account Message", CopyBody = "<p>If you change your email address, please remember to use this when logging in.</p>", DateAdded = DateTime.Now, DateUpdated = DateTime.Now
                });
            }

            if (!copyList.Any(x => x.CopyName == "Advanced Partial Message"))
            {
                newCopyList.Add(new CopyItem {
                    CopyName = "Advanced Partial Message", CopyBody = "<h2>Recent Blog Posts</h2><p>Here is a sample of our most recent blog posts. Check back periodically as we are writing more...</p>", DateAdded = DateTime.Now, DateUpdated = DateTime.Now
                });
            }

            if (newCopyList.Any())
            {
                context.CopyItems.AddRange(newCopyList);
            }
        }
Exemple #10
0
        public static void Seed(PortalEntityModel context)
        {
            if (!context.Pages.Any())
            {
                context.Pages.Add(new Entities.PageBuilder.Page
                {
                    PageName       = "Homepage",
                    PageController = "Home",
                    PageAction     = "Index",
                    DateAdded      = DateTime.Now,
                    DateUpdated    = DateTime.Now,
                    PageSections   = new List <PageSection>
                    {
                        new Entities.PageBuilder.PageSection {
                            PageSectionTypeId = context.PageSectionTypes.First(x => x.PageSectionTypeName == "Introduction").PageSectionTypeId, PageSectionBody = "<section id=\"section-1\" class=\"header background-parallax height-tall\"><div class=\"overlay-medium\"></div><div id=\"component-250716214738-1\" class=\"vertical-alignment component-container\"><h1 id=\"component-250716214837-1\">Welcome to Portal CMS</h1><p id=\"component-250716214849-1\"><span style=\"line-height: 28.5714px;\">Incase you didn't already know, Portal CMS is a fully featured content management system with a powerful integrated Page Builder.</span></p><p id=\"component-250716214853-1\">Your new website is going to be great! But you need to do one thing before you start making your masterpiece.</p><a id=\"component-250716214932-1\" href=\"Admin/Authentication/Register\" class=\"btn launch-modal\" data-title=\"Register Admin Account\">Register Admin Account.</a></div></section>"
                        },
                        new Entities.PageBuilder.PageSection {
                            PageSectionTypeId = context.PageSectionTypes.First(x => x.PageSectionTypeName == "Split Content (Image x2)").PageSectionTypeId, PageSectionBody = "<section id=\"section-2\" class=\"blank height-medium background-static\" style=\"background-size: contain;\"><h1 id=\"title-250716215109-2\">What do you need to know?</h1><p id=\"subtitle-250716215109-2\">Portal CMS is designed to be easy to use, but if you are new to the technology here are a few useful pointers.</p><div id=\"component-250716215109-2\" class=\"container component-container\"><div id=\"row-250716215109-2\" class=\"row component-container\"><div id=\"group-1-250716215109-2\" class=\"col-xs-12 col-sm-6 component-container\"><div id=\"image-1-250716215109-2\" class=\"image image-standard\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/sample-1.jpg');\"></div><h4 id=\"title-1-250716215109-2\">Click or Tap to Edit Content</h4><p id=\"subtitle-1-250716215109-2\">In the Page Builder you can change anything, simply click or tap it and change away. You don't need to worry about saving, we take care of that automatically. You can even add your own components and sections. Why not play around to learn how it works?</p></div><div id=\"group-2-250716215109-2\" class=\"col-xs-12 col-sm-6 component-container\"><div id=\"image-2-250716215109-2\" class=\"image image-standard\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/sample-3.jpg');\"></div><h4 id=\"title-2-250716215109-2\">Visit the Administration Panel</h4><p id=\"subtitle-2-250716215109-2\">The Administration Panel contains everything you need to manage your website. You can manage your Media collection, write blog posts, create new pages and more. To access the Administration Panel simply login and click \"Administration\" in the top right.</p></div></div></div></section>"
                        },
                        new Entities.PageBuilder.PageSection {
                            PageSectionTypeId = context.PageSectionTypes.First(x => x.PageSectionTypeName == "Highlight").PageSectionTypeId, PageSectionBody = "<section id=\"section-3\" class=\"highlight height-standard background-parallax\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/sample-2.jpg');background-size: cover;\"><div id=\"component-container-250716215403-3\" class=\"vertical-alignment component-container\"><h1 id=\"title-250716215403-3\" style=\"color: rgb(255, 255, 255);\">More Information</h1><p id=\"text-1-250716215403-3\" style=\"color: rgb(255, 255, 255);\">If you want to learn more about Portal CMS, you can take a look at our promotional website.</p><p id=\"text-2-250716215403-3\" style=\"color: rgb(255, 255, 255);\">We have created a series of demonstration videos, so if you want some more tips on how to use the technology, its&nbsp;worth a visit.</p><a id=\"component-250716215457-3\" href=\"http://www.portalcms.online\" class=\"btn\" target=\"_blank\">Learn More</a></div><div id=\"overlay-250716215403-3\" class=\"overlay overlay-medium\"></div></section>"
                        },
                        new Entities.PageBuilder.PageSection {
                            PageSectionTypeId = context.PageSectionTypes.First(x => x.PageSectionTypeName == "Recent Posts").PageSectionTypeId, PageSectionBody = "<section id=\"section-4\" class=\"blank height-small background-static\" style=\"background-size: contain;\"><h1 id=\"title-31072016183145-4\">Recent Posts</h1><p id=\"text-31072016183145-4\">Here are the most recent posts on our blog.</p><div id=\"widget-31072016183145-4\" class=\"widget-wrapper post-list-wrapper\" style=\"text-align: left;\"><div class=\"vertical-alignment\"><div class=\"loading-wrapper\" style=\"text-align: center;\"><div style=\"background-color: black; padding: 10px; display: inline-block;\"><img src=\"/Areas/Builder/Content/Images/Sample/loading-graphic.gif\"></div></div></div></div></section>"
                        }
                    }
                });

                context.Pages.Add(new Entities.PageBuilder.Page
                {
                    PageName       = "Error",
                    PageController = "Home",
                    PageAction     = "Error",
                    DateAdded      = DateTime.Now,
                    DateUpdated    = DateTime.Now,
                    PageSections   = new List <PageSection>
                    {
                        new Entities.PageBuilder.PageSection {
                            PageSectionTypeId = context.PageSectionTypes.First(x => x.PageSectionTypeName == "Introduction").PageSectionTypeId, PageSectionBody = "<section id=\"section-5\" class=\"header background-parallax height-tall\"><div class=\"overlay-medium\"></div><div id=\"component-100916160418-5\" class=\"vertical-alignment component-container\"><h1 id=\"title-5\" data-section=\"1\">Server Error</h1><p id=\"subtitle-5\">Sorry but something went wrong. We have logged the problem and will look into it.</p><a id=\"component-1473519891239-5\" onclick=\"history.go(-1);\"  class=\"btn square\" target=\"\">Back</a></div></section>"
                        },
                    }
                });

                context.Pages.Add(new Entities.PageBuilder.Page {
                    PageName = "Contact", PageController = "Contact", PageAction = "Index", DateAdded = DateTime.Now, DateUpdated = DateTime.Now
                });
            }
        }
Exemple #11
0
        public static void Seed(PortalEntityModel context)
        {
            if (!context.Menus.Any(x => x.MenuName == "Main Menu"))
            {
                var menuItems = new List <MenuItem>();

                menuItems.Add(new MenuItem {
                    LinkText = "Home", LinkURL = "/Home/Index", LinkIcon = "fa-home", isParent = false, parentId = 0
                });
                menuItems.Add(new MenuItem {
                    LinkText = "Blog", LinkURL = "/Blog/Read/Index", LinkIcon = "fa-book", isParent = false, parentId = 0
                });

                context.Menus.Add(new MenuSystem {
                    MenuName = "Main Menu", MenuItems = menuItems
                });

                context.SaveChanges();
            }
        }
Exemple #12
0
        public static void Seed(PortalEntityModel context)
        {
            var roleList = context.Roles.ToList();

            var newRoles = new List <Role>();

            if (!roleList.Any(x => x.RoleName == "Admin"))
            {
                newRoles.Add(new Role {
                    RoleName = "Admin", IsAssignable = true
                });
            }

            if (!roleList.Any(x => x.RoleName == "Editor"))
            {
                newRoles.Add(new Role {
                    RoleName = "Editor", IsAssignable = true
                });
            }

            if (!roleList.Any(x => x.RoleName == "Authenticated"))
            {
                newRoles.Add(new Role {
                    RoleName = "Authenticated", IsAssignable = false
                });
            }

            if (!roleList.Any(x => x.RoleName == "Anonymous"))
            {
                newRoles.Add(new Role {
                    RoleName = "Anonymous", IsAssignable = false
                });
            }

            if (newRoles.Any())
            {
                context.Roles.AddRange(newRoles);

                context.SaveChanges();
            }
        }
Exemple #13
0
        public static void Seed(PortalEntityModel context)
        {
            if (!context.Menus.Any(x => x.MenuName == "Main Menu"))
            {
                var menuItems = new List <MenuItem>();

                menuItems.Add(new MenuItem {
                    LinkText = "Home", LinkURL = "/Home/Index", LinkIcon = "fa-home"
                });
                menuItems.Add(new MenuItem {
                    LinkText = "Blog", LinkURL = "/Blog/Index", LinkIcon = "fa-book"
                });
                menuItems.Add(new MenuItem {
                    LinkText = "Contact", LinkURL = "/Contact/Index", LinkIcon = "fa-envelope"
                });

                context.Menus.Add(new Entities.Menu.Menu {
                    MenuName = "Main Menu", MenuItems = menuItems
                });
            }
        }
Exemple #14
0
        public static void Seed(PortalEntityModel context)
        {
            if (!context.Menus.Any(x => x.MenuName == "Main Menu"))
            {
                var menuItems = new List <MenuItem>();

                menuItems.Add(new MenuItem {
                    LinkText = "<span class=\"fa fa-home\"></span>Home", LinkAction = "Index", LinkController = "Home"
                });
                menuItems.Add(new MenuItem {
                    LinkText = "<span class=\"fa fa-rss\"></span>Blog", LinkAction = "Index", LinkController = "Blog"
                });
                menuItems.Add(new MenuItem {
                    LinkText = "<span class=\"fa fa-paper-plane\"></span>Contact", LinkAction = "Index", LinkController = "Contact"
                });

                context.Menus.Add(new Entities.Menu.Menu {
                    MenuName = "Main Menu", MenuItems = menuItems
                });
            }
        }
Exemple #15
0
 public MenuItemService(PortalEntityModel context)
 {
     _context = context;
 }
 public PostCategoryService(PortalEntityModel context)
 {
     _context = context;
 }
Exemple #17
0
 public RegistrationService(PortalEntityModel context)
 {
     _context = context;
 }
 public PostImageService(PortalEntityModel context)
 {
     _context = context;
 }
Exemple #19
0
 public PageComponentService(PortalEntityModel context)
 {
     _context = context;
 }
        public static void Seed(PortalEntityModel context)
        {
            var newComponents = new List <PageComponentType>();

            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Heading (H1)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<h1 id=\"component-<componentStamp>-<sectionId>\">Large Title</h1>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Heading (H2)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<h2 id=\"component-<componentStamp>-<sectionId>\">Medium Title</h2>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Heading (H3)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<h3 id=\"component-<componentStamp>-<sectionId>\">Small Title</h3>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Heading (H4)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<h4 id=\"component-<componentStamp>-<sectionId>\">Tiny Title</h4>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Paragraph", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<p id=\"component-<componentStamp>-<sectionId>\">Standard Paragraph: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Link", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<a id=\"component-<componentStamp>-<sectionId>\" href=\"#\">Hyperlink: Click me to find out more.</a>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Rounded Button", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<a id=\"component-<componentStamp>-<sectionId>\" href=\"#\" class=\"btn\">Rounded Button: Click Me</a>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Square Button", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<a id=\"component-<componentStamp>-<sectionId>\" href=\"#\" class=\"btn square\">Square Button: Click Me</a>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Code", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<code id=\"component-<componentStamp>-<sectionId>\">Code Block: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</code>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Freestyle", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<div id=\"freestyle-<componentStamp>-<sectionId>\" class=\"freestyle\"><h1>Freestyle</h1><p>Anything goes in a Freestyle Component, the limits are your imagination.</p></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "FAQ / Spoiler", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"component-expand component-container\"><div id=\"component-title-<componentStamp>-<sectionId>\"class=\"component-expand-header\"><h3 id=\"title-<componentStamp>-<sectionId>\">FAQ / Spoiler</h3></div><div id=\"component-expand-body-<componentStamp>-<sectionId>\" class=\"component-body component-container\"><div id=\"freestyle-<componentStamp>-<sectionId>\" class=\"freestyle mce-content-body\"><p>This component is great for building an FAQ Page. Click me to edit this text.</p></div></div></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Alert (Danger)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<p class=\"alert alert-danger\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Alert (Warning)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<p class=\"alert alert-warning\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Alert (Info)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<p class=\"alert alert-info\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p>"
            });

            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Avatar", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-circle\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Square", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-square\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Icon", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-icon\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Image", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-standard\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Flex", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentBody = "<img id=\"component-<componentStamp>-<sectionId>\" alt=\"Flexible Image\" class=\"image image-auto\" src=\"/Areas/PageBuilder/Content/Images/Sample/small-sample-1.jpg\">"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Embed Video", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentBody = "<div id=\"element-1-<componentStamp>-<sectionId>\" class=\"video widget-wrapper embed-responsive embed-responsive-16by9\"><iframe class=\"embed-responsive-item\" width=\"640\" height=\"480\" src=\"https://www.youtube.com/embed/C0DPdy98e4c\" frameborder=\"0\" allowfullscreen></iframe></div>"
            });

            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Container", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"container component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Wide Container", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"container component-container container-wide\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Row", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"row component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "<col-lg-2>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 col-lg-2 component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "<col-md-3>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-3 component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "<col-md-4>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "<col-md-6>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "<col-md-8>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-8 component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "<col-md-12>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Overlay (Light)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"overlay overlay-light component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Overlay (Medium)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"overlay overlay-medium component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Overlay (Dark)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"overlay overlay-dark component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Vertical Container", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"vertical-alignment component-container\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Glass (Top)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"glass-top-<componentStamp>-<sectionId>\" class=\"glass glass-top\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Glass (Left)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"glass-left-<componentStamp>-<sectionId>\" class=\"glass glass-left\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Glass (Right)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"glass-right-<componentStamp>-<sectionId>\" class=\"glass glass-right\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Glass (Bottom)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentBody = "<div id=\"glass-bottom-<componentStamp>-<sectionId>\" class=\"glass glass-bottom\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Icon and Text", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<table id=\"imagetext-component-<componentStamp>-<sectionId>\" class=\"icon-text component-container\"><tbody id=\"body-<componentStamp>-<sectionId>\"><tr id=\"column-1-<componentStamp>-<sectionId>\"><td id=\"row-<componentStamp>-<sectionId>\" style=\"width: 75px;\"><div id=\"image-<componentStamp>-<sectionId>\"class=\"image image-icon\" style=\"background-image: url('/Areas/PageBuilder/Content/Images/Sample/icon-1.png');'\" /></td><td id=\"column-2-<componentStamp>-<sectionId>\" style=\"text-align: left;\"><h3 id=\"title-<componentStamp>-<sectionId>\"style=\"margin-bottom: 10px;\">Small Title</h3><p id=\"text-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui.</p></td></tr></tbody></table>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Carousel (4 Slides)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentBody = "<div id=\"carousel-<componentStamp>-<sectionId>\" class=\"carousel slide\" data-ride=\"carousel\"><div id=\"carousel-inner-<componentStamp>-<sectionId>\" class=\"carousel-inner\" role=\"listbox\"><div id=\"item-1-<componentStamp>-<sectionId>\"class=\"item active\"><img id=\"carousel-item-1-<componentStamp>-<sectionId>\" class=\"image image-auto\" src=\"/Areas/PageBuilder/Content/Images/Sample/sample-9.png\"><div id=\"carousel-contaner-1-<componentStamp>-<sectionId>\" class=\"component-container attach-bottom\"><div id=\"freestyle-1-<componentStamp>-<sectionId>\" class=\"freestyle\"><h3 id=\"mce_5\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem Ipsum</span></h3><p id=\"mce_6\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</span></p></div></div></div><div id=\"item-2-<componentStamp>-<sectionId>\"class=\"item\"><img id=\"carousel-item-2-<componentStamp>-<sectionId>\" class=\"image image-auto\" src=\"/Areas/PageBuilder/Content/Images/Sample/sample-9.png\"><div id=\"carousel-contaner-2-<componentStamp>-<sectionId>\" class=\"component-container attach-bottom\"><div id=\"freestyle-2-<componentStamp>-<sectionId>\" class=\"freestyle\"><h3 id=\"mce_5\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem Ipsum</span></h3><p id=\"mce_6\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</span></p></div></div></div><div id=\"item-3-<componentStamp>-<sectionId>\" class=\"item\"><img id=\"carousel-item-3-<componentStamp>-<sectionId>\" class=\"image image-auto\" src=\"/Areas/PageBuilder/Content/Images/Sample/sample-9.png\"><div id=\"carousel-contaner-3-<componentStamp>-<sectionId>\" class=\"component-container attach-bottom\"><div id=\"freestyle-<componentStamp>-<sectionId>\" class=\"freestyle\"><h3 id=\"mce_5\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem Ipsum</span></h3><p id=\"mce_6\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</span></p></div></div></div><div id=\"item-4-<componentStamp>-<sectionId>\" class=\"item\"><img id=\"carousel-item-4-<componentStamp>-<sectionId>\" class=\"image image-auto\" src=\"/Areas/PageBuilder/Content/Images/Sample/sample-9.png\"><div id=\"carousel-contaner-4-<componentStamp>-<sectionId>\" class=\"component-container attach-bottom\"><div id=\"freestyle-<componentStamp>-<sectionId>\" class=\"freestyle\"><h3 id=\"mce_5\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem Ipsum</span></h3><p id=\"mce_6\" class=\"mce-content-body\" style=\"position: relative;\"><span style=\"color: #ffffff;\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</span></p></div></div></div></div><div class=\"left carousel-control\" href=\"#element-1-<componentStamp>-<sectionId>\" role=\"button\" data-slide=\"prev\"><span class=\"carousel-arrow glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span><span class=\"sr-only\">Previous</span></div><div class=\"right carousel-control\" href=\"#element-1-<componentStamp>-<sectionId>\" role=\"button\" data-slide=\"next\"><span class=\"carousel-arrow glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span><span class=\"sr-only\">Next</span></div></div>"
            });

            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Recent Posts (Tiles)", PageComponentTypeCategory = PageComponentTypeCategory.Widget, PageComponentBody = "<div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper\" data-area=\"Blog\" data-controller=\"Widgets\" data-action=\"TilesWidget\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Recent Posts (Retro)", PageComponentTypeCategory = PageComponentTypeCategory.Widget, PageComponentBody = "<div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper\" data-area=\"Blog\" data-controller=\"Widgets\" data-action=\"RetroWidget\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "My Profile Tile", PageComponentTypeCategory = PageComponentTypeCategory.Widget, PageComponentBody = "<div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper\" data-area=\"Profile\" data-controller=\"Widgets\" data-action=\"ProfileWidget\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "My Bio Tile", PageComponentTypeCategory = PageComponentTypeCategory.Widget, PageComponentBody = "<div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper\" data-area=\"Profile\" data-controller=\"Widgets\" data-action=\"BioWidget\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Account Security Tile", PageComponentTypeCategory = PageComponentTypeCategory.Widget, PageComponentBody = "<div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper\" data-area=\"Profile\" data-controller=\"Widgets\" data-action=\"SecurityWidget\"></div>"
            });
            newComponents.Add(new PageComponentType {
                PageComponentTypeName = "Contact Form", PageComponentTypeCategory = PageComponentTypeCategory.Widget, PageComponentBody = "<div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper\" data-area=\"Forms\" data-controller=\"ContactWidgets\" data-action=\"SubmitMessageWidget\"></div>"
            });

            foreach (var component in newComponents)
            {
                component.PageComponentBody = ResolveDuplicateIdentifiers(component.PageComponentBody);
            }

            foreach (var existingComponent in context.PageComponentTypes.ToList())
            {
                var matchedTemplate = newComponents.FirstOrDefault(x => x.PageComponentTypeName == existingComponent.PageComponentTypeName);

                if (matchedTemplate == null)
                {
                    continue;
                }

                if (existingComponent.PageComponentBody != matchedTemplate.PageComponentBody)
                {
                    context.PageComponentTypes.Remove(existingComponent);
                }
                else
                {
                    newComponents.Remove(matchedTemplate);
                }
            }

            context.PageComponentTypes.AddRange(newComponents);
        }
Exemple #21
0
        public static void Seed(PortalEntityModel context)
        {
            var sectionList = context.PageSectionTypes.ToList();

            var newSections = new List <PageSectionType>();

            if (!sectionList.Any(x => x.PageSectionTypeName == "Introduction"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Introduction", PageSectionTypeCategory = PageSectionTypeCategory.Header, PageSectionTypeOrder = 1, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"header background-parallax height-medium\"><div class=\"overlay-medium\"></div><div id=\"component-<componentStamp>-<sectionId>\" class=\"vertical-alignment component-container\"><h1 id=\"title-<sectionId>\" data-section=\"1\">Custom Page</h1><p id=\"subtitle-<sectionId>\">This is copy that can be updated and changed.</p></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Split Intro"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Split Intro", PageSectionTypeCategory = PageSectionTypeCategory.Header, PageSectionTypeOrder = 1, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"header-split background-static height-medium\"><div id=\"details-wrapper-<componentStamp>-<sectionId>\"class=\"details-wrapper component-container\"><div id=\"details-<componentStamp>-<sectionId>\"class=\"details vertical-alignment component-container\"><h1 id=\"title-<componentStamp>-<sectionId>\">Welcome to my Website</h1><p id=\"text-1-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te.</p><p id=\"text-2-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te.</p><a id=\"button-1-<componentStamp>-<sectionId>\" href=\"#\" class=\"btn square\" style=\"margin-right: 10px;\">Register Account</a><a id=\"button-2-<componentStamp>-<sectionId>\"href=\"#\" class=\"btn square\">Learn More</a></div></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Blank Section"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Blank Section", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-medium background-static background-colour\" style=\"background-color: #ffffff;\"></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Block Text"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Block Text", PageSectionTypeCategory = PageSectionTypeCategory.Misc, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"block block-text height-tiny\"><h2 id=\"title-<sectionId>\">Call for a Quote</h2><h2 id=\"subtitle-<sectionId>\">00000 000 000</h2></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Quote"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Quote", PageSectionTypeCategory = PageSectionTypeCategory.Misc, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"quote\"><div class=\"quote-image-left\"></div><div class=\"quote-image-right\"></div><div id=\"container-<componentStamp>-<sectionId>\" class=\"vertical-alignment component-container\"><h2 id=\"quote-<componentStamp>-<sectionId>\">Perfection is not attainable, but if we chase perfection we can catch.</h2><p id=\"component-<componentStamp>-<sectionId>\">Tom McClean</p></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Split Content (Image x2)"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Split Content (Image x2)", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeOrder = 2, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-medium background-static\" style=\"background-size: contain;\"><h2 id=\"title-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h2><p id=\"subtitle-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p><div id=\"component-<componentStamp>-<sectionId>\" class=\"container component-container\"><div id=\"row-<componentStamp>-<sectionId>\" class=\"row component-container\"><div id=\"group-1-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 component-container\"><div id=\"image-1-<componentStamp>-<sectionId>\" class=\"image image-standard\"></div><h4 id=\"title-1-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"subtitle-1-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p><a id=\"button-1-<componentStamp>-<sectionId>\" href=\"#\" class=\"btn\">Click me to find out more.</a></div><div id=\"group-2-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 component-container\"><div id=\"image-2-<componentStamp>-<sectionId>\" class=\"image image-standard\"></div><h4 id=\"title-2-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"subtitle-2-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p><a id=\"button-2-<componentStamp>-<sectionId>\" href=\"#\" class=\"btn\">Click me to find out more.</a></div></div></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Split Content (Icon x6)"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Split Content (Icon x6)", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeOrder = 3, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-medium background-static\" style=\"background-size: contain;\"><h2 id=\"title-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h2><p id=\"subtitle-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p><div id=\"container-<componentStamp>-<sectionId>\" class=\"container component-container\"><div id=\"row-<componentStamp>-<sectionId>\" class=\"row component-container\"><div id=\"item-1-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"><div id=\"icon-1-<componentStamp>-<sectionId>\" class=\"image image-icon\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/icon-1.png');\"></div><h4 id=\"subtitle-1-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"text-1-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div><div id=\"item-2-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"><div id=\"icon-2-<componentStamp>-<sectionId>\" class=\"image image-icon\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/icon-2.png');\"></div><h4 id=\"subtitle-2-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"text-2-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div><div id=\"item-3-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"><div id=\"icon-3-<componentStamp>-<sectionId>\" class=\"image image-icon\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/icon-3.png');\"></div><h4 id=\"subtitle-3-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"text-3-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div><div id=\"item-4-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"><div id=\"icon-4-<componentStamp>-<sectionId>\" class=\"image image-icon\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/icon-4.png');\"></div><h4 id=\"subtitle-4-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"text-4-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div><div id=\"item-5-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"><div id=\"icon-5-<componentStamp>-<sectionId>\" class=\"image image-icon\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/icon-5.png');\"></div><h4 id=\"subtitle-5-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"text-5-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div><div id=\"item-6-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"><div id=\"icon-6-<componentStamp>-<sectionId>\" class=\"image image-icon\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/icon-6.png');\"></div><h4 id=\"subtitle-6-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h4><p id=\"text-6-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div></div></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Highlight"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Highlight", PageSectionTypeCategory = PageSectionTypeCategory.Misc, PageSectionTypeOrder = 4, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"highlight height-standard background-parallax\" style=\"background-size: cover;\"><div id=\"component-container-<componentStamp>-<sectionId>\" class=\"vertical-alignment component-container\"><h2 id=\"title-<componentStamp>-<sectionId>\" style=\"color: rgb(255, 255, 255);\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h2><p id=\"text-1-<componentStamp>-<sectionId>\" style=\"color: rgb(255, 255, 255);\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p><p id=\"text-2-<componentStamp>-<sectionId>\" style=\"color: rgb(255, 255, 255);\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div><div id=\"overlay-<componentStamp>-<sectionId>\" class=\"overlay overlay-medium\"></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Data Table"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Data Table", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-medium background-static\" style=\"background-size: contain;\"><h2 id=\"title-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem.</h2><p id=\"subtitle-<componentStamp>-<sectionId>\">Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p><table id=\"table-<componentStamp>-<sectionId>\" class=\"component-container\"><tr id=\"row-1-<componentStamp>-<sectionId>\" class=\"component-container\"><th id=\"header-1-1-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-1-1-<componentStamp>-<sectionId>\">Header 1</p></th><th id=\"header-1-2-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-1-2-<componentStamp>-<sectionId>\">Header 2</p></th><th id=\"header-1-3-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-1-3-<componentStamp>-<sectionId>\">Header 3</p></th><th id=\"header-1-4-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-1-4-<componentStamp>-<sectionId>\">Header 4</p></th></tr><tr id=\"row-2-<componentStamp>-<sectionId>\" class=\"component-container\"><td id=\"header-2-1-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-2-1-<componentStamp>-<sectionId>\">Data Point 1</p></td><td id=\"header-2-2-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-2-2-<componentStamp>-<sectionId>\">Data Point 2</p></td><td id=\"header-2-3-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-2-3-<componentStamp>-<sectionId>\">Data Point 3</p></td><td id=\"header-2-4-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-2-4-<componentStamp>-<sectionId>\">Data Point 4</p></td></tr><tr id=\"row-3-<componentStamp>-<sectionId>\" class=\"component-container\"><td id=\"header-3-1-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-3-1-<componentStamp>-<sectionId>\">Data Point 1</p></td><td id=\"header-3-2-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-3-2-<componentStamp>-<sectionId>\">Data Point 2</p></td><td id=\"header-3-3-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-3-3-<componentStamp>-<sectionId>\">Data Point 3</p></td><td id=\"header-3-4-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-3-4-<componentStamp>-<sectionId>\">Data Point 4</p></td></tr><tr id=\"row-4-<componentStamp>-<sectionId>\" class=\"component-container\"><td id=\"header-4-1-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-4-1-<componentStamp>-<sectionId>\">Data Point 1</p></td><td id=\"header-4-2-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-4-2-<componentStamp>-<sectionId>\">Data Point 2</p></td><td id=\"header-4-3-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-4-3-<componentStamp>-<sectionId>\">Data Point 3</p></td><td id=\"header-4-4-<componentStamp>-<sectionId>\" class=\"component-container\"><p id=\"label-4-4-<componentStamp>-<sectionId>\">Data Point 4</p></td></tr></table></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Image & Text"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Image & Text", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-small background-static\" style=\"background-size: contain;\"><table id=\"table-<componentStamp>-<sectionId>\" class=\"component-container\"><tr id=\"row-<componentStamp>-<sectionId>\" class=\"component-container\"><td id=\"column-1-<componentStamp>-<sectionId>\" class=\"component-container hidden-xs hidden-sm\"><img id=\"image-<componentStamp>-<sectionId>\" class=\"image image-auto\" alt=\"Row Image\" src=\"/Areas/Builder/Content/Images/Sample/small-sample-1.jpg\"></td><td id=\"column-2-<componentStamp>-<sectionId>\" class=\"component-container\"><h2 id=\"title-<componentStamp>-<sectionId>\">LOREM IPSUM DOLOR SIT AMET.</h2><p id=\"text-<componentStamp>-<sectionId>\"><span style=\"line-height: 28.5714px;\">Lorem ipsum dolor sit amet, cu ignota singulis senserit mei, at mea delenit nonumes luptatum. Ea sea eligendi copiosae, at ius senserit rationibus scriptorem. Sint appareat has et, te mel debet populo admodum. Quo cu utroque accusam, mei duis temporibus no.&nbsp;</span><span style=\"line-height: 28.5714px;\">Ea sea eligendi copiosae, at ius senserit rationibus scriptorem.&nbsp;</span><span style=\"line-height: 28.5714px;\">Ea sea eligendi copiosae, at ius senserit rationibus scriptorem. Sint appareat has et, te mel debet populo admodum.</span><span style=\"line-height: 28.5714px;\">&nbsp;Sint appareat has et, te mel debet populo&nbsp;admodum.</span></p></td></tr></table></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Text & Image"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Text & Image", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-small background-static\" style=\"background-size: contain;\"><table id=\"table-<componentStamp>-<sectionId>\" class=\"component-container\"><tr id=\"row-<componentStamp>-<sectionId>\" class=\"component-container\"><td id=\"column-2-<componentStamp>-<sectionId>\" class=\"component-container\"><h2 id=\"title-<componentStamp>-<sectionId>\">LOREM IPSUM DOLOR SIT AMET.</h2><p id=\"text-<componentStamp>-<sectionId>\"><span style=\"line-height: 28.5714px;\">Lorem ipsum dolor sit amet, cu ignota singulis senserit mei, at mea delenit nonumes luptatum. Ea sea eligendi copiosae, at ius senserit rationibus scriptorem. Sint appareat has et, te mel debet populo admodum. Quo cu utroque accusam, mei duis temporibus no.&nbsp;</span><span style=\"line-height: 28.5714px;\">Ea sea eligendi copiosae, at ius senserit rationibus scriptorem.&nbsp;</span><span style=\"line-height: 28.5714px;\">Ea sea eligendi copiosae, at ius senserit rationibus scriptorem. Sint appareat has et, te mel debet populo admodum.</span><span style=\"line-height: 28.5714px;\">&nbsp;Sint appareat has et, te mel debet populo&nbsp;admodum.</span></p></td><td id=\"column-1-<componentStamp>-<sectionId>\" class=\"component-container hidden-xs hidden-sm\"><img id=\"image-<componentStamp>-<sectionId>\" class=\"image image-auto\" alt=\"Row Image\" src=\"/Areas/Builder/Content/Images/Sample/small-sample-1.jpg\"></td></tr></table></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Contact Form"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Contact Form", PageSectionTypeCategory = PageSectionTypeCategory.Misc, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"contact background-parallax height-medium\"><div class=\"overlay overlay-dark\"></div><div class=\"inner\"><div id=\"container-<componentStamp>-<sectionId>\" class=\"container component-container\"><form action=\"/Build/Contact\" method=\"post\"><h2 id=\"title-<componentStamp>-<sectionId>\">Send an Email</h2><p id=\"text-<componentStamp>-<sectionId>\">We love receiving feedback, both positive and constructive. Please send us your thoughts using the form below, we generally respond within 24 hours.</p><input id=\"pageSectionId\" name=\"pageSectionId\" style=\"display: none;\" value=\"<sectionId>\"><div class=\"row\"><div class=\"col-xs-12 col-sm-6\"><input id=\"yourName\" placeholder=\"Name (Required)\" name=\"yourName\"><input id=\"yourEmail\" placeholder=\"Email Address (Required)\" name=\"yourEmail\"><input id=\"yourSubject\" placeholder=\"Subject\" name=\"yourSubject\"></div><div class=\"col-xs-12 col-sm-6\"><textarea id=\"yourMessage\" placeholder=\"Message (Required)\" name=\"yourMessage\"></textarea></div><div class=\"col-xs-12\"><button>Send Message</button></div></div></form></div></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Photo Gallery"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Photo Gallery", PageSectionTypeCategory = PageSectionTypeCategory.Misc, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"gallery height-standard background-parallax\"><div id=\"image-1-<componentStamp>-<sectionId>\" class=\"image\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/Sample-1.jpg');\"></div><div id=\"image-2-<componentStamp>-<sectionId>\" class=\"image\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/Sample-2.jpg');\"></div><div id=\"image-3-<componentStamp>-<sectionId>\" class=\"image\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/Sample-3.jpg');\"></div><div id=\"image-4-<componentStamp>-<sectionId>\" class=\"image\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/Sample-4.jpg');\"></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Recent Posts"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Recent Posts", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-small background-static\" style=\"background-size: contain;\"><h2 id=\"component-<componentStamp>-<sectionId>\">Recent Posts</h2><p id=\"component-<componentStamp>-<sectionId>\">Here are the most recent posts on our blog.</p><div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper post-list-wrapper\" style=\"text-align: left;\"><div class=\"vertical-alignment\"><div class=\"loading-wrapper\" style=\"text-align: center;\"><div style=\"background-color: black; padding: 10px; display: inline-block;\"><img alt=\"Loading Graphic\" src=\"/Areas/Builder/Content/Images/Sample/loading-graphic.gif\"></div></div></div></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Simple Information Block (Option 1)"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Simple Information Block (Option 1)", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-small background-static background-colour\" style=\"background-color: #5864AE;\"><div id=\"container-<componentStamp>-<sectionId>\" class=\"container component-container ui-droppable\"><div id=\"row-<componentStamp>-<sectionId>\" class=\"row component-container ui-droppable\"><div id=\"left-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"image-<componentStamp>-<sectionId>\" class=\"image image-standard\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/sample-rocket.png');\"></div></div><div id=\"right-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-8 component-container ui-droppable\" style=\"text-align: left;\"><h2 id=\"title-<componentStamp>-<sectionId>\" class=\"\"><span style=\"color: #ffffff;\">Medium Title</span></h2><p id=\"text-<componentStamp>-<sectionId>\" class=\"\"><span style=\"color: #ffffff;\">Standard Paragraph: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</span></p><p id=\"text-2-<componentStamp>-<sectionId>\" class=\"\"><span style=\"color: #ffffff;\">Standard Paragraph: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</span></p></div></div></div></section>"
                });
            }

            if (!sectionList.Any(x => x.PageSectionTypeName == "Simple Information Block (Option 2)"))
            {
                newSections.Add(new PageSectionType {
                    PageSectionTypeName = "Simple Information Block (Option 2)", PageSectionTypeCategory = PageSectionTypeCategory.Content, PageSectionTypeBody = "<section id=\"section-<sectionId>\" class=\"blank height-small background-static background-colour\" style=\"background-color: #FFFFFF;\"><div id=\"container-<componentStamp>-<sectionId>\" class=\"container component-container ui-droppable\"><div id=\"row-<componentStamp>-<sectionId>\" class=\"row component-container ui-droppable\"><div id=\"right-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-8 component-container ui-droppable\" style=\"text-align: left;\"><h2 id=\"title-<componentStamp>-<sectionId>\" class=\"\">Medium Title</h2><p id=\"text-<componentStamp>-<sectionId>\">Standard Paragraph: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p><p id=\"text-2-<componentStamp>-<sectionId>\">Standard Paragraph: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p></div><div id=\"left-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container ui-droppable\"><div id=\"image-<componentStamp>-<sectionId>\" class=\"image image-standard\" style=\"background-image: url('/Areas/Builder/Content/Images/Sample/sample-help.png');\"></div></div></div></div></section>"
                });
            }

            if (newSections.Any())
            {
                context.PageSectionTypes.AddRange(newSections);
            }
        }
Exemple #22
0
        public static void Seed(PortalEntityModel context)
        {
            var settingList = context.Settings.ToList();

            var newSettings = new List <Setting>();

            if (!settingList.Any(x => x.SettingName == "Website Name"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Website Name", SettingValue = "Portal CMS"
                });
            }

            if (!settingList.Any(x => x.SettingName == "Description Meta Tag"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Description Meta Tag", SettingValue = "Portal CMS is a fully featured content management system with a powerful integrated page builder."
                });
            }

            if (!settingList.Any(x => x.SettingName == "Google Analytics Tracking ID"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Google Analytics Tracking ID", SettingValue = ""
                });
            }

            if (!settingList.Any(x => x.SettingName == "Email From Address"))
            {
                newSettings.Add(new Setting {
                    SettingName = "Email From Address", SettingValue = ""
                });
            }

            if (!settingList.Any(x => x.SettingName == "SendGrid ApiKey"))
            {
                newSettings.Add(new Setting {
                    SettingName = "SendGrid ApiKey", SettingValue = ""
                });
            }

            if (!settingList.Any(x => x.SettingName == "CDN Address"))
            {
                newSettings.Add(new Setting {
                    SettingName = "CDN Address", SettingValue = ""
                });
            }

            if (newSettings.Any())
            {
                context.Settings.AddRange(newSettings);
            }

            var obseleteSettings = context.Settings
                                   .Where(x =>
                                          "SendGrid UserName".Equals(x.SettingName, System.StringComparison.OrdinalIgnoreCase) ||
                                          "SendGrid Password".Equals(x.SettingName, System.StringComparison.OrdinalIgnoreCase))
                                   .ToList();

            if (obseleteSettings.Any())
            {
                context.Settings.RemoveRange(obseleteSettings);
            }
        }
 public PageAssociationService(PortalEntityModel context)
 {
     _context = context;
 }
Exemple #24
0
 public PostService(PortalEntityModel context, IUserService userService, IRoleService roleService)
 {
     _context     = context;
     _userService = userService;
     _roleService = roleService;
 }
Exemple #25
0
 public ThemeService(PortalEntityModel context, IPageService pageService)
 {
     _context     = context;
     _pageService = pageService;
 }
Exemple #26
0
 public FontService(PortalEntityModel context)
 {
     _context = context;
 }
Exemple #27
0
 public LoginService(PortalEntityModel context, ITokenService tokenService)
 {
     _context      = context;
     _tokenService = tokenService;
 }
Exemple #28
0
 public AnalyticsService(PortalEntityModel context)
 {
     _context = context;
 }
        public static void Seed(PortalEntityModel context)
        {
            var componentList = context.PageComponentTypes.ToList();

            var newComponents = new List <PageComponentType>();

            if (!componentList.Any(x => x.PageComponentTypeName == "Heading (H1)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Heading (H1)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Large Title Text Element.", PageComponentBody = "<h1 id=\"component-<componentStamp>-<sectionId>\">Large Title</h1>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Heading (H2)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Heading (H2)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Large Title Text Element", PageComponentBody = "<h2 id=\"component-<componentStamp>-<sectionId>\">Medium Title</h2>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Heading (H3)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Heading (H3)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Title Text Element", PageComponentBody = "<h3 id=\"component-<componentStamp>-<sectionId>\">Small Title</h3>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Heading (H4)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Heading (H4)", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Title Text Element", PageComponentBody = "<h4 id=\"component-<componentStamp>-<sectionId>\">Tiny Title</h4>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Paragraph"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Paragraph", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Single Paragraph Element.", PageComponentBody = "<p id=\"component-<componentStamp>-<sectionId>\">Standard Paragraph: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</p>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Link"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Link", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Link to Another Page", PageComponentBody = "<a id=\"component-<componentStamp>-<sectionId>\" href=\"#\">Hyperlink: Click me to find out more.</a>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Rounded Button"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Rounded Button", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Button Link to Another Page", PageComponentBody = "<a id=\"component-<componentStamp>-<sectionId>\" href=\"#\" class=\"btn\">Rounded Button: Click Me</a>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Square Button"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Square Button", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Button Link to Another Page", PageComponentBody = "<a id=\"component-<componentStamp>-<sectionId>\" href=\"#\" class=\"btn square\">Square Button: Click Me</a>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Code"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Code", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Single Paragraph Element.", PageComponentBody = "<code id=\"component-<componentStamp>-<sectionId>\">Code Block: Lorem ipsum dolor sit amet, eu qui accusam scriptorem. Purto erat facilisis sea id, vulputate deseruisse eos te, errem doctus feugiat te prim.</code>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Freestyle"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Freestyle", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Single Paragraph Element.", PageComponentBody = "<div id=\"freestyle-<componentStamp>-<sectionId>\" class=\"freestyle\"><h1>Freestyle</h1><p>Anything goes in a Freestyle Component, the limits are your imagination.</p></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "FAQ / Spoiler"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "FAQ / Spoiler", PageComponentTypeCategory = PageComponentTypeCategory.Text, PageComponentTypeDescription = "Single Paragraph Element.", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"component-expand component-container\"><div id=\"component-title-<componentStamp>-<sectionId>\"class=\"component-expand-header\"><h3 id=\"title-<componentStamp>-<sectionId>\">FAQ / Spoiler</h3></div><div id=\"component-expand-body-<componentStamp>-<sectionId>\" class=\"component-body component-container\"><div id=\"freestyle-<componentStamp>-<sectionId>\" class=\"freestyle mce-content-body\"><p>This component is great for building an FAQ Page. Click me to edit this text.</p></div></div></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Avatar"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Avatar", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentTypeDescription = "Small Circular Image", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-circle\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Square"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Square", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentTypeDescription = "Small Square Image", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-square\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Icon"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Icon", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentTypeDescription = "Tiny Square Image", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-icon\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Image"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Image", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentTypeDescription = "Standard Rectangular Image", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"image image-standard\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Flex"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Flex", PageComponentTypeCategory = PageComponentTypeCategory.Image, PageComponentTypeDescription = "Image That Flexes To Native Size", PageComponentBody = "<img id=\"component-<componentStamp>-<sectionId>\" class=\"image image-auto\" src=\"/Areas/Builder/Content/Images/Sample/small-sample-1.jpg\">"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Container"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Container", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentTypeDescription = "Empty Bootstrap Container", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"container component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Row"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Row", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentTypeDescription = "Empty Bootstrap Row", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"row component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "<col-lg-2>"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "<col-lg-2>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentTypeDescription = "Empty Bootstrap Column", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 col-lg-2 component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "<col-md-3>"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "<col-md-3>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentTypeDescription = "Empty Bootstrap Column", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-3 component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "<col-md-4>"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "<col-md-4>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentTypeDescription = "Empty Bootstrap Column", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 col-md-4 component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "<col-md-6>"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "<col-md-6>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentTypeDescription = "Empty Bootstrap Column", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 col-sm-6 component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "<col-md-12>"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "<col-md-12>", PageComponentTypeCategory = PageComponentTypeCategory.Bootstrap, PageComponentTypeDescription = "Empty Bootstrap Column", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"col-xs-12 component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Overlay (Light)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Overlay (Light)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Light Absolute Overlay", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"overlay overlay-light component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Overlay (Medium)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Overlay (Medium)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Medium Absolute Overlay", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"overlay overlay-medium component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Overlay (Dark)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Overlay (Dark)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Dark Absolute Overlay", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"overlay overlay-dark component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Vertical Container"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Vertical Container", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Vertically Alligned Container", PageComponentBody = "<div id=\"component-<componentStamp>-<sectionId>\" class=\"vertical-alignment component-container\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Glass (Top)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Glass (Top)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Vertically Alligned Container", PageComponentBody = "<div id=\"glass-top-<componentStamp>-<sectionId>\" class=\"glass glass-top\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Glass (Left)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Glass (Left)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Vertically Alligned Container", PageComponentBody = "<div id=\"glass-left-<componentStamp>-<sectionId>\" class=\"glass glass-left\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Glass (Right)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Glass (Right)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Vertically Alligned Container", PageComponentBody = "<div id=\"glass-right-<componentStamp>-<sectionId>\" class=\"glass glass-right\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Glass (Bottom)"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Glass (Bottom)", PageComponentTypeCategory = PageComponentTypeCategory.UI, PageComponentTypeDescription = "Vertically Alligned Container", PageComponentBody = "<div id=\"glass-bottom-<componentStamp>-<sectionId>\" class=\"glass glass-bottom\"></div>"
                });
            }

            if (!componentList.Any(x => x.PageComponentTypeName == "Recent Posts"))
            {
                newComponents.Add(new PageComponentType {
                    PageComponentTypeName = "Recent Posts", PageComponentTypeCategory = PageComponentTypeCategory.Widget, PageComponentTypeDescription = "Vertically Alligned Container", PageComponentBody = "<div id=\"widget-<componentStamp>-<sectionId>\" class=\"widget-wrapper post-list-wrapper\" style=\"text-align: left;\"><div class=\"vertical-alignment\"><div class=\"loading-wrapper\" style=\"text-align: center;\"><div style=\"background-color: black; padding: 10px; display: inline-block;\"><img src=\"/Areas/Builder/Content/Images/Sample/loading-graphic.gif\" /></div></div></div></div>"
                });
            }

            if (newComponents.Any())
            {
                context.PageComponentTypes.AddRange(newComponents);
            }
        }
Exemple #30
0
 public RoleService(PortalEntityModel context, IUserService userService)
 {
     _context     = context;
     _userService = userService;
 }