Browse Source

Merged master with core

tags/3.0.0^2
Teknikode 9 months ago
parent
commit
85eba4fed2

+ 1
- 0
Teknik/Areas/Admin/Controllers/AdminController.cs View File

@@ -120,6 +120,7 @@ namespace Teknik.Areas.Admin.Controllers
model.DateUploaded = foundUpload.DateUploaded;
model.Downloads = foundUpload.Downloads;
model.DeleteKey = foundUpload.DeleteKey;
model.Username = foundUpload.User?.Username;

string renderedView = await RenderPartialViewToString(viewEngine, "~/Areas/Admin/Views/Admin/UploadResult.cshtml", model);


+ 3
- 2
Teknik/Areas/Admin/ViewModels/UploadResultViewModel.cs View File

@@ -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; }
}
}
}

+ 11
- 2
Teknik/Areas/Admin/Views/Admin/UploadResult.cshtml View File

@@ -5,15 +5,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…
Cancel
Save