mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Implement machine photo edit admin page.
This commit is contained in:
@@ -45,6 +45,7 @@ namespace Cicm.Database.Models
|
|||||||
public LightSource? LightSource { get; set; }
|
public LightSource? LightSource { get; set; }
|
||||||
[DisplayName("Metering mode")]
|
[DisplayName("Metering mode")]
|
||||||
public MeteringMode? MeteringMode { get; set; }
|
public MeteringMode? MeteringMode { get; set; }
|
||||||
|
[DisplayName("Resolution unit")]
|
||||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||||
public Orientation? Orientation { get; set; }
|
public Orientation? Orientation { get; set; }
|
||||||
public Saturation? Saturation { get; set; }
|
public Saturation? Saturation { get; set; }
|
||||||
|
|||||||
@@ -378,6 +378,14 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
MachinePhoto machinePhoto = await _context.MachinePhotos.FindAsync(id);
|
MachinePhoto machinePhoto = await _context.MachinePhotos.FindAsync(id);
|
||||||
if(machinePhoto == null) return NotFound();
|
if(machinePhoto == null) return NotFound();
|
||||||
|
|
||||||
|
ViewData["MachineId"] =
|
||||||
|
new
|
||||||
|
SelectList(_context.Machines.OrderBy(m => m.Company.Name).ThenBy(m => m.Name).Select(m => new {m.Id, Name = $"{m.Company.Name} {m.Name}"}),
|
||||||
|
"Id", "Name", machinePhoto.MachineId);
|
||||||
|
ViewData["LicenseId"] =
|
||||||
|
new SelectList(_context.Licenses.OrderBy(l => l.Name).Select(l => new {l.Id, l.Name}), "Id", "Name",
|
||||||
|
machinePhoto.LicenseId);
|
||||||
|
|
||||||
return View(machinePhoto);
|
return View(machinePhoto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
@using Cicm.Database
|
||||||
@model Cicm.Database.Models.MachinePhoto
|
@model Cicm.Database.Models.MachinePhoto
|
||||||
|
|
||||||
@{
|
@{
|
||||||
@@ -6,7 +7,7 @@
|
|||||||
|
|
||||||
<h1>Edit</h1>
|
<h1>Edit</h1>
|
||||||
|
|
||||||
<h4>MachinePhoto</h4>
|
<h4>Machine photo</h4>
|
||||||
<hr />
|
<hr />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@@ -48,8 +49,11 @@
|
|||||||
<label asp-for="ColorSpace"
|
<label asp-for="ColorSpace"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="ColorSpace"
|
<select asp-for="ColorSpace"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<ColorSpace>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="ColorSpace"
|
<span asp-validation-for="ColorSpace"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -68,8 +72,11 @@
|
|||||||
<label asp-for="Contrast"
|
<label asp-for="Contrast"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="Contrast"
|
<select asp-for="Contrast"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<Contrast>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="Contrast"
|
<span asp-validation-for="Contrast"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -118,8 +125,11 @@
|
|||||||
<label asp-for="ExposureMethod"
|
<label asp-for="ExposureMethod"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="ExposureMethod"
|
<select asp-for="ExposureMethod"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<ExposureMode>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="ExposureMethod"
|
<span asp-validation-for="ExposureMethod"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -128,8 +138,11 @@
|
|||||||
<label asp-for="ExposureProgram"
|
<label asp-for="ExposureProgram"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="ExposureProgram"
|
<select asp-for="ExposureProgram"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<ExposureProgram>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="ExposureProgram"
|
<span asp-validation-for="ExposureProgram"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -138,8 +151,11 @@
|
|||||||
<label asp-for="Flash"
|
<label asp-for="Flash"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="Flash"
|
<select asp-for="Flash"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<Flash>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="Flash"
|
<span asp-validation-for="Flash"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -208,8 +224,10 @@
|
|||||||
<label asp-for="License"
|
<label asp-for="License"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="License"
|
<select asp-for="LicenseId"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="ViewBag.LicenseId">
|
||||||
|
</select>
|
||||||
<span asp-validation-for="License"
|
<span asp-validation-for="License"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -218,48 +236,72 @@
|
|||||||
<label asp-for="LightSource"
|
<label asp-for="LightSource"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="LightSource"
|
<select asp-for="LightSource"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<LightSource>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="LightSource"
|
<span asp-validation-for="LightSource"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="Machine"
|
||||||
|
class="control-label">
|
||||||
|
</label>
|
||||||
|
<select asp-for="MachineId"
|
||||||
|
class="form-control"
|
||||||
|
asp-items="ViewBag.MachineId">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="MeteringMode"
|
<label asp-for="MeteringMode"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="MeteringMode"
|
<select asp-for="MeteringMode"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<MeteringMode>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="MeteringMode"
|
<span asp-validation-for="MeteringMode"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label asp-for="ResolutionUnit"
|
||||||
|
class="control-label">
|
||||||
|
</label>
|
||||||
|
<select asp-for="ResolutionUnit"
|
||||||
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<ResolutionUnit>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
|
<span asp-validation-for="ResolutionUnit"
|
||||||
|
class="text-danger">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Orientation"
|
<label asp-for="Orientation"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="Orientation"
|
<select asp-for="Orientation"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<Orientation>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="Orientation"
|
<span asp-validation-for="Orientation"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="PixelComposition"
|
|
||||||
class="control-label">
|
|
||||||
</label>
|
|
||||||
<input asp-for="PixelComposition"
|
|
||||||
class="form-control" />
|
|
||||||
<span asp-validation-for="PixelComposition"
|
|
||||||
class="text-danger">
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="Saturation"
|
<label asp-for="Saturation"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="Saturation"
|
<select asp-for="Saturation"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<Saturation>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="Saturation"
|
<span asp-validation-for="Saturation"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -268,28 +310,24 @@
|
|||||||
<label asp-for="SceneCaptureType"
|
<label asp-for="SceneCaptureType"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="SceneCaptureType"
|
<select asp-for="SceneCaptureType"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<SceneCaptureType>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="SceneCaptureType"
|
<span asp-validation-for="SceneCaptureType"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label asp-for="SceneControl"
|
|
||||||
class="control-label">
|
|
||||||
</label>
|
|
||||||
<input asp-for="SceneControl"
|
|
||||||
class="form-control" />
|
|
||||||
<span asp-validation-for="SceneControl"
|
|
||||||
class="text-danger">
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label asp-for="SensingMethod"
|
<label asp-for="SensingMethod"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="SensingMethod"
|
<select asp-for="SensingMethod"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<SensingMethod>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="SensingMethod"
|
<span asp-validation-for="SensingMethod"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -298,8 +336,11 @@
|
|||||||
<label asp-for="Sharpness"
|
<label asp-for="Sharpness"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="Sharpness"
|
<select asp-for="Sharpness"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<Sharpness>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="Sharpness"
|
<span asp-validation-for="Sharpness"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -318,8 +359,11 @@
|
|||||||
<label asp-for="SubjectDistanceRange"
|
<label asp-for="SubjectDistanceRange"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="SubjectDistanceRange"
|
<select asp-for="SubjectDistanceRange"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<SubjectDistanceRange>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="SubjectDistanceRange"
|
<span asp-validation-for="SubjectDistanceRange"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -338,8 +382,11 @@
|
|||||||
<label asp-for="WhiteBalance"
|
<label asp-for="WhiteBalance"
|
||||||
class="control-label">
|
class="control-label">
|
||||||
</label>
|
</label>
|
||||||
<input asp-for="WhiteBalance"
|
<select asp-for="WhiteBalance"
|
||||||
class="form-control" />
|
class="form-control"
|
||||||
|
asp-items="Html.GetEnumSelectList<WhiteBalance>().OrderBy(s => s.Text)">
|
||||||
|
<option value="">Unknown</option>
|
||||||
|
</select>
|
||||||
<span asp-validation-for="WhiteBalance"
|
<span asp-validation-for="WhiteBalance"
|
||||||
class="text-danger">
|
class="text-danger">
|
||||||
</span>
|
</span>
|
||||||
@@ -350,15 +397,15 @@
|
|||||||
<input class="btn btn-primary"
|
<input class="btn btn-primary"
|
||||||
type="submit"
|
type="submit"
|
||||||
value="Save" />
|
value="Save" />
|
||||||
|
<a asp-action="Index"
|
||||||
|
class="btn btn-secondary">
|
||||||
|
Back to List
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<a asp-action="Index">Back to List</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@section Scripts {
|
@section Scripts {
|
||||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||||
<Version>3.0.99.643</Version>
|
<Version>3.0.99.644</Version>
|
||||||
<Company>Canary Islands Computer Museum</Company>
|
<Company>Canary Islands Computer Museum</Company>
|
||||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||||
<Product>Canary Islands Computer Museum Website</Product>
|
<Product>Canary Islands Computer Museum Website</Product>
|
||||||
|
|||||||
Reference in New Issue
Block a user