From 034889f1ca9fdfcee3f2e0f7f4c9c84e8144927f Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 16 Nov 2019 02:53:36 +0000 Subject: [PATCH] Remove details and edit from SCSI MODE SENSE pages. --- .../Admin/Controllers/ScsiPagesController.cs | 72 ------------------- .../Admin/Views/ScsiPages/Details.cshtml | 63 ---------------- .../Areas/Admin/Views/ScsiPages/Edit.cshtml | 64 ----------------- .../Areas/Admin/Views/ScsiPages/Index.cshtml | 8 --- 4 files changed, 207 deletions(-) delete mode 100644 DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Details.cshtml delete mode 100644 DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Edit.cshtml diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/ScsiPagesController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/ScsiPagesController.cs index bd3a630a..56576403 100644 --- a/DiscImageChef.Server/Areas/Admin/Controllers/ScsiPagesController.cs +++ b/DiscImageChef.Server/Areas/Admin/Controllers/ScsiPagesController.cs @@ -18,76 +18,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers // GET: Admin/ScsiPages public async Task Index() => View(await _context.ScsiPage.ToListAsync()); - // GET: Admin/ScsiPages/Details/5 - public async Task Details(int? id) - { - if(id == null) - { - return NotFound(); - } - - ScsiPage scsiPage = await _context.ScsiPage.FirstOrDefaultAsync(m => m.Id == id); - - if(scsiPage == null) - { - return NotFound(); - } - - return View(scsiPage); - } - - // GET: Admin/ScsiPages/Edit/5 - public async Task Edit(int? id) - { - if(id == null) - { - return NotFound(); - } - - ScsiPage scsiPage = await _context.ScsiPage.FindAsync(id); - - if(scsiPage == null) - { - return NotFound(); - } - - return View(scsiPage); - } - - // POST: Admin/ScsiPages/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,page,subpage,value")] ScsiPage scsiPage) - { - if(id != scsiPage.Id) - { - return NotFound(); - } - - if(ModelState.IsValid) - { - try - { - _context.Update(scsiPage); - await _context.SaveChangesAsync(); - } - catch(DbUpdateConcurrencyException) - { - if(!ScsiPageExists(scsiPage.Id)) - { - return NotFound(); - } - - throw; - } - - return RedirectToAction(nameof(Index)); - } - - return View(scsiPage); - } - // GET: Admin/ScsiPages/Delete/5 public async Task Delete(int? id) { @@ -116,7 +46,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers return RedirectToAction(nameof(Index)); } - - bool ScsiPageExists(int id) => _context.ScsiPage.Any(e => e.Id == id); } } \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Details.cshtml deleted file mode 100644 index 3d2da6ea..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Details.cshtml +++ /dev/null @@ -1,63 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.ScsiPage - -@{ - 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 - // ****************************************************************************/ -} -
-

ScsiPage

-
-
-
- @Html.DisplayNameFor(model => model.page) -
-
- @Html.DisplayFor(model => model.page) -
-
- @Html.DisplayNameFor(model => model.subpage) -
-
- @Html.DisplayFor(model => model.subpage) -
-
- @Html.DisplayNameFor(model => model.value) -
-
- @Html.DisplayFor(model => model.value) -
-
-
- \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Edit.cshtml deleted file mode 100644 index 7b1b9003..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Edit.cshtml +++ /dev/null @@ -1,64 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.ScsiPage - -@{ - 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 - // ****************************************************************************/ -} -

ScsiPage

-
-
-
-
-
- -
- - - -
-
- - - -
-
- - - -
-
- - Back to List -
-
-
-
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Index.cshtml index 0245aee1..b5717eac 100644 --- a/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Index.cshtml +++ b/DiscImageChef.Server/Areas/Admin/Views/ScsiPages/Index.cshtml @@ -42,9 +42,6 @@ @Html.DisplayNameFor(model => model.subpage) - - @Html.DisplayNameFor(model => model.value) - @@ -59,11 +56,6 @@ @Html.DisplayFor(modelItem => item.subpage) - @Html.DisplayFor(modelItem => item.value) - - - Details - Edit Delete