From 6eb598b92fad838d625564356d0ae478986427c4 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 16 Nov 2019 02:21:44 +0000 Subject: [PATCH] Remove edit and detail from PCMCIA. --- .../Admin/Controllers/PcmciasController.cs | 74 ----------------- .../Areas/Admin/Views/Pcmcias/Details.cshtml | 81 ------------------- .../Areas/Admin/Views/Pcmcias/Edit.cshtml | 79 ------------------ .../Areas/Admin/Views/Pcmcias/Index.cshtml | 2 - 4 files changed, 236 deletions(-) delete mode 100644 DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Details.cshtml delete mode 100644 DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Edit.cshtml diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/PcmciasController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/PcmciasController.cs index 5af2f433..c9a7d583 100644 --- a/DiscImageChef.Server/Areas/Admin/Controllers/PcmciasController.cs +++ b/DiscImageChef.Server/Areas/Admin/Controllers/PcmciasController.cs @@ -18,78 +18,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers // GET: Admin/Pcmcias public async Task Index() => View(await _context.Pcmcia.ToListAsync()); - // GET: Admin/Pcmcias/Details/5 - public async Task Details(int? id) - { - if(id == null) - { - return NotFound(); - } - - Pcmcia pcmcia = await _context.Pcmcia.FirstOrDefaultAsync(m => m.Id == id); - - if(pcmcia == null) - { - return NotFound(); - } - - return View(pcmcia); - } - - // GET: Admin/Pcmcias/Edit/5 - public async Task Edit(int? id) - { - if(id == null) - { - return NotFound(); - } - - Pcmcia pcmcia = await _context.Pcmcia.FindAsync(id); - - if(pcmcia == null) - { - return NotFound(); - } - - return View(pcmcia); - } - - // POST: Admin/Pcmcias/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,CIS,Compliance,ManufacturerCode,CardCode,Manufacturer,ProductName")] - Pcmcia pcmcia) - { - if(id != pcmcia.Id) - { - return NotFound(); - } - - if(ModelState.IsValid) - { - try - { - _context.Update(pcmcia); - await _context.SaveChangesAsync(); - } - catch(DbUpdateConcurrencyException) - { - if(!PcmciaExists(pcmcia.Id)) - { - return NotFound(); - } - - throw; - } - - return RedirectToAction(nameof(Index)); - } - - return View(pcmcia); - } - // GET: Admin/Pcmcias/Delete/5 public async Task Delete(int? id) { @@ -118,7 +46,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers return RedirectToAction(nameof(Index)); } - - bool PcmciaExists(int id) => _context.Pcmcia.Any(e => e.Id == id); } } \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Details.cshtml deleted file mode 100644 index e493f8c6..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Details.cshtml +++ /dev/null @@ -1,81 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.Pcmcia - -@{ - 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 - // ****************************************************************************/ -} -
-

Pcmcia

-
-
-
- @Html.DisplayNameFor(model => model.CIS) -
-
- @Html.DisplayFor(model => model.CIS) -
-
- @Html.DisplayNameFor(model => model.Compliance) -
-
- @Html.DisplayFor(model => model.Compliance) -
-
- @Html.DisplayNameFor(model => model.ManufacturerCode) -
-
- @Html.DisplayFor(model => model.ManufacturerCode) -
-
- @Html.DisplayNameFor(model => model.CardCode) -
-
- @Html.DisplayFor(model => model.CardCode) -
-
- @Html.DisplayNameFor(model => model.Manufacturer) -
-
- @Html.DisplayFor(model => model.Manufacturer) -
-
- @Html.DisplayNameFor(model => model.ProductName) -
-
- @Html.DisplayFor(model => model.ProductName) -
-
-
- \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Edit.cshtml deleted file mode 100644 index 8cee5b09..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Pcmcias/Edit.cshtml +++ /dev/null @@ -1,79 +0,0 @@ -@model DiscImageChef.CommonTypes.Metadata.Pcmcia - -@{ - 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 - // ****************************************************************************/ -} -

Pcmcia

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