public ActionResult ImportAllTemplates()
        {
            // Hidden action for admins
            var converter = new MessageTemplateConverter(Services.DbContext);

            converter.ImportAll(Services.WorkContext.WorkingLanguage);

            NotifySuccess("All file based message templates imported successfully.");

            return(RedirectToAction("List"));
        }
Esempio n. 2
0
        public void Seed(SmartObjectContext context)
        {
            context.MigrateLocaleResources(MigrateLocaleResources);
            context.SaveChanges();

            if (HostingEnvironment.IsHosted && DataSettings.DatabaseIsInstalled())
            {
                // Import all xml templates on disk
                var converter = new MessageTemplateConverter(context);
                var language  = ResolveMasterLanguage(context);
                converter.ImportAll(language);

                DropDefaultValueConstraint(context);
            }
        }
Esempio n. 3
0
        private void PopulateMessageTemplates()
        {
            var converter = new MessageTemplateConverter(_ctx);

            converter.ImportAll(_config.Language);
        }