mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add CRUD for main database tables.
This commit is contained in:
70
DiscImageChef.Server/Areas/Admin/Views/Devices/Create.cshtml
Normal file
70
DiscImageChef.Server/Areas/Admin/Views/Devices/Create.cshtml
Normal file
@@ -0,0 +1,70 @@
|
||||
@model Device
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="width=device-width" name="viewport" />
|
||||
<title>Create</title>
|
||||
</head>
|
||||
<body>
|
||||
<h4>Device</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AddedWhen" class="control-label"></label>
|
||||
<input asp-for="AddedWhen" class="form-control" />
|
||||
<span asp-validation-for="AddedWhen" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ModifiedWhen" class="control-label"></label>
|
||||
<input asp-for="ModifiedWhen" class="form-control" />
|
||||
<span asp-validation-for="ModifiedWhen" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OptimalMultipleSectorsRead" class="control-label"></label>
|
||||
<input asp-for="OptimalMultipleSectorsRead" class="form-control" />
|
||||
<span asp-validation-for="OptimalMultipleSectorsRead" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="CompactFlash" /> @Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Manufacturer" class="control-label"></label>
|
||||
<input asp-for="Manufacturer" class="form-control" />
|
||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Model" class="control-label"></label>
|
||||
<input asp-for="Model" class="form-control" />
|
||||
<span asp-validation-for="Model" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Revision" class="control-label"></label>
|
||||
<input asp-for="Revision" class="form-control" />
|
||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label"></label>
|
||||
<select asp-for="Type" class="form-control"></select>
|
||||
<span asp-validation-for="Type" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
75
DiscImageChef.Server/Areas/Admin/Views/Devices/Delete.cshtml
Normal file
75
DiscImageChef.Server/Areas/Admin/Views/Devices/Delete.cshtml
Normal file
@@ -0,0 +1,75 @@
|
||||
@model Device
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="width=device-width" name="viewport" />
|
||||
<title>Delete</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Device</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AddedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ModifiedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ModifiedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.OptimalMultipleSectorsRead)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CompactFlash)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Manufacturer)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Model)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Revision)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Revision)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,73 @@
|
||||
@model Device
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="width=device-width" name="viewport" />
|
||||
<title>Details</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h4>Device</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AddedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ModifiedWhen)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ModifiedWhen)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.OptimalMultipleSectorsRead)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CompactFlash)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Manufacturer)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Model)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Revision)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Revision)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
71
DiscImageChef.Server/Areas/Admin/Views/Devices/Edit.cshtml
Normal file
71
DiscImageChef.Server/Areas/Admin/Views/Devices/Edit.cshtml
Normal file
@@ -0,0 +1,71 @@
|
||||
@model Device
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="width=device-width" name="viewport" />
|
||||
<title>Edit</title>
|
||||
</head>
|
||||
<body>
|
||||
<h4>Device</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AddedWhen" class="control-label"></label>
|
||||
<input asp-for="AddedWhen" class="form-control" />
|
||||
<span asp-validation-for="AddedWhen" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ModifiedWhen" class="control-label"></label>
|
||||
<input asp-for="ModifiedWhen" class="form-control" />
|
||||
<span asp-validation-for="ModifiedWhen" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OptimalMultipleSectorsRead" class="control-label"></label>
|
||||
<input asp-for="OptimalMultipleSectorsRead" class="form-control" />
|
||||
<span asp-validation-for="OptimalMultipleSectorsRead" class="text-danger"></span>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="CompactFlash" /> @Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Manufacturer" class="control-label"></label>
|
||||
<input asp-for="Manufacturer" class="form-control" />
|
||||
<span asp-validation-for="Manufacturer" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Model" class="control-label"></label>
|
||||
<input asp-for="Model" class="form-control" />
|
||||
<span asp-validation-for="Model" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Revision" class="control-label"></label>
|
||||
<input asp-for="Revision" class="form-control" />
|
||||
<span asp-validation-for="Revision" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label"></label>
|
||||
<select asp-for="Type" class="form-control"></select>
|
||||
<span asp-validation-for="Type" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
85
DiscImageChef.Server/Areas/Admin/Views/Devices/Index.cshtml
Normal file
85
DiscImageChef.Server/Areas/Admin/Views/Devices/Index.cshtml
Normal file
@@ -0,0 +1,85 @@
|
||||
@model IEnumerable<Device>
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta content="width=device-width" name="viewport" />
|
||||
<title>Index</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.AddedWhen)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ModifiedWhen)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.CompactFlash)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Model)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Revision)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AddedWhen)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ModifiedWhen)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.OptimalMultipleSectorsRead)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.CompactFlash)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Manufacturer)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Model)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Revision)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Type)
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user