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.
 
 
 
 
 

63 lines
2.2 KiB

@model Teknik.Areas.Vault.ViewModels.VaultViewModel
@using Teknik.Areas.Vault.ViewModels
@using Teknik.Utilities
@using Teknik.Pygments
@Styles.Render("~/Content/vault")
<script type="text/javascript">
var deleteVaultURL = '@Url.SubRouteUrl(Model.CurrentSub, "Vault.DeleteVault")';
</script>
<div class="container">
<div class="row text-center">
<div class="col-sm-12 text-center">
<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>
</div>
</div>
@if (User.Identity.IsAuthenticated && Model.User != null && Model.User.Username == User.Info.Username)
{
<div class="row">
<div class="col-sm-12">
<div class="pull-right">
<a role="button" class="btn btn-primary edit-vault-button" href="@Url.SubRouteUrl("v", "Vault.EditVault", new { url = Model.Url })">Edit</a>&nbsp;
<button role="button" class="btn btn-danger delete-vault-button" data-vault-url="@Model.Url">Delete</button>
</div>
</div>
</div>
}
@if (!string.IsNullOrEmpty(Model.Description))
{
<hr />
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<p>@Model.Description</p>
</div>
</div>
}
<br />
@foreach (VaultItemViewModel item in Model.Items)
{
Type itemType = item.GetType();
if (itemType == typeof(PasteItemViewModel))
{
PasteItemViewModel pasteModel = (PasteItemViewModel)item;
@Html.Partial("~/Areas/Vault/Views/Vault/PasteItem.cshtml", pasteModel)
}
else if (itemType == typeof(UploadItemViewModel))
{
UploadItemViewModel uploadModel = (UploadItemViewModel)item;
@Html.Partial("~/Areas/Vault/Views/Vault/UploadItem.cshtml", uploadModel)
}
else
{
// Nothing to see here folks. :)
}
}
</div>
@Scripts.Render("~/bundles/vault")