mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Show details of a machine photo.
This commit is contained in:
@@ -19,7 +19,6 @@ using SixLabors.ImageSharp.MetaData;
|
||||
using SixLabors.ImageSharp.MetaData.Profiles.Exif;
|
||||
using SixLabors.ImageSharp.PixelFormats;
|
||||
using SixLabors.ImageSharp.Primitives;
|
||||
using SixLabors.ImageSharp.Processing;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace cicm_web.Areas.Admin.Controllers
|
||||
@@ -28,15 +27,16 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
[Authorize]
|
||||
public class MachinePhotosController : Controller
|
||||
{
|
||||
readonly cicmContext _context;
|
||||
readonly IHostingEnvironment hostingEnvironment;
|
||||
readonly cicmContext _context;
|
||||
readonly IHostingEnvironment hostingEnvironment;
|
||||
readonly UserManager<ApplicationUser> userManager;
|
||||
|
||||
public MachinePhotosController(cicmContext context, IHostingEnvironment hostingEnvironment, UserManager<ApplicationUser> userManager)
|
||||
public MachinePhotosController(cicmContext context, IHostingEnvironment hostingEnvironment,
|
||||
UserManager<ApplicationUser> userManager)
|
||||
{
|
||||
_context = context;
|
||||
_context = context;
|
||||
this.hostingEnvironment = hostingEnvironment;
|
||||
this.userManager = userManager;
|
||||
this.userManager = userManager;
|
||||
}
|
||||
|
||||
// GET: MachinePhotos
|
||||
@@ -62,7 +62,50 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
{
|
||||
if(id == null) return NotFound();
|
||||
|
||||
MachinePhoto machinePhoto = await _context.MachinePhotos.FirstOrDefaultAsync(m => m.Id == id);
|
||||
MachinePhotoDetailsViewModel machinePhoto = await _context
|
||||
.MachinePhotos
|
||||
.Select(m => new MachinePhotoDetailsViewModel
|
||||
{
|
||||
Id = m.Id,
|
||||
CameraManufacturer = m.CameraManufacturer,
|
||||
CameraModel = m.CameraModel,
|
||||
ColorSpace = m.ColorSpace,
|
||||
Comments = m.Comments,
|
||||
Contrast = m.Contrast,
|
||||
CreationDate = m.CreationDate,
|
||||
DigitalZoomRatio = m.DigitalZoomRatio,
|
||||
ExifVersion = m.ExifVersion,
|
||||
Exposure = m.Exposure,
|
||||
ExposureProgram = m.ExposureProgram,
|
||||
Flash = m.Flash,
|
||||
Focal = m.Focal,
|
||||
FocalLength = m.FocalLength,
|
||||
FocalLengthEquivalent =
|
||||
m.FocalLengthEquivalent,
|
||||
HorizontalResolution =
|
||||
m.HorizontalResolution,
|
||||
IsoRating = m.IsoRating,
|
||||
Lens = m.Lens,
|
||||
LightSource = m.LightSource,
|
||||
MeteringMode = m.MeteringMode,
|
||||
ResolutionUnit = m.ResolutionUnit,
|
||||
Orientation = m.Orientation,
|
||||
Saturation = m.Saturation,
|
||||
SceneCaptureType = m.SceneCaptureType,
|
||||
SensingMethod = m.SensingMethod,
|
||||
Sharpness = m.Sharpness,
|
||||
SoftwareUsed = m.SoftwareUsed,
|
||||
SubjectDistanceRange =
|
||||
m.SubjectDistanceRange,
|
||||
UploadDate = m.UploadDate,
|
||||
VerticalResolution = m.VerticalResolution,
|
||||
WhiteBalance = m.WhiteBalance,
|
||||
License = m.License.Name,
|
||||
UploadUser = m.User.UserName,
|
||||
Machine =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name}",
|
||||
MachineId = m.Machine.Id
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
if(machinePhoto == null) return NotFound();
|
||||
|
||||
return View(machinePhoto);
|
||||
@@ -151,7 +194,9 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
photo.Contrast = (Contrast)exif.Value;
|
||||
break;
|
||||
case ExifTag.DateTimeDigitized:
|
||||
photo.CreationDate = DateTime.ParseExact(exif.Value.ToString(), "yyyy:MM:dd HH:mm:ss", CultureInfo.InvariantCulture);
|
||||
photo.CreationDate =
|
||||
DateTime.ParseExact(exif.Value.ToString(), "yyyy:MM:dd HH:mm:ss",
|
||||
CultureInfo.InvariantCulture);
|
||||
break;
|
||||
case ExifTag.DigitalZoomRatio:
|
||||
photo.DigitalZoomRatio = ((Rational)exif.Value).ToDouble();
|
||||
@@ -189,7 +234,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
photo.HorizontalResolution = ((Rational)exif.Value).ToDouble();
|
||||
break;
|
||||
case ExifTag.ISOSpeedRatings:
|
||||
photo.IsoRating =(ushort) exif.Value;
|
||||
photo.IsoRating = (ushort)exif.Value;
|
||||
break;
|
||||
case ExifTag.LensModel:
|
||||
photo.Lens = exif.Value as string;
|
||||
@@ -225,7 +270,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
photo.VerticalResolution = ((Rational)exif.Value).ToDouble();
|
||||
break;
|
||||
case ExifTag.WhiteBalance:
|
||||
photo.WhiteBalance =(WhiteBalance) exif.Value;
|
||||
photo.WhiteBalance = (WhiteBalance)exif.Value;
|
||||
break;
|
||||
default:
|
||||
image.MetaData.ExifProfile.RemoveValue(exif.Tag);
|
||||
@@ -234,22 +279,23 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos")))
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos"));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines")))
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines")))
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines"));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines", "thumbs")))
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines", "thumbs"));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines", "thumbs"))
|
||||
)
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines",
|
||||
"thumbs"));
|
||||
|
||||
var outJpeg = Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines",
|
||||
newId + ".jpg");
|
||||
string outJpeg = Path.Combine(hostingEnvironment.WebRootPath, "assets", "photos", "machines",
|
||||
newId + ".jpg");
|
||||
|
||||
using(var jpegStream = new FileStream(outJpeg, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
|
||||
{
|
||||
using(FileStream jpegStream =
|
||||
new FileStream(outJpeg, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
|
||||
image.SaveAsJpeg(jpegStream);
|
||||
}
|
||||
|
||||
int imgMax = Math.Max(image.Width, image.Height);
|
||||
int width = image.Width;
|
||||
int height= image.Height;
|
||||
int width = image.Width;
|
||||
int height = image.Height;
|
||||
|
||||
image.Dispose();
|
||||
|
||||
@@ -257,8 +303,10 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
|
||||
foreach(string format in new[] {"jpg", "webp"})
|
||||
{
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs", format))) ;
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs", format));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs",
|
||||
format))) ;
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs",
|
||||
format));
|
||||
|
||||
SKEncodedImageFormat skFormat;
|
||||
switch(format)
|
||||
@@ -273,24 +321,25 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
|
||||
foreach(int multiplier in new[] {1, 2, 3})
|
||||
{
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs", format,
|
||||
$"{multiplier}x"))) ;
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs", format,
|
||||
$"{multiplier}x"));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs",
|
||||
format, $"{multiplier}x"))) ;
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.WebRootPath,
|
||||
"assets/photos/machines/thumbs", format, $"{multiplier}x"));
|
||||
|
||||
string resized = Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs", format, $"{multiplier}x",
|
||||
newId + $".{format}");
|
||||
string resized = Path.Combine(hostingEnvironment.WebRootPath, "assets/photos/machines/thumbs",
|
||||
format, $"{multiplier}x", newId + $".{format}");
|
||||
|
||||
if(System.IO.File.Exists(resized)) continue;
|
||||
|
||||
float canvasMin = 256 * multiplier;
|
||||
float canvasMin = 256 * multiplier;
|
||||
|
||||
float scale = canvasMin / imgMax;
|
||||
float scale = canvasMin / imgMax;
|
||||
|
||||
// Do not enlarge images
|
||||
if(scale > 1) { scale = 1; }
|
||||
if(scale > 1) scale = 1;
|
||||
|
||||
var skResized = skBitmap.Resize(new SKImageInfo((int)(width * scale), (int)(height * scale)), SKFilterQuality.High);
|
||||
SKBitmap skResized = skBitmap.Resize(new SKImageInfo((int)(width * scale), (int)(height * scale)),
|
||||
SKFilterQuality.High);
|
||||
SKImage skImage = SKImage.FromBitmap(skResized);
|
||||
SKData data = skImage.Encode(skFormat, 100);
|
||||
FileStream outfs = new FileStream(resized, FileMode.CreateNew);
|
||||
@@ -303,13 +352,16 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos"));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos")))
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos"));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos", "machines")))
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos", "machines"));
|
||||
if(!Directory.Exists(Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos", "machines")))
|
||||
Directory.CreateDirectory(Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos",
|
||||
"machines"));
|
||||
|
||||
System.IO.File.Move(tmpFile, Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos", "machines", newId + extension));
|
||||
System.IO.File.Move(tmpFile,
|
||||
Path.Combine(hostingEnvironment.ContentRootPath, "originals", "photos", "machines",
|
||||
newId + extension));
|
||||
|
||||
photo.Id = newId;
|
||||
photo.User = await userManager.GetUserAsync(HttpContext.User);
|
||||
photo.Id = newId;
|
||||
photo.User = await userManager.GetUserAsync(HttpContext.User);
|
||||
photo.License = await _context.Licenses.FindAsync(machinePhoto.LicenseId);
|
||||
photo.Machine = await _context.Machines.FindAsync(machinePhoto.MachineId);
|
||||
|
||||
|
||||
75
cicm_web/Areas/Admin/Models/MachinePhotoDetailsViewModel.cs
Normal file
75
cicm_web/Areas/Admin/Models/MachinePhotoDetailsViewModel.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Cicm.Database;
|
||||
|
||||
namespace cicm_web.Areas.Admin.Models
|
||||
{
|
||||
public class MachinePhotoDetailsViewModel : BaseViewModel<Guid>
|
||||
{
|
||||
public string Author { get; set; }
|
||||
[DisplayName("Camera manufacturer")]
|
||||
public string CameraManufacturer { get; set; }
|
||||
[DisplayName("Camera model")]
|
||||
public string CameraModel { get; set; }
|
||||
[DisplayName("Color space")]
|
||||
public ColorSpace? ColorSpace { get; set; }
|
||||
[DisplayName("User comments")]
|
||||
public string Comments { get; set; }
|
||||
public Contrast? Contrast { get; set; }
|
||||
[DisplayName("Date and time of digitizing")]
|
||||
public DateTime? CreationDate { get; set; }
|
||||
[DisplayName("Digital zoom ratio")]
|
||||
public double? DigitalZoomRatio { get; set; }
|
||||
[DisplayName("Exif version")]
|
||||
public string ExifVersion { get; set; }
|
||||
[DisplayName("Exposure time")]
|
||||
public string Exposure { get; set; }
|
||||
[DisplayName("Exposure mode")]
|
||||
public ExposureMode? ExposureMethod { get; set; }
|
||||
[DisplayName("Exposure Program")]
|
||||
public ExposureProgram? ExposureProgram { get; set; }
|
||||
public Flash? Flash { get; set; }
|
||||
[DisplayName("F-number")]
|
||||
public double? Focal { get; set; }
|
||||
[DisplayName("Lens focal length")]
|
||||
public double? FocalLength { get; set; }
|
||||
[DisplayName("Focal length in 35 mm film")]
|
||||
public ushort? FocalLengthEquivalent { get; set; }
|
||||
[DisplayName("Horizontal resolution")]
|
||||
public double? HorizontalResolution { get; set; }
|
||||
[DisplayName("ISO speed rating")]
|
||||
public ushort? IsoRating { get; set; }
|
||||
[DisplayName("Lens used")]
|
||||
public string Lens { get; set; }
|
||||
[DisplayName("Light source")]
|
||||
public LightSource? LightSource { get; set; }
|
||||
[DisplayName("Metering mode")]
|
||||
public MeteringMode? MeteringMode { get; set; }
|
||||
[DisplayName("Resolution unit")]
|
||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||
public Orientation? Orientation { get; set; }
|
||||
public Saturation? Saturation { get; set; }
|
||||
[DisplayName("Scene capture type")]
|
||||
public SceneCaptureType? SceneCaptureType { get; set; }
|
||||
[DisplayName("Sensing method")]
|
||||
public SensingMethod? SensingMethod { get; set; }
|
||||
public string Sharpness { get; set; }
|
||||
[DisplayName("Software used")]
|
||||
public string SoftwareUsed { get; set; }
|
||||
[DisplayName("Subject distance range")]
|
||||
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
|
||||
[Timestamp]
|
||||
[DisplayName("Uploaded on")]
|
||||
public DateTime UploadDate { get; set; }
|
||||
[DisplayName("Vertical resolution")]
|
||||
public double? VerticalResolution { get; set; }
|
||||
[DisplayName("White balance")]
|
||||
public WhiteBalance? WhiteBalance { get; set; }
|
||||
public string License { get; set; }
|
||||
[DisplayName("Uploaded by")]
|
||||
public string UploadUser { get; set; }
|
||||
public string Machine { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@model Cicm.Database.Models.MachinePhoto
|
||||
@model cicm_web.Areas.Admin.Models.MachinePhotoDetailsViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
@@ -7,219 +7,326 @@
|
||||
<h1>Details</h1>
|
||||
|
||||
<div>
|
||||
<h4>MachinePhoto</h4>
|
||||
<h4>Machine photo</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Author)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Author)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CameraManufacturer)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CameraManufacturer)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CameraModel)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CameraModel)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ColorSpace)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ColorSpace)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Comments)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Comments)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Contrast)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Contrast)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CreationDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CreationDate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.DigitalZoomRatio)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.DigitalZoomRatio)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExifVersion)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ExifVersion)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Exposure)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Exposure)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExposureMethod)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ExposureMethod)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExposureProgram)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ExposureProgram)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Flash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Flash)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Focal)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Focal)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.FocalLength)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.FocalLength)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.FocalLengthEquivalent)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.FocalLengthEquivalent)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.HorizontalResolution)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.HorizontalResolution)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.IsoRating)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.IsoRating)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Lens)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Lens)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.License)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.License)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LightSource)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LightSource)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.MeteringMode)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.MeteringMode)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Orientation)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Orientation)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.PixelComposition)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.PixelComposition)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Saturation)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Saturation)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SceneCaptureType)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SceneCaptureType)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SceneControl)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SceneControl)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SensingMethod)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SensingMethod)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Sharpness)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Sharpness)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SoftwareUsed)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SoftwareUsed)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SubjectDistanceRange)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SubjectDistanceRange)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.UploadDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.UploadDate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.VerticalResolution)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.VerticalResolution)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.WhiteBalance)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.WhiteBalance)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.UploadUser)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.UploadUser)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.UploadDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.UploadDate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.License)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.License)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Edit"
|
||||
asp-route-id="@Model.Id">
|
||||
asp-route-id="@Model.Id"
|
||||
class="btn btn-primary">
|
||||
Edit
|
||||
</a> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</a>
|
||||
<a asp-action="Index"
|
||||
class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
<dl class="row">
|
||||
|
||||
@if(Model.Author != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Author)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Author)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.CameraManufacturer != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CameraManufacturer)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CameraManufacturer)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.CameraModel != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CameraModel)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CameraModel)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.ColorSpace != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ColorSpace)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ColorSpace)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Comments != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Comments)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Comments)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Contrast != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Contrast)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Contrast)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.CreationDate != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.CreationDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.CreationDate)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.DigitalZoomRatio != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.DigitalZoomRatio)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.DigitalZoomRatio)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.ExifVersion != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExifVersion)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ExifVersion)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Exposure != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Exposure)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Exposure)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.ExposureMethod != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExposureMethod)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ExposureMethod)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.ExposureProgram != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ExposureProgram)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ExposureProgram)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Flash != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Flash)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Flash)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Focal != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Focal)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Focal)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.FocalLength != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.FocalLength)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.FocalLength)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.FocalLengthEquivalent != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.FocalLengthEquivalent)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.FocalLengthEquivalent)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.HorizontalResolution != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.HorizontalResolution)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.HorizontalResolution)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.IsoRating != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.IsoRating)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.IsoRating)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Lens != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Lens)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Lens)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.LightSource != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LightSource)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LightSource)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.MeteringMode != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.MeteringMode)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.MeteringMode)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.ResolutionUnit != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ResolutionUnit)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ResolutionUnit)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Orientation != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Orientation)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Orientation)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Saturation != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Saturation)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Saturation)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.SceneCaptureType != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SceneCaptureType)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SceneCaptureType)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.SensingMethod != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SensingMethod)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SensingMethod)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.Sharpness != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Sharpness)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Sharpness)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.SoftwareUsed != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SoftwareUsed)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SoftwareUsed)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.SubjectDistanceRange != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SubjectDistanceRange)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SubjectDistanceRange)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.VerticalResolution != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.VerticalResolution)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.VerticalResolution)
|
||||
</dd>
|
||||
}
|
||||
@if(Model.WhiteBalance != null)
|
||||
{
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.WhiteBalance)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.WhiteBalance)
|
||||
</dd>
|
||||
}
|
||||
</dl>
|
||||
</div>
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<Version>3.0.99.629</Version>
|
||||
<Version>3.0.99.631</Version>
|
||||
<Company>Canary Islands Computer Museum</Company>
|
||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||
<Product>Canary Islands Computer Museum Website</Product>
|
||||
|
||||
Reference in New Issue
Block a user