示例#1
0
        public void Test_Navigate_To_Life()
        {
            TimelineHelper.OpenLifeTimeline();
            string actual = BreadcrumbsHelper.GetLastBreadcrumbs();

            Assert.AreEqual("Life", actual);
        }
示例#2
0
 public ActionResult GapsTrainer(GroupForUser group)
 {
     return(GetGapsTrainerView(group, model => {
         model.LoadNextBtnCaption = "Показать другие слова";
         model.SpeakerDataType = SpeakerDataType.Word;
         model.BreadcrumbsItems = BreadcrumbsHelper.GetWords(Url, group.Name, CommonConstants.FILL_GAPS);
     }));
 }
        public ActionResult Header()
        {
            var model = new HeaderViewModel()
            {
                SiteSettings = SettingsHelper.GetSiteSettings(),
                Breadcrumbs  = BreadcrumbsHelper.InitBreadcrumb(),
            };

            return(PartialView("~/Views/Shared/_Header.cshtml", model));
        }
        private void SetModel(string groupName, TrainerModel model)
        {
            var pageRequiredData = new PageRequiredData(SectionId.GroupByWords);

            pageRequiredData.Title       = WebSettingsConfig.Instance.GetTemplateText(pageRequiredData.SectionId, PageId.Cards, TemplateId.Title, groupName);
            pageRequiredData.Keywords    = WebSettingsConfig.Instance.GetTemplateText(pageRequiredData.SectionId, PageId.Cards, TemplateId.Keywords, groupName);
            pageRequiredData.Description = WebSettingsConfig.Instance.GetTemplateText(pageRequiredData.SectionId, PageId.Cards, TemplateId.Description, groupName);

            model.PageRequiredData = pageRequiredData;
            model.BreadcrumbsItems = BreadcrumbsHelper.GetWords(Url, groupName, pageRequiredData.Title);
            model.SetMarkUrl       = Url.Action("SetMark", RouteConfig.USER_TRAINER_GROUP_WORDS_CONTROLLER,
                                                new { group = groupName + "/" }, Request.Url.Scheme);
        }
示例#5
0
 public static void AssemblyInit(TestContext testContext)
 {
     HelperManager       = HelperManager.GetInstance();
     NavigationHelper    = HelperManager.GetNavigationHelper();
     BrowserStateManager = HelperManager.GetBrowserStateManager();
     HomePageHelper      = HelperManager.GetHomePageHelper();
     TourHelper          = HelperManager.GetTourHelper();
     BookmarkHelper      = HelperManager.GetBookmarkHelper();
     TimescaleHelper     = HelperManager.GetTimescaleHelper();
     ScreenshotManager   = HelperManager.GetScreenshotManager();
     WelcomeScreenHelper = HelperManager.GetWelcomeScreenHelper();
     TimelineHelper      = HelperManager.GetTimelineHelper();
     ExhibitHelper       = HelperManager.GetExhibitHelper();
     SearchHelper        = HelperManager.GetSearchHelper();
     AuthorizationHelper = HelperManager.GetAuthorizationHelper();
     BreadcrumbsHelper   = HelperManager.GetBreadcrumbsHelper();
 }
        public virtual TK Parse(T page)
        {
            var baseObj = new ElasticEpiDocument
            {
                Title                = page.Name,
                StartPublish         = page.StartPublish,
                StopPublish          = page.StopPublish,
                ContentGuid          = page.ContentGuid.ToString(),
                LanguageName         = page.Language?.Name,
                TypeName             = page.GetOriginalType().Name,
                ContainerContentGuid = ResolveContainerContentGuid(page),
                Breadcrumbs          = BreadcrumbsHelper.FromContent(page)
            };

            var derivedObj = new TK();

            PopulateCommonProperties(baseObj.GetType(), baseObj, derivedObj);

            return(derivedObj);
        }
        public ActionResult GapsTrainer(string group)
        {
            if (WebSettingsConfig.Instance.IsSectionForbidden(SectionId.VisualDictionary))
            {
                return(RedirectToAction("Index", RouteConfig.MAIN_CONTROLLER_NAME));
            }

            UserLanguages         userLanguages         = WebSettingsConfig.Instance.DefaultUserLanguages;
            RepresentationForUser representationForUser = GetRepresentationForUser(userLanguages, group);

            var gapsTrainerHelper        = new GapsTrainerHelper();
            List <GapsTrainerItem> items = gapsTrainerHelper.ConvertToItems(representationForUser.Areas);

            var pageRequiredData = new PageRequiredData(SectionId.VisualDictionary, PageId.GapsTrainer, group);
            var model            = new GapsTrainerModel(pageRequiredData, items);

            model.LoadNextBtnCaption = "Показать другие слова";
            model.SpeakerDataType    = SpeakerDataType.Word;
            model.BreadcrumbsItems   = BreadcrumbsHelper.GetVisualDictionary(Url, group, CommonConstants.FILL_GAPS);
            return(View("GapsTrainer", model));
        }
示例#8
0
 public BreadcrumbsHelper GetBreadcrumbsHelper()
 {
     return(_breadcrumbsHelper ?? (_breadcrumbsHelper = new BreadcrumbsHelper()));
 }
示例#9
0
 public void Search_Evidence_Earliest_Stone_Tools_Exhibit()
 {
     SearchHelper.SearchEvidenceEarliestStoneToolsExhibit();
     Assert.AreEqual("Genus H**o", BreadcrumbsHelper.GetLastBreadcrumbs());
 }
示例#10
0
 public void Search_Mayan_History_Timeline()
 {
     SearchHelper.SearchMayanHistoryTimeline();
     Assert.AreEqual("Mayan History", BreadcrumbsHelper.GetLastBreadcrumbs());
 }
        private string ResolveBreadcrumb(Guid contentGuid)
        {
            var content = _contentRepository.Get <IContent>(contentGuid);

            return(content != null?BreadcrumbsHelper.FromContentAsNames(content) : string.Empty);
        }