summaryrefslogtreecommitdiff
path: root/Pages/Index.cshtml
blob: 9c1f3c237b05dadc1f1b3c50d88e5c5817623e03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@page
@model download_admin.Pages.IndexModel
@using download_admin.Pages
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Download Repsoitory Editor</title>
    </head>
    <body>
        <a href="report">Download Report</a><br>
        @if (Model.HasError)
        {
            <p style="color:red"><b>@Model.ErrorText</b></p>
        }
        <table>
            <tr>
                <td style="width:25%;"><b>Key</b></td>
                <td style="width:20%;"><b>Mime type</b></td>
                <td style="width:20%;"><b>File name</b></td>
                <td style="width:15%;"><b>File data</b></td>
                <td style="width:20%;"><b>Commands</b></td>
            </tr>
            @foreach(FileObject obj in Model.Rows)
            {
                <tr>
                    <form enctype="multipart/form-data" method="post">
                        <td><input type=text name="Key" maxlength=64 value="@obj.Key"></td>
                        <td><input type=text name="MimeType" maxlength=64 value="@obj.MimeType"></td>
                        <td><input type=text name="Filename" maxlength=64 value="@obj.FileName"></td>
                        <td><input type=file name="Data"></td>
                        <td><input type="submit" name="update" value="Update"><input type="submit" name="delete" value="Delete"></td>
                    </form>
                </tr>
            }
            <tr>
                <form enctype="multipart/form-data" method="post">
                    <td><input type=text name="Key" maxlength=64 value=""></td>
                    <td><input type=text name="MimeType" maxlength=64 value=""></td>
                    <td><input type=text name="Filename" maxlength=64 value=""></td>
                    <td><input type=file name="Data"></td>
                    <td><input type="submit" name="add" value="Add"></td>
                </form>
            </tr>
        </table>
    </body>
</html>