mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added username to upload results in admin
This commit is contained in:
parent
2c43e7fe58
commit
8cb92c08a2
@ -105,6 +105,7 @@ namespace Teknik.Areas.Admin.Controllers
|
||||
model.DateUploaded = foundUpload.DateUploaded;
|
||||
model.Downloads = foundUpload.Downloads;
|
||||
model.DeleteKey = foundUpload.DeleteKey;
|
||||
model.Username = foundUpload.User?.Username;
|
||||
|
||||
return Json(new { result = new { html = PartialView("~/Areas/Admin/Views/Admin/UploadResult.cshtml", model).RenderToString() } });
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
@ -14,5 +14,6 @@ namespace Teknik.Areas.Admin.ViewModels
|
||||
public DateTime DateUploaded { get; set; }
|
||||
public int Downloads { get; set; }
|
||||
public string DeleteKey { get; set; }
|
||||
public string Username { get; set; }
|
||||
}
|
||||
}
|
@ -7,15 +7,24 @@
|
||||
<a id="upload-url" href="@Url.SubRouteUrl("u", "Upload.Download", new { file = Model.Url })">@Url.SubRouteUrl("u", "Upload.Download", new { file = Model.Url })</a>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="col-sm-2 text-center">
|
||||
<label for="type">Username</label>
|
||||
<p id="type">
|
||||
@if (!string.IsNullOrEmpty(Model.Username))
|
||||
{
|
||||
@:<a href="@Url.SubRouteUrl("admin", "Admin.UserInfo", new { username = Model.Username })">@Model.Username</a>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-2 text-center">
|
||||
<label for="size">Size</label>
|
||||
<p id="size">@StringHelper.GetBytesReadable(Model.ContentLength)</p>
|
||||
</div>
|
||||
<div class="col-sm-3 text-center">
|
||||
<div class="col-sm-2 text-center">
|
||||
<label for="type">Type</label>
|
||||
<p id="type">@Model.ContentType</p>
|
||||
</div>
|
||||
<div class="col-sm-3 text-center">
|
||||
<div class="col-sm-2 text-center">
|
||||
<label for="dateUploaded">Date Uploaded</label>
|
||||
<p id="dateUploaded"><time datetime="@Model.DateUploaded.ToString("s")">@Model.DateUploaded.ToString("MMMM dd, yyyy")</time></p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user