From 89e3b91378c8dcf9a706686c1f7cc2ae0508627d Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 17 Nov 2019 13:29:45 +0000 Subject: [PATCH] Remove edit from SCSI devices. --- .../Admin/Controllers/ScsisController.cs | 55 ----------- .../Areas/Admin/Views/Scsis/Details.cshtml | 1 - .../Areas/Admin/Views/Scsis/Edit.cshtml | 99 ------------------- .../Areas/Admin/Views/Scsis/Index.cshtml | 1 - 4 files changed, 156 deletions(-) delete mode 100644 DiscImageChef.Server/Areas/Admin/Views/Scsis/Edit.cshtml diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/ScsisController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/ScsisController.cs index 253f5233..34aaa235 100644 --- a/DiscImageChef.Server/Areas/Admin/Controllers/ScsisController.cs +++ b/DiscImageChef.Server/Areas/Admin/Controllers/ScsisController.cs @@ -36,61 +36,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers return View(scsi); } - // GET: Admin/Scsis/Edit/5 - public async Task Edit(int? id) - { - if(id == null) - { - return NotFound(); - } - - Scsi scsi = await _context.Scsi.FindAsync(id); - - if(scsi == null) - { - return NotFound(); - } - - return View(scsi); - } - - // POST: Admin/Scsis/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,InquiryData,SupportsModeSense6,SupportsModeSense10,SupportsModeSubpages,ModeSense6Data,ModeSense10Data,ModeSense6CurrentData,ModeSense10CurrentData,ModeSense6ChangeableData,ModeSense10ChangeableData")] - Scsi scsi) - { - if(id != scsi.Id) - { - return NotFound(); - } - - if(ModelState.IsValid) - { - try - { - _context.Update(scsi); - await _context.SaveChangesAsync(); - } - catch(DbUpdateConcurrencyException) - { - if(!ScsiExists(scsi.Id)) - { - return NotFound(); - } - - throw; - } - - return RedirectToAction(nameof(Index)); - } - - return View(scsi); - } - // GET: Admin/Scsis/Delete/5 public async Task Delete(int? id) { diff --git a/DiscImageChef.Server/Areas/Admin/Views/Scsis/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Scsis/Details.cshtml index ce2d740e..cc72277a 100644 --- a/DiscImageChef.Server/Areas/Admin/Views/Scsis/Details.cshtml +++ b/DiscImageChef.Server/Areas/Admin/Views/Scsis/Details.cshtml @@ -100,6 +100,5 @@
- Edit Back to List
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Scsis/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Scsis/Edit.cshtml deleted file mode 100644 index 92ce5dd4..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Scsis/Edit.cshtml +++ /dev/null @@ -1,99 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.Scsi - -@{ - 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 - // ****************************************************************************/ -} -

Scsi

-
-
-
-
-
- -
- - - -
-
- -
-
- -
-
- -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - Back to List -
-
-
-
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Scsis/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Scsis/Index.cshtml index ba65f320..cd83b3bf 100644 --- a/DiscImageChef.Server/Areas/Admin/Views/Scsis/Index.cshtml +++ b/DiscImageChef.Server/Areas/Admin/Views/Scsis/Index.cshtml @@ -105,7 +105,6 @@ Details - Edit Delete