Ejemplo n.º 1
0
        /// <summary>
        /// Handles Embed code referencing on the page.
        /// </summary>
        public ActionResult Index()
        {
            EmbedCodeViewModel viewModel = this.Model.GetViewModel();

            if (this.IsEdit)
            {
                this.SetDesignModeContent(viewModel);
            }

            return(this.View("Index", viewModel));
        }
Ejemplo n.º 2
0
        private void SetDesignModeContent(EmbedCodeViewModel viewModel)
        {
            if (!string.IsNullOrWhiteSpace(viewModel.Description))
            {
                this.ViewBag.DesignModeContent = viewModel.Description;
            }
            else
            {
                var result = EmbedCodeHelper.GetShortEmbededCode(viewModel.EmbedCode);

                if (!string.IsNullOrWhiteSpace(result))
                {
                    this.ViewBag.DesignModeContent = result + Environment.NewLine + this.GetResource <EmbedCodeResources>("IncludedWhereDropped");
                }
            }
        }