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.

Edit.cshtml 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. @model Teknik.Areas.Paste.ViewModels.PasteViewModel
  2. <bundle src="css/paste.edit.min.css" append-version="true"></bundle>
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-sm-10 col-sm-offset-1 text-center">
  6. <b>@Html.ValidationSummary(true, "The input is not valid")</b>
  7. </div>
  8. </div>
  9. <div class="row">
  10. <div class="col-sm-12">
  11. <!form class="form-horizontal" name="editor" method="post" action="@Url.SubRouteUrl("p", "Paste.Action", new { action = "EditSubmit", url = Model.Url })">
  12. <input type="hidden" class="form-control" name="Url" id="url" value="@Model.Url">
  13. <div class="form-group">
  14. <div class="col-sm-10 col-sm-offset-1">
  15. <textarea class="form-control" name="Content" id="content" rows="20">@Model.Content</textarea>
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label for="title" class="col-sm-2 col-sm-offset-1 control-label">Title</label>
  20. <div class="col-sm-4">
  21. <input type="text" class="form-control" name="Title" id="title" value="@Model.Title">
  22. </div>
  23. <div class="col-sm-1 col-sm-offset-2">
  24. <button type="submit" class="btn btn-primary pull-right" id="pasteSubmit">Save</button>
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label for="syntax" class="col-sm-2 col-sm-offset-1 control-label">Syntax</label>
  29. <div class="col-sm-4">
  30. <select class="form-control" name="Syntax" id="syntax">
  31. <!option value=""@((string.IsNullOrEmpty(Model.Syntax)) ? " selected" : string.Empty)>Text</!option>
  32. @foreach (var format in HighlightHelper.Languages.GroupBy(l => l.Value).ToList())
  33. {
  34. <!option value="@(format?.FirstOrDefault().Key)"@((Model.Syntax == format?.FirstOrDefault().Key) ? " selected" : string.Empty)>@(format?.Key)</!option>
  35. }
  36. </select>
  37. </div>
  38. </div>
  39. </!form>
  40. </div>
  41. </div>
  42. </div>
  43. <bundle src="js/paste.edit.min.js" append-version="true"></bundle>