﻿@using Humanizer
@model FilesOverviewModel

@{
    ViewBag.Title = "Uploaded file overview";
}

<h2>@ViewBag.Title</h2>

@{
    var sortedFiles = Model.Files.OrderBy(x => x.Metadata.OriginalFileName);
}

<table class="table table-striped">
    <thead>
    <tr>
        <th>ID</th>
        <th>File name</th>
        <th>Uploaded on</th>
        <th>Expires</th>
    </tr>
    </thead>
    <tbody>
    @foreach (var file in sortedFiles) {
        <tr>
            <td><code>@file.Id</code></td>
            <td>@file.Metadata.OriginalFileName</td>
            <td>
                @file.Metadata.UploadedOn.Humanize()
            </td>
            <td>
                @file.Metadata.Expiration.Humanize()
            </td>
        </tr>
    }
    </tbody>
</table>
﻿@using Humanizer
@model FilesOverviewModel

@{
    ViewBag.Title = "Uploaded file overview";
}

<h2>@ViewBag.Title</h2>

@{
    var sortedFiles = Model.Files.OrderBy(x => x.Metadata.OriginalFileName);
}

<table class="table table-striped">
    <thead>
    <tr>
        <th>ID</th>
        <th>File name</th>
        <th>Uploaded on</th>
        <th>Expires</th>
    </tr>
    </thead>
    <tbody>
    @foreach (var file in sortedFiles) {
        <tr>
            <td><code>@file.Id</code></td>
            <td>
                <a asp-route="DownloadFile" asp-route-id="@file.Id">@file.Metadata.OriginalFileName</a>
            </td>
            <td>
                @file.Metadata.UploadedOn.Humanize()
            </td>
            <td>
                @file.Metadata.Expiration.Humanize()
            </td>
        </tr>
    }
    </tbody>
</table>
Allow downloading files from administrative mode
Allow downloading files from administrative mode
