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")); }
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); } }
private void PopulateMessageTemplates() { var converter = new MessageTemplateConverter(_ctx); converter.ImportAll(_config.Language); }