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.

Podcast.cshtml 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. @model Teknik.Areas.Podcast.ViewModels.PodcastViewModel
  2. @using Teknik.Areas.Podcast.Models
  3. @using Teknik.Helpers
  4. <div class="row">
  5. <div class="col-sm-10 col-sm-offset-1">
  6. <div class="podcast-post">
  7. <h2 class="podcast-post-title text-center"><a href="@Url.SubRouteUrl("podcast", "Podcast.View", new { episode = Model.Episode })" id="title_@Model.PodcastId">Episode @Model.Episode - @Model.Title</a></h2>
  8. <p class="podcast-post-meta text-center text-muted">
  9. Posted on <time datetime="@Model.DatePosted.ToString("o")">@Model.DatePosted.ToString("MMMM dd, yyyy")</time>
  10. @if (User.IsInRole("Podcast"))
  11. {
  12. <br />
  13. <button type="button" class="btn btn-info edit_post" id="@Model.PodcastId" data-toggle="modal" data-target="#editPodcast">Edit</button>
  14. if (Model.Published)
  15. {
  16. <button type="button" class="btn btn-warning unpublish_podcast" id="@Model.PodcastId">Unpublish</button>
  17. }
  18. else
  19. {
  20. <button type="button" class="btn btn-success publish_podcast" id="@Model.PodcastId">Publish</button>
  21. }
  22. <button type="button" class="btn btn-danger delete_podcast" id="@Model.PodcastId">Delete</button>
  23. }
  24. </p>
  25. @if (Model.Files != null)
  26. {
  27. <div class="text-center">
  28. <audio preload="none" controls>
  29. @foreach (PodcastFile file in Model.Files)
  30. {
  31. <source src="@Url.SubRouteUrl("podcast", "Podcast.Download", new { episode = Model.Episode, fileName = file.FileName })" type="@file.ContentType" />
  32. }
  33. </audio>
  34. </div>
  35. }
  36. <br />
  37. <p id="podcast_@Model.PodcastId">@Html.Markdown(@Model.Description)</p>
  38. @if (Model.Files != null)
  39. {
  40. foreach (PodcastFile file in Model.Files)
  41. {
  42. <div class="row text-center">
  43. <a href="@Url.SubRouteUrl("podcast", "Podcast.Download", new { episode = Model.Episode, fileName = file.FileName })">Direct Download - @file.ContentType</a>
  44. </div>
  45. }
  46. }
  47. </div>
  48. </div>
  49. </div>