diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/PartitionsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/PartitionsController.cs index 26b8154f..cd1bd03a 100644 --- a/DiscImageChef.Server/Areas/Admin/Controllers/PartitionsController.cs +++ b/DiscImageChef.Server/Areas/Admin/Controllers/PartitionsController.cs @@ -16,106 +16,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers // GET: Admin/Partitions public async Task Index() => View(await _context.Partitions.ToListAsync()); - - // GET: Admin/Partitions/Details/5 - public async Task Details(int? id) - { - if(id == null) - { - return NotFound(); - } - - Partition partition = await _context.Partitions.FirstOrDefaultAsync(m => m.Id == id); - - if(partition == null) - { - return NotFound(); - } - - return View(partition); - } - - // GET: Admin/Partitions/Edit/5 - public async Task Edit(int? id) - { - if(id == null) - { - return NotFound(); - } - - Partition partition = await _context.Partitions.FindAsync(id); - - if(partition == null) - { - return NotFound(); - } - - return View(partition); - } - - // POST: Admin/Partitions/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,Name,Count")] Partition partition) - { - if(id != partition.Id) - { - return NotFound(); - } - - if(ModelState.IsValid) - { - try - { - _context.Update(partition); - await _context.SaveChangesAsync(); - } - catch(DbUpdateConcurrencyException) - { - if(!PartitionExists(partition.Id)) - { - return NotFound(); - } - - throw; - } - - return RedirectToAction(nameof(Index)); - } - - return View(partition); - } - - // GET: Admin/Partitions/Delete/5 - public async Task Delete(int? id) - { - if(id == null) - { - return NotFound(); - } - - Partition partition = await _context.Partitions.FirstOrDefaultAsync(m => m.Id == id); - - if(partition == null) - { - return NotFound(); - } - - return View(partition); - } - - // POST: Admin/Partitions/Delete/5 - [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] - public async Task DeleteConfirmed(int id) - { - Partition partition = await _context.Partitions.FindAsync(id); - _context.Partitions.Remove(partition); - await _context.SaveChangesAsync(); - - return RedirectToAction(nameof(Index)); - } - - bool PartitionExists(int id) => _context.Partitions.Any(e => e.Id == id); } } \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Delete.cshtml deleted file mode 100644 index b75dad3d..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Delete.cshtml +++ /dev/null @@ -1,59 +0,0 @@ -@model Partition - -@{ - Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml"; - ViewBag.Title = "DiscImageChef"; -} -@{ - // /*************************************************************************** - // The Disc Image Chef - // ---------------------------------------------------------------------------- - // - // Filename : Delete.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 - // ****************************************************************************/ -} -

Are you sure you want to delete this?

-
-

Partition

-
-
-
- @Html.DisplayNameFor(model => model.Name) -
-
- @Html.DisplayFor(model => model.Name) -
-
- @Html.DisplayNameFor(model => model.Count) -
-
- @Html.DisplayFor(model => model.Count) -
-
-
- - Back to List - -
-
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Details.cshtml deleted file mode 100644 index f9b850ff..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Details.cshtml +++ /dev/null @@ -1,57 +0,0 @@ -@model Partition - -@{ - 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 - // ****************************************************************************/ -} -
-

Partition

-
-
-
- @Html.DisplayNameFor(model => model.Name) -
-
- @Html.DisplayFor(model => model.Name) -
-
- @Html.DisplayNameFor(model => model.Count) -
-
- @Html.DisplayFor(model => model.Count) -
-
-
- \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Edit.cshtml deleted file mode 100644 index 30de7b8f..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Edit.cshtml +++ /dev/null @@ -1,59 +0,0 @@ -@model Partition - -@{ - 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 - // ****************************************************************************/ -} -

Partition

-
-
-
-
-
- -
- - - -
-
- - - -
-
- - Back to List -
-
-
-
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Index.cshtml index 82083b18..36b6a715 100644 --- a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Index.cshtml +++ b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Index.cshtml @@ -42,7 +42,6 @@ @Html.DisplayNameFor(model => model.Count) - @@ -55,11 +54,6 @@ @Html.DisplayFor(modelItem => item.Count) - - Details - Edit - Delete - }