public ActionResult Index(HiveId id)
        {
            using (var uow = BackOfficeRequestContext.Application.Hive.OpenReader<IFileStore>(new Uri("storage://macros")))
            {
                var macros = uow.Repositories.GetAll<File>()
                    .Select(MacroSerializer.FromFile)
                    .Select(x => new SelectListItem { Text = x.Name, Value = x.Alias });

                var model = new SelectMacroModel
                {
                    AvailableMacroItems = macros
                };

                return View(model);
            }
        }
        public ActionResult SelectMacro(HiveId contentId, bool isNew)
        {
            using (var uow = BackOfficeRequestContext.Application.Hive.OpenReader<IFileStore>(new Uri("storage://macros")))
            {
                var macros = uow.Repositories.GetAll<File>()
                    .Select(MacroSerializer.FromFile).Where(x => x.UseInEditor)
                    .Select(x => new SelectListItem { Text = x.Name, Value = x.Alias });

                var model = new Rebel.Cms.Web.Model.BackOffice.TinyMCE.InsertMacro.SelectMacroModel
                {
                    ContentId = contentId,
                    IsNew = isNew,
                    AvailableMacroItems = macros
                };

                return View(
                    EmbeddedViewPath.Create("Rebel.Cms.Web.PropertyEditors.RichTextBox.TinyMCE.Views.InsertMacro.SelectMacro.cshtml, Rebel.Cms.Web.PropertyEditors"),
                    model);
            }
        }
        public ActionResult SelectMacro(HiveId contentId, bool isNew)
        {
            using (var uow = BackOfficeRequestContext.Application.Hive.OpenReader <IFileStore>(new Uri("storage://macros")))
            {
                var macros = uow.Repositories.GetAll <File>()
                             .Select(MacroSerializer.FromFile).Where(x => x.UseInEditor)
                             .Select(x => new SelectListItem {
                    Text = x.Name, Value = x.Alias
                });

                var model = new Rebel.Cms.Web.Model.BackOffice.TinyMCE.InsertMacro.SelectMacroModel
                {
                    ContentId           = contentId,
                    IsNew               = isNew,
                    AvailableMacroItems = macros
                };

                return(View(
                           EmbeddedViewPath.Create("Rebel.Cms.Web.PropertyEditors.RichTextBox.TinyMCE.Views.InsertMacro.SelectMacro.cshtml, Rebel.Cms.Web.PropertyEditors"),
                           model));
            }
        }