From 4408f153a71743f5ef589be754130b69eac46094 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 16 Nov 2019 02:38:55 +0000 Subject: [PATCH] Remove details and edit from SCSI MODE SENSE. --- .../Admin/Controllers/ScsiModesController.cs | 74 ----------------- .../Admin/Views/ScsiModes/Details.cshtml | 81 ------------------- .../Areas/Admin/Views/ScsiModes/Edit.cshtml | 79 ------------------ .../Areas/Admin/Views/ScsiModes/Index.cshtml | 2 - 4 files changed, 236 deletions(-) delete mode 100644 DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Details.cshtml delete mode 100644 DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Edit.cshtml diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/ScsiModesController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/ScsiModesController.cs index 556394a8..c9e4cd84 100644 --- a/DiscImageChef.Server/Areas/Admin/Controllers/ScsiModesController.cs +++ b/DiscImageChef.Server/Areas/Admin/Controllers/ScsiModesController.cs @@ -18,78 +18,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers // GET: Admin/ScsiModes public async Task Index() => View(await _context.ScsiMode.ToListAsync()); - // GET: Admin/ScsiModes/Details/5 - public async Task Details(int? id) - { - if(id == null) - { - return NotFound(); - } - - ScsiMode scsiMode = await _context.ScsiMode.FirstOrDefaultAsync(m => m.Id == id); - - if(scsiMode == null) - { - return NotFound(); - } - - return View(scsiMode); - } - - // GET: Admin/ScsiModes/Edit/5 - public async Task Edit(int? id) - { - if(id == null) - { - return NotFound(); - } - - ScsiMode scsiMode = await _context.ScsiMode.FindAsync(id); - - if(scsiMode == null) - { - return NotFound(); - } - - return View(scsiMode); - } - - // POST: Admin/ScsiModes/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,MediumType,WriteProtected,Speed,BufferedMode,BlankCheckEnabled,DPOandFUA")] - ScsiMode scsiMode) - { - if(id != scsiMode.Id) - { - return NotFound(); - } - - if(ModelState.IsValid) - { - try - { - _context.Update(scsiMode); - await _context.SaveChangesAsync(); - } - catch(DbUpdateConcurrencyException) - { - if(!ScsiModeExists(scsiMode.Id)) - { - return NotFound(); - } - - throw; - } - - return RedirectToAction(nameof(Index)); - } - - return View(scsiMode); - } - // GET: Admin/ScsiModes/Delete/5 public async Task Delete(int? id) { @@ -118,7 +46,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers return RedirectToAction(nameof(Index)); } - - bool ScsiModeExists(int id) => _context.ScsiMode.Any(e => e.Id == id); } } \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Details.cshtml deleted file mode 100644 index 7531bbf3..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Details.cshtml +++ /dev/null @@ -1,81 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.ScsiMode - -@{ - 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 - // ****************************************************************************/ -} -
-

ScsiMode

-
-
-
- @Html.DisplayNameFor(model => model.MediumType) -
-
- @Html.DisplayFor(model => model.MediumType) -
-
- @Html.DisplayNameFor(model => model.WriteProtected) -
-
- @Html.DisplayFor(model => model.WriteProtected) -
-
- @Html.DisplayNameFor(model => model.Speed) -
-
- @Html.DisplayFor(model => model.Speed) -
-
- @Html.DisplayNameFor(model => model.BufferedMode) -
-
- @Html.DisplayFor(model => model.BufferedMode) -
-
- @Html.DisplayNameFor(model => model.BlankCheckEnabled) -
-
- @Html.DisplayFor(model => model.BlankCheckEnabled) -
-
- @Html.DisplayNameFor(model => model.DPOandFUA) -
-
- @Html.DisplayFor(model => model.DPOandFUA) -
-
-
- \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Edit.cshtml deleted file mode 100644 index 14d39d41..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Edit.cshtml +++ /dev/null @@ -1,79 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.ScsiMode - -@{ - 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 - // ****************************************************************************/ -} -

ScsiMode

-
-
-
-
-
- -
- - - -
-
- -
-
- - - -
-
- - - -
-
- -
-
- -
-
- - Back to List -
-
-
-
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Index.cshtml index 9335db5c..c783871c 100644 --- a/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Index.cshtml +++ b/DiscImageChef.Server/Areas/Admin/Views/ScsiModes/Index.cshtml @@ -80,8 +80,6 @@ @Html.DisplayFor(modelItem => item.DPOandFUA) - Details - Edit Delete