The next generation of the Teknik Services. Written in ASP.NET. Fork for blog tags.
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.

ViewVault.cshtml 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. @model Teknik.Areas.Vault.ViewModels.VaultViewModel
  2. @using Teknik.Areas.Vault.ViewModels
  3. @using Teknik.Utilities
  4. @using Teknik.Pygments
  5. @Styles.Render("~/Content/vault")
  6. <div class="container">
  7. <div class="row text-center">
  8. <div class="col-sm-12 text-center">
  9. <h2><b>@((string.IsNullOrEmpty(Model.Title)) ? "Untitled" : Model.Title)</b> <small>Created on <time datetime="@Model.DateCreated.ToString("s")">@Model.DateCreated.ToString("dddd, MMMM d, yyyy") at @Model.DateCreated.ToString("h:mm:ss tt")</time></small></h2>
  10. </div>
  11. </div>
  12. @if (!string.IsNullOrEmpty(Model.Description))
  13. {
  14. <hr />
  15. <div class="row">
  16. <div class="col-sm-10 col-sm-offset-1">
  17. <p>@Model.Description</p>
  18. </div>
  19. </div>
  20. }
  21. <br />
  22. @foreach (VaultItemViewModel item in Model.Items)
  23. {
  24. Type itemType = item.GetType();
  25. if (itemType == typeof(PasteItemViewModel))
  26. {
  27. PasteItemViewModel pasteModel = (PasteItemViewModel)item;
  28. @Html.Partial("~/Areas/Vault/Views/Vault/PasteItem.cshtml", pasteModel)
  29. }
  30. else if (itemType == typeof(UploadItemViewModel))
  31. {
  32. UploadItemViewModel uploadModel = (UploadItemViewModel)item;
  33. @Html.Partial("~/Areas/Vault/Views/Vault/UploadItem.cshtml", uploadModel)
  34. }
  35. else
  36. {
  37. // Nothing to see here folks. :)
  38. }
  39. }
  40. </div>
  41. @Scripts.Render("~/bundles/vault")