The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EditPost.cshtml 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. @model Teknik.Areas.Blog.ViewModels.PostViewModel
  2. <script>
  3. // We need to define the action URLs for the script
  4. var helpURL = '@Url.SubRouteUrl("help", "Help.Markdown")';
  5. </script>
  6. <bundle src="css/blog.min.css" append-version="true"></bundle>
  7. <div class="container">
  8. @if (Model.Error)
  9. {
  10. <div class="row">
  11. <div class="col-sm-10 col-sm-offset-1 text-center">
  12. <div class="alert alert-danger" role="alert">@Model.ErrorMessage</div>
  13. </div>
  14. </div>
  15. }
  16. <div class="row">
  17. <div class="col-sm-10 col-sm-offset-1 text-center">
  18. <h2>Edit Post</h2>
  19. </div>
  20. </div>
  21. <!form class="form" action="@Url.SubRouteUrl("blog", "Blog.Action", new { action = "EditPost" })" method="post" id="newPost">
  22. <input name="PostID" id="postID" type="hidden" value="@Model.PostId" />
  23. <div class="row">
  24. <div class="col-sm-10 col-sm-offset-1">
  25. <label for="title"><h4>Title</h4></label>
  26. </div>
  27. </div>
  28. <div class="row">
  29. <div class="col-sm-5 col-sm-offset-1">
  30. <input class="form-control" name="Title" id="title" placeholder="generic click bait" title="enter a title for your post." type="text" value="@Model.Title" />
  31. </div>
  32. <div class="col-sm-5">
  33. <button type="submit" class="btn btn-primary pull-right" id="submit">Save</button>
  34. </div>
  35. <div class="col-sm-1">
  36. </div>
  37. </div>
  38. <br />
  39. <div class="row">
  40. <div class="col-sm-10 col-sm-offset-1">
  41. <div class="panel panel-default">
  42. <div class="panel-heading">Article</div>
  43. <div class="panel-body">
  44. <div class="mdd_toolbar"></div>
  45. <textarea class="form-control mdd_editor" name="Article" id="article" placeholder="I ate a burger today." title="enter any information you want to share with the world." data-provide="markdown" rows="20">@Model.Article</textarea>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="row">
  51. <div class="col-sm-10 col-sm-offset-1">
  52. <div class="panel panel-default">
  53. <div class="panel-heading">Preview</div>
  54. <div class="panel-body">
  55. <div class="mdd_preview"></div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </!form>
  61. </div>
  62. <bundle src="js/blog.min.js" append-version="true"></bundle>