diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs index 055ecbe7..efc19dc4 100644 --- a/DiscImageChef.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs +++ b/DiscImageChef.Server/Areas/Admin/Controllers/SupportedDensitiesController.cs @@ -1,4 +1,3 @@ -using System.Linq; using System.Threading.Tasks; using DiscImageChef.CommonTypes.Metadata; using DiscImageChef.Server.Models; @@ -18,79 +17,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers // GET: Admin/SupportedDensities public async Task Index() => View(await _context.SupportedDensity.ToListAsync()); - // GET: Admin/SupportedDensities/Details/5 - public async Task Details(int? id) - { - if(id == null) - { - return NotFound(); - } - - SupportedDensity supportedDensity = await _context.SupportedDensity.FirstOrDefaultAsync(m => m.Id == id); - - if(supportedDensity == null) - { - return NotFound(); - } - - return View(supportedDensity); - } - - // GET: Admin/SupportedDensities/Edit/5 - public async Task Edit(int? id) - { - if(id == null) - { - return NotFound(); - } - - SupportedDensity supportedDensity = await _context.SupportedDensity.FindAsync(id); - - if(supportedDensity == null) - { - return NotFound(); - } - - return View(supportedDensity); - } - - // POST: Admin/SupportedDensities/Edit/5 - // To protect from overposting attacks, please enable the specific properties you want to bind to, for - // more details see http://go.microsoft.com/fwlink/?LinkId=317598. - [HttpPost, ValidateAntiForgeryToken] - public async Task Edit( - int id, [Bind( - "Id,PrimaryCode,SecondaryCode,Writable,Duplicate,DefaultDensity,BitsPerMm,Width,Tracks,Capacity,Organization,Name,Description")] - SupportedDensity supportedDensity) - { - if(id != supportedDensity.Id) - { - return NotFound(); - } - - if(ModelState.IsValid) - { - try - { - _context.Update(supportedDensity); - await _context.SaveChangesAsync(); - } - catch(DbUpdateConcurrencyException) - { - if(!SupportedDensityExists(supportedDensity.Id)) - { - return NotFound(); - } - - throw; - } - - return RedirectToAction(nameof(Index)); - } - - return View(supportedDensity); - } - // GET: Admin/SupportedDensities/Delete/5 public async Task Delete(int? id) { @@ -119,7 +45,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers return RedirectToAction(nameof(Index)); } - - bool SupportedDensityExists(int id) => _context.SupportedDensity.Any(e => e.Id == id); } } \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Details.cshtml deleted file mode 100644 index 21d4b8c0..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Details.cshtml +++ /dev/null @@ -1,117 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.SupportedDensity - -@{ - Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml"; - ViewBag.Title = "DiscImageChef"; -} -@{ - // /*************************************************************************** - // The Disc Image Chef - // ---------------------------------------------------------------------------- - // - // Filename : Details.cshtml - // Author(s) : Natalia Portillo - // - // Component : DiscImageChef Server. - // - // --[ License ] -------------------------------------------------------------- - // - // This library is free software; you can redistribute it and/or modify - // it under the terms of the GNU Lesser General Public License as - // published by the Free Software Foundation; either version 2.1 of the - // License, or (at your option) any later version. - // - // This library is distributed in the hope that it will be useful, but - // WITHOUT ANY WARRANTY; without even the implied warranty of - // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - // Lesser General Public License for more details. - // - // You should have received a copy of the GNU Lesser General Public - // License along with this library; if not, see . - // - // ---------------------------------------------------------------------------- - // Copyright © 2011-2019 Natalia Portillo - // ****************************************************************************/ -} -
-

SupportedDensity

-
-
-
- @Html.DisplayNameFor(model => model.PrimaryCode) -
-
- @Html.DisplayFor(model => model.PrimaryCode) -
-
- @Html.DisplayNameFor(model => model.SecondaryCode) -
-
- @Html.DisplayFor(model => model.SecondaryCode) -
-
- @Html.DisplayNameFor(model => model.Writable) -
-
- @Html.DisplayFor(model => model.Writable) -
-
- @Html.DisplayNameFor(model => model.Duplicate) -
-
- @Html.DisplayFor(model => model.Duplicate) -
-
- @Html.DisplayNameFor(model => model.DefaultDensity) -
-
- @Html.DisplayFor(model => model.DefaultDensity) -
-
- @Html.DisplayNameFor(model => model.BitsPerMm) -
-
- @Html.DisplayFor(model => model.BitsPerMm) -
-
- @Html.DisplayNameFor(model => model.Width) -
-
- @Html.DisplayFor(model => model.Width) -
-
- @Html.DisplayNameFor(model => model.Tracks) -
-
- @Html.DisplayFor(model => model.Tracks) -
-
- @Html.DisplayNameFor(model => model.Capacity) -
-
- @Html.DisplayFor(model => model.Capacity) -
-
- @Html.DisplayNameFor(model => model.Organization) -
-
- @Html.DisplayFor(model => model.Organization) -
-
- @Html.DisplayNameFor(model => model.Name) -
-
- @Html.DisplayFor(model => model.Name) -
-
- @Html.DisplayNameFor(model => model.Description) -
-
- @Html.DisplayFor(model => model.Description) -
-
-
- \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Edit.cshtml deleted file mode 100644 index 284e0dae..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Edit.cshtml +++ /dev/null @@ -1,109 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.SupportedDensity - -@{ - Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml"; - ViewBag.Title = "DiscImageChef"; -} -@{ - // /*************************************************************************** - // The Disc Image Chef - // ---------------------------------------------------------------------------- - // - // Filename : Edit.cshtml - // Author(s) : Natalia Portillo - // - // Component : DiscImageChef Server. - // - // --[ License ] -------------------------------------------------------------- - // - // This library is free software; you can redistribute it and/or modify - // it under the terms of the GNU Lesser General Public License as - // published by the Free Software Foundation; either version 2.1 of the - // License, or (at your option) any later version. - // - // This library is distributed in the hope that it will be useful, but - // WITHOUT ANY WARRANTY; without even the implied warranty of - // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - // Lesser General Public License for more details. - // - // You should have received a copy of the GNU Lesser General Public - // License along with this library; if not, see . - // - // ---------------------------------------------------------------------------- - // Copyright © 2011-2019 Natalia Portillo - // ****************************************************************************/ -} -

SupportedDensity

-
-
-
-
-
- -
- - - -
-
- - - -
-
- -
-
- -
-
- -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - Back to List -
-
-
-
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Index.cshtml index 686c199c..815f424b 100644 --- a/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Index.cshtml +++ b/DiscImageChef.Server/Areas/Admin/Views/SupportedDensities/Index.cshtml @@ -116,8 +116,6 @@ @Html.DisplayFor(modelItem => item.Description) - Details - Edit Delete