summaryrefslogtreecommitdiff
path: root/Pages/Index.cshtml
diff options
context:
space:
mode:
Diffstat (limited to 'Pages/Index.cshtml')
-rw-r--r--Pages/Index.cshtml79
1 files changed, 34 insertions, 45 deletions
diff --git a/Pages/Index.cshtml b/Pages/Index.cshtml
index 9c1f3c2..469011c 100644
--- a/Pages/Index.cshtml
+++ b/Pages/Index.cshtml
@@ -1,48 +1,37 @@
@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>
+@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="mime_type" maxlength=64 value="@obj.MimeType"></td>
+ <td><input type=text name="file_name" maxlength=64 value="@obj.FileName"></td>
+ <td><input type=file name="file"></td>
+ <td><input type="submit" name="update" value="Update"><input type="submit" name="delete" value="Delete"><input readonly style="display: none" type=text name="original_key" maxlength=64 value="@obj.Key"></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="mime_type" maxlength=64 value=""></td>
+ <td><input type=text name="file_name" maxlength=64 value=""></td>
+ <td><input type=file name="file"></td>
+ <td><input type="submit" name="add" value="Add"></td>
+ </form>
+ </tr>
+</table> \ No newline at end of file