Beispiel #1
0
        protected override DriverResult Display(FaqWidgetAjaxPart part, string displayType, dynamic shapeHelper)
        {
            var types = _faqTypeService.GetFaqTypes();

            return(ContentShape("Parts_FaqWidgetAjax",
                                () => shapeHelper.Parts_FaqWidgetAjax(
                                    FaqTypes: types)));
        }
Beispiel #2
0
        protected override DriverResult Display(FaqWidgetPart part, string displayType, dynamic shapeHelper)
        {
            var types = _faqTypeService.GetFaqTypes();
            var faqs  = _faqService.GetLastFaqs(null, null);

            return(ContentShape("Parts_FaqWidget",
                                () => shapeHelper.Parts_FaqWidget(
                                    FaqTypes: types,
                                    Faqs: faqs)));
        }
Beispiel #3
0
        private EditFaqViewModel BuildEditorViewModel(FaqPart part)
        {
            var avm = new EditFaqViewModel {
                Question = part.Question,
                FaqTypes = _faqTypeService.GetFaqTypes(false)
            };

            if (part.FaqTypeId > 0)
            {
                avm.FaqType = part.FaqTypeId;
            }

            return(avm);
        }