Browse Source

Merged master with core

Teknikode 3 months ago
parent
commit
85eba4fed2

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

@@ -120,6 +120,7 @@ namespace Teknik.Areas.Admin.Controllers
120 120
                 model.DateUploaded = foundUpload.DateUploaded;
121 121
                 model.Downloads = foundUpload.Downloads;
122 122
                 model.DeleteKey = foundUpload.DeleteKey;
123
+                model.Username = foundUpload.User?.Username;
123 124
 
124 125
                 string renderedView = await RenderPartialViewToString(viewEngine, "~/Areas/Admin/Views/Admin/UploadResult.cshtml", model);
125 126
 

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

@@ -1,4 +1,4 @@
1
-using System;
1
+using System;
2 2
 using System.Collections.Generic;
3 3
 using System.Linq;
4 4
 using System.Web;
@@ -14,5 +14,6 @@ namespace Teknik.Areas.Admin.ViewModels
14 14
         public DateTime DateUploaded { get; set; }
15 15
         public int Downloads { get; set; }
16 16
         public string DeleteKey { get; set; }
17
+        public string Username { get; set; }
17 18
     }
18
-}
19
+}

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

@@ -5,15 +5,24 @@
5 5
         <a id="upload-url" href="@Url.SubRouteUrl("u", "Upload.Download", new { file = Model.Url })">@Url.SubRouteUrl("u", "Upload.Download", new { file = Model.Url })</a>
6 6
     </div>
7 7
     <div class="panel-body">
8
+        <div class="col-sm-2 text-center">
9
+            <label for="type">Username</label>
10
+            <p id="type">
11
+            @if (!string.IsNullOrEmpty(Model.Username))
12
+            { 
13
+                @:<a href="@Url.SubRouteUrl("admin", "Admin.UserInfo", new { username = Model.Username })">@Model.Username</a>
14
+            }
15
+            </p>
16
+        </div>
8 17
         <div class="col-sm-2 text-center">
9 18
             <label for="size">Size</label>
10 19
             <p id="size">@StringHelper.GetBytesReadable(Model.ContentLength)</p>
11 20
         </div>
12
-        <div class="col-sm-3 text-center">
21
+        <div class="col-sm-2 text-center">
13 22
             <label for="type">Type</label>
14 23
             <p id="type">@Model.ContentType</p>
15 24
         </div>
16
-        <div class="col-sm-3 text-center">
25
+        <div class="col-sm-2 text-center">
17 26
             <label for="dateUploaded">Date Uploaded</label>
18 27
             <p id="dateUploaded"><time datetime="@Model.DateUploaded.ToString("s")">@Model.DateUploaded.ToString("MMMM dd, yyyy")</time></p>
19 28
         </div>

Loading…
Cancel
Save