public async Task<DocumentTemplate> ConvertView(DocumentTemplate template) { _positions = _positionsRepository.GetAll(x => true); template.Text = ReplaceBy(template.Text, await BuildTextDictionary()); template.PositionsPath = ReplaceBy(template.PositionsPath, await BuildPathDictionary()); return template; }
public async Task<ActionResult> ConvertView(DocumentTemplate template) { if (template.Text != null) { template = await DocumentHandler.ConvertView(template); } return View("Preview/Preview", template); }
public ActionResult EditTemplate(DocumentTemplate template) { TemplatesHandler.Update(template); return RedirectToAction("DocumentTemplates", "Admin"); }
public ActionResult CreateTemplate(DocumentTemplate template) { TemplatesHandler.Add(template); return RedirectToAction("DocumentTemplates", "Admin"); }