public ActionResult SitecoreIndex() { model = new SiteTopNavModel(); #region legacy code bxgOwner = (Owner)Session["BXGOwner"]; TPexpired = false; model.TPRenewLink = false; IdentifyNavigatorType(); TravelerplusLandscape(); CheckForPointsUpdate(bxgOwner); //getFullPath(); #endregion SetMenuItemControlValues(model); var root = CurrentPage.AncestorOrSelf(1); model.SiteName = root.GetPropertyValue <string>("siteName"); if (string.IsNullOrWhiteSpace(model.SiteName)) { model.SiteName = root.Name; } model.Title = CurrentPage.GetPropertyValue <string>("title"); if (string.IsNullOrWhiteSpace(model.Title)) { model.Title = CurrentPage.Name; } model.MainNavigation = mapNavigation(root).ToList(); // Set Owner Details To Model model.PointsTotal = bxgOwner.PointsTotal; model.PaymentBalance = bxgOwner.PaymentBalance; model.InstallStatus = "NULL"; if (bxgOwner.InstallmentPlan[0].InstallmentStatus != null) { model.InstallStatus = bxgOwner.InstallmentPlan[0].InstallmentStatus.Replace(" ", "") == "" ? "NULL" : bxgOwner.InstallmentPlan[0].InstallmentStatus; } //return PartialView("ResponsiveNavBar", model); return(PartialView("SitecoreTopNav", model)); }
// // GET: /SiteTopNav/ public ActionResult Index() { model = new SiteTopNavModel(); #region legacy code bxgOwner = (Owner)Session["BXGOwner"]; TPexpired = false; model.TPRenewLink = false; //if (IsPostBack) { //m_BGColor = ViewState("m_BGColor") //m_BGMainColor = ViewState("m_BGMainColor") //m_ForeColor = ViewState("m_ForeColor") //m_iMenuHeight = ViewState("m_iMenuHeight") //} IdentifyNavigatorType(); TravelerplusLandscape(); //getFullPath(); #endregion SetMenuItemControlValues(model); var root = CurrentPage.AncestorOrSelf(1); model.SiteName = root.GetPropertyValue <string>("siteName"); if (string.IsNullOrWhiteSpace(model.SiteName)) { model.SiteName = root.Name; } model.Title = CurrentPage.GetPropertyValue <string>("title"); if (string.IsNullOrWhiteSpace(model.Title)) { model.Title = CurrentPage.Name; } model.MainNavigation = mapNavigation(root).ToList(); //return PartialView("ResponsiveNavBar", model); return(PartialView("SiteTopNav", model)); }
// Specify menu items to be hidden or shown based on owner type private void SetMenuItemControlValues(SiteTopNavModel model) { // Home model.EnableHome = (model.NavigatorType != "Pending" && model.NavigatorType != "Corporate" && model.NavigatorType != "Fixed" && model.NavigatorType != "Flex"); model.EnableTutorialsAndWebinars = model.NavigatorType != "Sampler"; model.EnableBluegreenMemories = TPexpired && model.NavigatorType != "Travelerplus"; model.EnableOwnerUpdate = !model.IsTravelerPlusEmployee; if (model.IsTravelerPlusEmployee) { model.HomeURL = "/TravelerPlus/owner/home.aspx"; } if (model.NavigatorType == "Fixed") { model.HomeURL = "/owner/homefixed.aspx"; } if (model.NavigatorType == "explore") { model.HomeURL = "/explore/home.aspx"; } // Reservations model.EnablePointsReservations = ((!model.IsTravelerPlusEmployee && model.NavigatorType != "Fixed") || (model.IsPremierOwner && model.NavigatorType != "Fixed")); model.EnableBonusTimeReservations = model.NavigatorType == "owner" || model.NavigatorType == "Travelerplus" || (model.NavigatorType == "Sampler" && model.HomeProject == "52"); model.EnableCalculatePoints = model.NavigatorType != "Fixed"; model.EnableReservationsOurResorts = model.NavigatorType == "Fixed"; model.EnableTravelServices = (model.NavigatorType != "Sampler" || (model.NavigatorType == "Sampler" && model.HomeProject == "52")); model.EnableResMenuResReminder = ((model.NavigatorType != "Sampler" && model.NavigatorType != "Fixed" && model.NavigatorType != "Flex") || (model.NavigatorType == "Sampler" && model.HomeProject == "52") || (model.IsPremierOwner && model.NavigatorType != "Fixed")); model.EnableChoiceHotels = model.NavigatorType != "Sampler" || model.IsPremierOwner; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Setting the URL for the Reservations...Travel Services menu item. It is ordered so that the conditions are mutually exclusive and FIFO (in other words, if an account is Sampler and somehow // TravelerPlusEmployee (should never happen, but...), the first match takes precedence. if (model.NavigatorType == "owner" || model.NavigatorType == "Sampler") { model.ReservationTravelServicesURL = "/owner/TravelServices.aspx"; } else if (model.IsTravelerPlusEmployee) { if (model.IsTPExpired) { model.ReservationTravelServicesURL = "/TravelerPlus/owner/TravelServices.aspx"; } } else if (model.IsPremierOwner || model.NavigatorType == "Travelerplus" || model.NavigatorType == "Fixed") { model.ReservationTravelServicesURL = "/owner/TravelServices.aspx"; } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // My Account model.EnableMyAccount = true; model.EnableGoGreen = (!model.IsTravelerPlusEmployee && model.NavigatorType != "Sampler"); model.EnableMyAccountBluegreenPremier = (!(model.NavigatorType == "Sampler" || model.NavigatorType == "Fixed") && model.ShowGuestProfile != "V"); model.EnableFreeStayCertificate = model.ShowGuestProfile == "P" || model.ShowGuestProfile == "G"; model.EnableChoicePrivileges = (model.NavigatorType == "owner" || model.NavigatorType == "Sampler" || model.IsPremierOwner || model.NavigatorType == "Travelerplus") && model.ContractType != "Sampler"; model.EnableMyPoints = (model.NavigatorType != "Fixed" && model.NavigatorType != "Flex" && !model.IsTravelerPlusEmployee); model.MyPointsURL = (Session["IsFixedFlexOrTraditionalOwner"] is bool && (bool)Session["IsFixedFlexOrTraditionalOwner"]) ? "/owner/ownerAccount.aspx" : CustomHtmlHelpers.GetFullSitePath(null) + "/my-points"; // Payments model.EnablePayments = true; model.EnablePrePayment = (!model.IsTravelerPlusEmployee && !InstalPayEligible); model.EnableViewInstallmentPlan = InstalPayEligible; model.EnableChangeInstallPlanCC = InstalPayEligible && (InstallStatus == "IP"); // Traveler Plus model.EnableTravelerPlus = ((model.NavigatorType == "Travelerplus" || model.IsPremierOwner) && !TPexpired); model.TravelerPlusLevel = TrvelerPlusLevel; model.EnableRenewTravelerPlus = model.TPRenewLink; ///////////////////////////////////////////////////////////////////////////// // Setting the URL for when owner clicks on top level Traveler Plus menu item if (model.NavigatorType == "owner" || model.NavigatorType == "Sampler" || model.NavigatorType == "Fixed") { model.TravelerPlusURL = "/owner/vcTravelerPlus.aspx"; } else if (model.IsTravelerPlusEmployee) { model.TravelerPlusURL = "/TravelerPlus/owner/home.aspx"; } else if (model.IsPremierOwner || model.NavigatorType == "Travelerplus") { if (bxgOwner.User[0].AllAccountsComesFromSecondaryMarketing && TPexpired) { model.TravelerPlusURL = "/owner/vcTravelerPlus.aspx"; } else { model.TravelerPlusURL = "/TravelerPlus/owner/home.aspx"; } } ///////////////////////////////////////////////////////////////////////////// // Bluegreen Rewards model.EnableBluegreenRewards = (!model.IsTravelerPlusEmployee && model.NavigatorType != "Sampler"); model.EnableRegisterFriends = (model.NavigatorType == "Travelerplus" && tpnav) || model.NavigatorType == "Fixed" || model.NavigatorType == "Pending"; model.EnableSendOffersToFriends = (model.NavigatorType == "Travelerplus" && tpnav) || model.NavigatorType == "Fixed" || model.NavigatorType == "Pending"; model.EnableReferralParties = (model.NavigatorType == "Travelerplus" && !tpnav); // Using the Club model.EnableVacationClub = model.ContractType.ToUpper() != "TRADITIONAL" && model.NavigatorType != "Sampler"; model.EnableVacationClubFixedMenu = (model.NavigatorType == "Fixed"); model.EnableBluegreenPremier = model.ShowGuestProfile == "V" && model.NavigatorType != "Sampler" && model.NavigatorType != "Fixed" && model.ContractType.ToUpper() != "TRADITIONAL" && !model.IsTravelerPlusEmployee; if (model.ContractType == "Vacation Club") { model.UsingTheClubURL = ConfigurationManager.AppSettings["UsingTheClub_VCOwner"]; } else if (model.NavigatorType == "Sampler") { if (model.HomeProject == "52") { model.UsingTheClubURL = ConfigurationManager.AppSettings["UsingTheClub_Sampler24"]; } else { model.UsingTheClubURL = ConfigurationManager.AppSettings["UsingTheClub_Sampler"]; } } if (model.UsingTheClubURL.IndexOf("~") == 0) { model.UsingTheClubURL = model.UsingTheClubURL.Substring(1); } if (model.EnableBluegreenPremier) { model.TutorialsAndWebinars = ConfigurationManager.AppSettings["TutorialsAndWebinars"]; } else { model.TutorialsAndWebinars = ConfigurationManager.AppSettings["TutorialsAndWebinarsUTC"];; } if (model.TutorialsAndWebinars.IndexOf("~") == 0) { model.TutorialsAndWebinars = model.TutorialsAndWebinars.Substring(1); } if (model.EnableVacationClubFixedMenu) { model.BluegreenVacationClub = "/owner/vacationclub.aspx"; model.HowItWorks = "/owner/vcHowItWorks.aspx"; model.OwnerTestimonials = "/owner/vcTestimonials.aspx"; model.OurResorts = "/BGModern/our-resorts"; model.TellMeMore = "/owner/learnMore.aspx"; model.HelpFAQs = "/owner/faq.aspx"; model.ContactUs = "/owner/contact.aspx"; } //if (model.NavigatorType == "Sampler") //{ // if (model.HomeProject == "51") // { // model.TravelerPlusURL = "/owner/clubuse-valuesampler.aspx"; // } // else if (model.HomeProject == "52") // { // model.TravelerPlusURL = "/owner/clubuse-sampler24.aspx"; // } //} }