public virtual IActionResult TestTemplate(int id) { //try to get a message template with the specified id var messageTemplate = _messageTemplateService.GetMessageTemplateById(id); if (messageTemplate == null) { return(RedirectToAction("List")); } //prepare model var model = _messageTemplateModelFactory .PrepareTestMessageTemplateModel(new TestMessageTemplateModel(), messageTemplate); return(View(model)); }
public virtual IActionResult TestTemplate(int id, int languageId = 0) { if (!_permissionService.Authorize(StandardPermissionProvider.ManageMessageTemplates)) return AccessDeniedView(); //try to get a message template with the specified id var messageTemplate = _messageTemplateService.GetMessageTemplateById(id); if (messageTemplate == null) return RedirectToAction("List"); //prepare model var model = _messageTemplateModelFactory .PrepareTestMessageTemplateModel(new TestMessageTemplateModel(), messageTemplate, languageId); return View(model); }