diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/MediasController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/MediasController.cs index 11bca321..18b00e83 100644 --- a/DiscImageChef.Server/Areas/Admin/Controllers/MediasController.cs +++ b/DiscImageChef.Server/Areas/Admin/Controllers/MediasController.cs @@ -17,76 +17,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers // GET: Admin/Medias public async Task Index() => View(await _context.Medias.ToListAsync()); - // GET: Admin/Medias/Details/5 - public async Task Details(int? id) - { - if(id == null) - { - return NotFound(); - } - - Media media = await _context.Medias.FirstOrDefaultAsync(m => m.Id == id); - - if(media == null) - { - return NotFound(); - } - - return View(media); - } - - // GET: Admin/Medias/Edit/5 - public async Task Edit(int? id) - { - if(id == null) - { - return NotFound(); - } - - Media media = await _context.Medias.FindAsync(id); - - if(media == null) - { - return NotFound(); - } - - return View(media); - } - - // POST: Admin/Medias/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,Type,Real,Count")] Media media) - { - if(id != media.Id) - { - return NotFound(); - } - - if(ModelState.IsValid) - { - try - { - _context.Update(media); - await _context.SaveChangesAsync(); - } - catch(DbUpdateConcurrencyException) - { - if(!MediaExists(media.Id)) - { - return NotFound(); - } - - throw; - } - - return RedirectToAction(nameof(Index)); - } - - return View(media); - } - // GET: Admin/Medias/Delete/5 public async Task Delete(int? id) { @@ -115,7 +45,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers return RedirectToAction(nameof(Index)); } - - bool MediaExists(int id) => _context.Medias.Any(e => e.Id == id); } } \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Medias/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Medias/Details.cshtml deleted file mode 100644 index 17297053..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Medias/Details.cshtml +++ /dev/null @@ -1,63 +0,0 @@ -@model Media - -@{ - 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 - // ****************************************************************************/ -} -
-

Media

-
-
-
- @Html.DisplayNameFor(model => model.Type) -
-
- @Html.DisplayFor(model => model.Type) -
-
- @Html.DisplayNameFor(model => model.Real) -
-
- @Html.DisplayFor(model => model.Real) -
-
- @Html.DisplayNameFor(model => model.Count) -
-
- @Html.DisplayFor(model => model.Count) -
-
-
- \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Medias/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Medias/Edit.cshtml deleted file mode 100644 index 80e06eb8..00000000 --- a/DiscImageChef.Server/Areas/Admin/Views/Medias/Edit.cshtml +++ /dev/null @@ -1,64 +0,0 @@ -@model Media - -@{ - 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 - // ****************************************************************************/ -} -

Media

-
-
-
-
-
- -
- - - -
-
- -
-
- - - -
-
- - Back to List -
-
-
-
\ No newline at end of file