diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/CommandsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/CommandsController.cs new file mode 100644 index 00000000..4122915c --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/CommandsController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class CommandsController : Controller + { + readonly DicServerContext _context; + + public CommandsController(DicServerContext context) => _context = context; + + // GET: Admin/Commands + public async Task Index() => View(await _context.Commands.ToListAsync()); + + // GET: Admin/Commands/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + Command command = await _context.Commands.FirstOrDefaultAsync(m => m.Id == id); + + if(command == null) + { + return NotFound(); + } + + return View(command); + } + + // GET: Admin/Commands/Create + public IActionResult Create() => View(); + + // POST: Admin/Commands/Create + // 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 Create([Bind("Id,Name,Count")] Command command) + { + if(ModelState.IsValid) + { + _context.Add(command); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(command); + } + + // GET: Admin/Commands/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + Command command = await _context.Commands.FindAsync(id); + + if(command == null) + { + return NotFound(); + } + + return View(command); + } + + // POST: Admin/Commands/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")] Command command) + { + if(id != command.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(command); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!CommandExists(command.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(command); + } + + // GET: Admin/Commands/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + Command command = await _context.Commands.FirstOrDefaultAsync(m => m.Id == id); + + if(command == null) + { + return NotFound(); + } + + return View(command); + } + + // POST: Admin/Commands/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + Command command = await _context.Commands.FindAsync(id); + _context.Commands.Remove(command); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool CommandExists(int id) => _context.Commands.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/CompactDiscOffsetsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/CompactDiscOffsetsController.cs new file mode 100644 index 00000000..1a307b00 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/CompactDiscOffsetsController.cs @@ -0,0 +1,144 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class CompactDiscOffsetsController : Controller + { + readonly DicServerContext _context; + + public CompactDiscOffsetsController(DicServerContext context) => _context = context; + + // GET: Admin/CompactDiscOffsets + public async Task Index() => View(await _context.CdOffsets.ToListAsync()); + + // GET: Admin/CompactDiscOffsets/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FirstOrDefaultAsync(m => m.Id == id); + + if(compactDiscOffset == null) + { + return NotFound(); + } + + return View(compactDiscOffset); + } + + // GET: Admin/CompactDiscOffsets/Create + public IActionResult Create() => View(); + + // POST: Admin/CompactDiscOffsets/Create + // 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 Create( + [Bind("Id,AddedWhen,ModifiedWhen,Manufacturer,Model,Offset,Submissions,Agreement")] + CompactDiscOffset compactDiscOffset) + { + if(ModelState.IsValid) + { + _context.Add(compactDiscOffset); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(compactDiscOffset); + } + + // GET: Admin/CompactDiscOffsets/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id); + + if(compactDiscOffset == null) + { + return NotFound(); + } + + return View(compactDiscOffset); + } + + // POST: Admin/CompactDiscOffsets/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,AddedWhen,ModifiedWhen,Manufacturer,Model,Offset,Submissions,Agreement")] + CompactDiscOffset compactDiscOffset) + { + if(id != compactDiscOffset.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(compactDiscOffset); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!CompactDiscOffsetExists(compactDiscOffset.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(compactDiscOffset); + } + + // GET: Admin/CompactDiscOffsets/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FirstOrDefaultAsync(m => m.Id == id); + + if(compactDiscOffset == null) + { + return NotFound(); + } + + return View(compactDiscOffset); + } + + // POST: Admin/CompactDiscOffsets/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + CompactDiscOffset compactDiscOffset = await _context.CdOffsets.FindAsync(id); + _context.CdOffsets.Remove(compactDiscOffset); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool CompactDiscOffsetExists(int id) => _context.CdOffsets.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/DeviceStatsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/DeviceStatsController.cs new file mode 100644 index 00000000..1f1b2eff --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/DeviceStatsController.cs @@ -0,0 +1,142 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class DeviceStatsController : Controller + { + readonly DicServerContext _context; + + public DeviceStatsController(DicServerContext context) => _context = context; + + // GET: Admin/DeviceStats + public async Task Index() => View(await _context.DeviceStats.ToListAsync()); + + // GET: Admin/DeviceStats/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + DeviceStat deviceStat = await _context.DeviceStats.FirstOrDefaultAsync(m => m.Id == id); + + if(deviceStat == null) + { + return NotFound(); + } + + return View(deviceStat); + } + + // GET: Admin/DeviceStats/Create + public IActionResult Create() => View(); + + // POST: Admin/DeviceStats/Create + // 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 Create([Bind("Id,Manufacturer,Model,Revision,Bus")] + DeviceStat deviceStat) + { + if(ModelState.IsValid) + { + _context.Add(deviceStat); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(deviceStat); + } + + // GET: Admin/DeviceStats/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id); + + if(deviceStat == null) + { + return NotFound(); + } + + return View(deviceStat); + } + + // POST: Admin/DeviceStats/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,Manufacturer,Model,Revision,Bus")] + DeviceStat deviceStat) + { + if(id != deviceStat.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(deviceStat); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!DeviceStatExists(deviceStat.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(deviceStat); + } + + // GET: Admin/DeviceStats/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + DeviceStat deviceStat = await _context.DeviceStats.FirstOrDefaultAsync(m => m.Id == id); + + if(deviceStat == null) + { + return NotFound(); + } + + return View(deviceStat); + } + + // POST: Admin/DeviceStats/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + DeviceStat deviceStat = await _context.DeviceStats.FindAsync(id); + _context.DeviceStats.Remove(deviceStat); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool DeviceStatExists(int id) => _context.DeviceStats.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/DevicesController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/DevicesController.cs new file mode 100644 index 00000000..f72feefe --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/DevicesController.cs @@ -0,0 +1,145 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class DevicesController : Controller + { + readonly DicServerContext _context; + + public DevicesController(DicServerContext context) => _context = context; + + // GET: Admin/Devices + public async Task Index() => View(await _context.Devices.ToListAsync()); + + // GET: Admin/Devices/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + Device device = await _context.Devices.FirstOrDefaultAsync(m => m.Id == id); + + if(device == null) + { + return NotFound(); + } + + return View(device); + } + + // GET: Admin/Devices/Create + public IActionResult Create() => View(); + + // POST: Admin/Devices/Create + // 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 Create( + [Bind("AddedWhen,ModifiedWhen,OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")] + Device device) + { + if(ModelState.IsValid) + { + _context.Add(device); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(device); + } + + // GET: Admin/Devices/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + Device device = await _context.Devices.FindAsync(id); + + if(device == null) + { + return NotFound(); + } + + return View(device); + } + + // POST: Admin/Devices/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( + "AddedWhen,ModifiedWhen,OptimalMultipleSectorsRead,Id,CompactFlash,Manufacturer,Model,Revision,Type")] + Device device) + { + if(id != device.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(device); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!DeviceExists(device.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(device); + } + + // GET: Admin/Devices/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + Device device = await _context.Devices.FirstOrDefaultAsync(m => m.Id == id); + + if(device == null) + { + return NotFound(); + } + + return View(device); + } + + // POST: Admin/Devices/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + Device device = await _context.Devices.FindAsync(id); + _context.Devices.Remove(device); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool DeviceExists(int id) => _context.Devices.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/FilesystemsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/FilesystemsController.cs new file mode 100644 index 00000000..169acf57 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/FilesystemsController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class FilesystemsController : Controller + { + readonly DicServerContext _context; + + public FilesystemsController(DicServerContext context) => _context = context; + + // GET: Admin/Filesystems + public async Task Index() => View(await _context.Filesystems.ToListAsync()); + + // GET: Admin/Filesystems/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + Filesystem filesystem = await _context.Filesystems.FirstOrDefaultAsync(m => m.Id == id); + + if(filesystem == null) + { + return NotFound(); + } + + return View(filesystem); + } + + // GET: Admin/Filesystems/Create + public IActionResult Create() => View(); + + // POST: Admin/Filesystems/Create + // 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 Create([Bind("Id,Name,Count")] Filesystem filesystem) + { + if(ModelState.IsValid) + { + _context.Add(filesystem); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(filesystem); + } + + // GET: Admin/Filesystems/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + Filesystem filesystem = await _context.Filesystems.FindAsync(id); + + if(filesystem == null) + { + return NotFound(); + } + + return View(filesystem); + } + + // POST: Admin/Filesystems/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")] Filesystem filesystem) + { + if(id != filesystem.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(filesystem); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!FilesystemExists(filesystem.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(filesystem); + } + + // GET: Admin/Filesystems/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + Filesystem filesystem = await _context.Filesystems.FirstOrDefaultAsync(m => m.Id == id); + + if(filesystem == null) + { + return NotFound(); + } + + return View(filesystem); + } + + // POST: Admin/Filesystems/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + Filesystem filesystem = await _context.Filesystems.FindAsync(id); + _context.Filesystems.Remove(filesystem); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool FilesystemExists(int id) => _context.Filesystems.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/FiltersController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/FiltersController.cs new file mode 100644 index 00000000..6e32f8d6 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/FiltersController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class FiltersController : Controller + { + readonly DicServerContext _context; + + public FiltersController(DicServerContext context) => _context = context; + + // GET: Admin/Filters + public async Task Index() => View(await _context.Filters.ToListAsync()); + + // GET: Admin/Filters/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + Filter filter = await _context.Filters.FirstOrDefaultAsync(m => m.Id == id); + + if(filter == null) + { + return NotFound(); + } + + return View(filter); + } + + // GET: Admin/Filters/Create + public IActionResult Create() => View(); + + // POST: Admin/Filters/Create + // 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 Create([Bind("Id,Name,Count")] Filter filter) + { + if(ModelState.IsValid) + { + _context.Add(filter); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(filter); + } + + // GET: Admin/Filters/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + Filter filter = await _context.Filters.FindAsync(id); + + if(filter == null) + { + return NotFound(); + } + + return View(filter); + } + + // POST: Admin/Filters/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")] Filter filter) + { + if(id != filter.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(filter); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!FilterExists(filter.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(filter); + } + + // GET: Admin/Filters/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + Filter filter = await _context.Filters.FirstOrDefaultAsync(m => m.Id == id); + + if(filter == null) + { + return NotFound(); + } + + return View(filter); + } + + // POST: Admin/Filters/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + Filter filter = await _context.Filters.FindAsync(id); + _context.Filters.Remove(filter); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool FilterExists(int id) => _context.Filters.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/MediaFormatsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/MediaFormatsController.cs new file mode 100644 index 00000000..8c8fd122 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/MediaFormatsController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class MediaFormatsController : Controller + { + readonly DicServerContext _context; + + public MediaFormatsController(DicServerContext context) => _context = context; + + // GET: Admin/MediaFormats + public async Task Index() => View(await _context.MediaFormats.ToListAsync()); + + // GET: Admin/MediaFormats/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + MediaFormat mediaFormat = await _context.MediaFormats.FirstOrDefaultAsync(m => m.Id == id); + + if(mediaFormat == null) + { + return NotFound(); + } + + return View(mediaFormat); + } + + // GET: Admin/MediaFormats/Create + public IActionResult Create() => View(); + + // POST: Admin/MediaFormats/Create + // 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 Create([Bind("Id,Name,Count")] MediaFormat mediaFormat) + { + if(ModelState.IsValid) + { + _context.Add(mediaFormat); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(mediaFormat); + } + + // GET: Admin/MediaFormats/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + MediaFormat mediaFormat = await _context.MediaFormats.FindAsync(id); + + if(mediaFormat == null) + { + return NotFound(); + } + + return View(mediaFormat); + } + + // POST: Admin/MediaFormats/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")] MediaFormat mediaFormat) + { + if(id != mediaFormat.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(mediaFormat); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!MediaFormatExists(mediaFormat.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(mediaFormat); + } + + // GET: Admin/MediaFormats/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + MediaFormat mediaFormat = await _context.MediaFormats.FirstOrDefaultAsync(m => m.Id == id); + + if(mediaFormat == null) + { + return NotFound(); + } + + return View(mediaFormat); + } + + // POST: Admin/MediaFormats/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + MediaFormat mediaFormat = await _context.MediaFormats.FindAsync(id); + _context.MediaFormats.Remove(mediaFormat); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool MediaFormatExists(int id) => _context.MediaFormats.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/MediasController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/MediasController.cs new file mode 100644 index 00000000..3b88d8d9 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/MediasController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class MediasController : Controller + { + readonly DicServerContext _context; + + public MediasController(DicServerContext context) => _context = context; + + // 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/Create + public IActionResult Create() => View(); + + // POST: Admin/Medias/Create + // 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 Create([Bind("Id,Type,Real,Count")] Media media) + { + if(ModelState.IsValid) + { + _context.Add(media); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + 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) + { + if(id == null) + { + return NotFound(); + } + + Media media = await _context.Medias.FirstOrDefaultAsync(m => m.Id == id); + + if(media == null) + { + return NotFound(); + } + + return View(media); + } + + // POST: Admin/Medias/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + Media media = await _context.Medias.FindAsync(id); + _context.Medias.Remove(media); + await _context.SaveChangesAsync(); + + 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/Controllers/OperatingSystemsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/OperatingSystemsController.cs new file mode 100644 index 00000000..dc1fd9ba --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/OperatingSystemsController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class OperatingSystemsController : Controller + { + readonly DicServerContext _context; + + public OperatingSystemsController(DicServerContext context) => _context = context; + + // GET: Admin/OperatingSystems + public async Task Index() => View(await _context.OperatingSystems.ToListAsync()); + + // GET: Admin/OperatingSystems/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + OperatingSystem operatingSystem = await _context.OperatingSystems.FirstOrDefaultAsync(m => m.Id == id); + + if(operatingSystem == null) + { + return NotFound(); + } + + return View(operatingSystem); + } + + // GET: Admin/OperatingSystems/Create + public IActionResult Create() => View(); + + // POST: Admin/OperatingSystems/Create + // 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 Create([Bind("Id,Name,Version,Count")] OperatingSystem operatingSystem) + { + if(ModelState.IsValid) + { + _context.Add(operatingSystem); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(operatingSystem); + } + + // GET: Admin/OperatingSystems/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + OperatingSystem operatingSystem = await _context.OperatingSystems.FindAsync(id); + + if(operatingSystem == null) + { + return NotFound(); + } + + return View(operatingSystem); + } + + // POST: Admin/OperatingSystems/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,Version,Count")] OperatingSystem operatingSystem) + { + if(id != operatingSystem.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(operatingSystem); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!OperatingSystemExists(operatingSystem.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(operatingSystem); + } + + // GET: Admin/OperatingSystems/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + OperatingSystem operatingSystem = await _context.OperatingSystems.FirstOrDefaultAsync(m => m.Id == id); + + if(operatingSystem == null) + { + return NotFound(); + } + + return View(operatingSystem); + } + + // POST: Admin/OperatingSystems/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + OperatingSystem operatingSystem = await _context.OperatingSystems.FindAsync(id); + _context.OperatingSystems.Remove(operatingSystem); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool OperatingSystemExists(int id) => _context.OperatingSystems.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/PartitionsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/PartitionsController.cs new file mode 100644 index 00000000..25ab39c2 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/PartitionsController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class PartitionsController : Controller + { + readonly DicServerContext _context; + + public PartitionsController(DicServerContext context) => _context = context; + + // 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/Create + public IActionResult Create() => View(); + + // POST: Admin/Partitions/Create + // 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 Create([Bind("Id,Name,Count")] Partition partition) + { + if(ModelState.IsValid) + { + _context.Add(partition); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + 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/Controllers/ReportsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/ReportsController.cs new file mode 100644 index 00000000..dfa7ab75 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/ReportsController.cs @@ -0,0 +1,143 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class ReportsController : Controller + { + readonly DicServerContext _context; + + public ReportsController(DicServerContext context) => _context = context; + + // GET: Admin/Reports + public async Task Index() => View(await _context.Reports.ToListAsync()); + + // GET: Admin/Reports/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + UploadedReport uploadedReport = await _context.Reports.FirstOrDefaultAsync(m => m.Id == id); + + if(uploadedReport == null) + { + return NotFound(); + } + + return View(uploadedReport); + } + + // GET: Admin/Reports/Create + public IActionResult Create() => View(); + + // POST: Admin/Reports/Create + // 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 Create([Bind("UploadedWhen,Id,CompactFlash,Manufacturer,Model,Revision,Type")] + UploadedReport uploadedReport) + { + if(ModelState.IsValid) + { + _context.Add(uploadedReport); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(uploadedReport); + } + + // GET: Admin/Reports/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + UploadedReport uploadedReport = await _context.Reports.FindAsync(id); + + if(uploadedReport == null) + { + return NotFound(); + } + + return View(uploadedReport); + } + + // POST: Admin/Reports/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("UploadedWhen,Id,CompactFlash,Manufacturer,Model,Revision,Type")] + UploadedReport uploadedReport) + { + if(id != uploadedReport.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(uploadedReport); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!UploadedReportExists(uploadedReport.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(uploadedReport); + } + + // GET: Admin/Reports/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + UploadedReport uploadedReport = await _context.Reports.FirstOrDefaultAsync(m => m.Id == id); + + if(uploadedReport == null) + { + return NotFound(); + } + + return View(uploadedReport); + } + + // POST: Admin/Reports/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + UploadedReport uploadedReport = await _context.Reports.FindAsync(id); + _context.Reports.Remove(uploadedReport); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool UploadedReportExists(int id) => _context.Reports.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/UsbProductsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/UsbProductsController.cs new file mode 100644 index 00000000..7ed518a3 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/UsbProductsController.cs @@ -0,0 +1,162 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Query; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class UsbProductsController : Controller + { + readonly DicServerContext _context; + + public UsbProductsController(DicServerContext context) => _context = context; + + // GET: Admin/UsbProducts + public async Task Index() + { + IIncludableQueryable dicServerContext = _context.UsbProducts.Include(u => u.Vendor); + + return View(await dicServerContext.ToListAsync()); + } + + // GET: Admin/UsbProducts/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + UsbProduct usbProduct = + await _context.UsbProducts.Include(u => u.Vendor).FirstOrDefaultAsync(m => m.Id == id); + + if(usbProduct == null) + { + return NotFound(); + } + + return View(usbProduct); + } + + // GET: Admin/UsbProducts/Create + public IActionResult Create() + { + ViewData["VendorId"] = new SelectList(_context.UsbVendors, "Id", "Id"); + + return View(); + } + + // POST: Admin/UsbProducts/Create + // 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 Create([Bind("Id,ProductId,Product,AddedWhen,ModifiedWhen,VendorId")] + UsbProduct usbProduct) + { + if(ModelState.IsValid) + { + _context.Add(usbProduct); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + ViewData["VendorId"] = new SelectList(_context.UsbVendors, "Id", "Id", usbProduct.VendorId); + + return View(usbProduct); + } + + // GET: Admin/UsbProducts/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + UsbProduct usbProduct = await _context.UsbProducts.FindAsync(id); + + if(usbProduct == null) + { + return NotFound(); + } + + ViewData["VendorId"] = new SelectList(_context.UsbVendors, "Id", "Id", usbProduct.VendorId); + + return View(usbProduct); + } + + // POST: Admin/UsbProducts/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,ProductId,Product,AddedWhen,ModifiedWhen,VendorId")] + UsbProduct usbProduct) + { + if(id != usbProduct.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(usbProduct); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!UsbProductExists(usbProduct.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + ViewData["VendorId"] = new SelectList(_context.UsbVendors, "Id", "Id", usbProduct.VendorId); + + return View(usbProduct); + } + + // GET: Admin/UsbProducts/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + UsbProduct usbProduct = + await _context.UsbProducts.Include(u => u.Vendor).FirstOrDefaultAsync(m => m.Id == id); + + if(usbProduct == null) + { + return NotFound(); + } + + return View(usbProduct); + } + + // POST: Admin/UsbProducts/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + UsbProduct usbProduct = await _context.UsbProducts.FindAsync(id); + _context.UsbProducts.Remove(usbProduct); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool UsbProductExists(int id) => _context.UsbProducts.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/UsbVendorsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/UsbVendorsController.cs new file mode 100644 index 00000000..2ec942e8 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/UsbVendorsController.cs @@ -0,0 +1,142 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class UsbVendorsController : Controller + { + readonly DicServerContext _context; + + public UsbVendorsController(DicServerContext context) => _context = context; + + // GET: Admin/UsbVendors + public async Task Index() => View(await _context.UsbVendors.ToListAsync()); + + // GET: Admin/UsbVendors/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + UsbVendor usbVendor = await _context.UsbVendors.FirstOrDefaultAsync(m => m.Id == id); + + if(usbVendor == null) + { + return NotFound(); + } + + return View(usbVendor); + } + + // GET: Admin/UsbVendors/Create + public IActionResult Create() => View(); + + // POST: Admin/UsbVendors/Create + // 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 Create([Bind("Id,VendorId,Vendor,AddedWhen,ModifiedWhen")] + UsbVendor usbVendor) + { + if(ModelState.IsValid) + { + _context.Add(usbVendor); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(usbVendor); + } + + // GET: Admin/UsbVendors/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + UsbVendor usbVendor = await _context.UsbVendors.FindAsync(id); + + if(usbVendor == null) + { + return NotFound(); + } + + return View(usbVendor); + } + + // POST: Admin/UsbVendors/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,VendorId,Vendor,AddedWhen,ModifiedWhen")] + UsbVendor usbVendor) + { + if(id != usbVendor.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(usbVendor); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!UsbVendorExists(usbVendor.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(usbVendor); + } + + // GET: Admin/UsbVendors/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + UsbVendor usbVendor = await _context.UsbVendors.FirstOrDefaultAsync(m => m.Id == id); + + if(usbVendor == null) + { + return NotFound(); + } + + return View(usbVendor); + } + + // POST: Admin/UsbVendors/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + UsbVendor usbVendor = await _context.UsbVendors.FindAsync(id); + _context.UsbVendors.Remove(usbVendor); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool UsbVendorExists(int id) => _context.UsbVendors.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Controllers/VersionsController.cs b/DiscImageChef.Server/Areas/Admin/Controllers/VersionsController.cs new file mode 100644 index 00000000..775a6dbf --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Controllers/VersionsController.cs @@ -0,0 +1,140 @@ +using System.Linq; +using System.Threading.Tasks; +using DiscImageChef.Server.Models; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace DiscImageChef.Server.Areas.Admin.Controllers +{ + [Area("Admin")] + public class VersionsController : Controller + { + readonly DicServerContext _context; + + public VersionsController(DicServerContext context) => _context = context; + + // GET: Admin/Versions + public async Task Index() => View(await _context.Versions.ToListAsync()); + + // GET: Admin/Versions/Details/5 + public async Task Details(int? id) + { + if(id == null) + { + return NotFound(); + } + + Version version = await _context.Versions.FirstOrDefaultAsync(m => m.Id == id); + + if(version == null) + { + return NotFound(); + } + + return View(version); + } + + // GET: Admin/Versions/Create + public IActionResult Create() => View(); + + // POST: Admin/Versions/Create + // 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 Create([Bind("Id,Value,Count")] Version version) + { + if(ModelState.IsValid) + { + _context.Add(version); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + return View(version); + } + + // GET: Admin/Versions/Edit/5 + public async Task Edit(int? id) + { + if(id == null) + { + return NotFound(); + } + + Version version = await _context.Versions.FindAsync(id); + + if(version == null) + { + return NotFound(); + } + + return View(version); + } + + // POST: Admin/Versions/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,Value,Count")] Version version) + { + if(id != version.Id) + { + return NotFound(); + } + + if(ModelState.IsValid) + { + try + { + _context.Update(version); + await _context.SaveChangesAsync(); + } + catch(DbUpdateConcurrencyException) + { + if(!VersionExists(version.Id)) + { + return NotFound(); + } + + throw; + } + + return RedirectToAction(nameof(Index)); + } + + return View(version); + } + + // GET: Admin/Versions/Delete/5 + public async Task Delete(int? id) + { + if(id == null) + { + return NotFound(); + } + + Version version = await _context.Versions.FirstOrDefaultAsync(m => m.Id == id); + + if(version == null) + { + return NotFound(); + } + + return View(version); + } + + // POST: Admin/Versions/Delete/5 + [HttpPost, ActionName("Delete"), ValidateAntiForgeryToken] + public async Task DeleteConfirmed(int id) + { + Version version = await _context.Versions.FindAsync(id); + _context.Versions.Remove(version); + await _context.SaveChangesAsync(); + + return RedirectToAction(nameof(Index)); + } + + bool VersionExists(int id) => _context.Versions.Any(e => e.Id == id); + } +} \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Commands/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Commands/Create.cshtml new file mode 100644 index 00000000..1bc1d0a9 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Commands/Create.cshtml @@ -0,0 +1,40 @@ +@model Command + +@{ + Layout = null; +} + + + + + + Create + + +

Command

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Commands/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Commands/Delete.cshtml new file mode 100644 index 00000000..9fa102d6 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Commands/Delete.cshtml @@ -0,0 +1,39 @@ +@model Command + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

Command

+
+
+
+ @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/Commands/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Commands/Details.cshtml new file mode 100644 index 00000000..3aea70cc --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Commands/Details.cshtml @@ -0,0 +1,37 @@ +@model Command + +@{ + Layout = null; +} + + + + + + Details + + +
+

Command

+
+
+
+ @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/Commands/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Commands/Edit.cshtml new file mode 100644 index 00000000..dde9328f --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Commands/Edit.cshtml @@ -0,0 +1,41 @@ +@model Command + +@{ + Layout = null; +} + + + + + + Edit + + +

Command

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Commands/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Commands/Index.cshtml new file mode 100644 index 00000000..3caee815 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Commands/Index.cshtml @@ -0,0 +1,49 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Name) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Create.cshtml new file mode 100644 index 00000000..c17c325d --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Create.cshtml @@ -0,0 +1,65 @@ +@model CompactDiscOffset + +@{ + Layout = null; +} + + + + + + Create + + +

CompactDiscOffset

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Delete.cshtml new file mode 100644 index 00000000..759aa30b --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Delete.cshtml @@ -0,0 +1,69 @@ +@model CompactDiscOffset + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

CompactDiscOffset

+
+
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Offset) +
+
+ @Html.DisplayFor(model => model.Offset) +
+
+ @Html.DisplayNameFor(model => model.Submissions) +
+
+ @Html.DisplayFor(model => model.Submissions) +
+
+ @Html.DisplayNameFor(model => model.Agreement) +
+
+ @Html.DisplayFor(model => model.Agreement) +
+
+
+ + | + Back to List +
+
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Details.cshtml new file mode 100644 index 00000000..a8265b1a --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Details.cshtml @@ -0,0 +1,67 @@ +@model CompactDiscOffset + +@{ + Layout = null; +} + + + + + + Details + + +
+

CompactDiscOffset

+
+
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Offset) +
+
+ @Html.DisplayFor(model => model.Offset) +
+
+ @Html.DisplayNameFor(model => model.Submissions) +
+
+ @Html.DisplayFor(model => model.Submissions) +
+
+ @Html.DisplayNameFor(model => model.Agreement) +
+
+ @Html.DisplayFor(model => model.Agreement) +
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Edit.cshtml new file mode 100644 index 00000000..c99cc222 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Edit.cshtml @@ -0,0 +1,66 @@ +@model CompactDiscOffset + +@{ + Layout = null; +} + + + + + + Edit + + +

CompactDiscOffset

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Index.cshtml new file mode 100644 index 00000000..1a3c4420 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/CompactDiscOffsets/Index.cshtml @@ -0,0 +1,79 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.AddedWhen) + + @Html.DisplayNameFor(model => model.ModifiedWhen) + + @Html.DisplayNameFor(model => model.Manufacturer) + + @Html.DisplayNameFor(model => model.Model) + + @Html.DisplayNameFor(model => model.Offset) + + @Html.DisplayNameFor(model => model.Submissions) + + @Html.DisplayNameFor(model => model.Agreement) +
+ @Html.DisplayFor(modelItem => item.AddedWhen) + + @Html.DisplayFor(modelItem => item.ModifiedWhen) + + @Html.DisplayFor(modelItem => item.Manufacturer) + + @Html.DisplayFor(modelItem => item.Model) + + @Html.DisplayFor(modelItem => item.Offset) + + @Html.DisplayFor(modelItem => item.Submissions) + + @Html.DisplayFor(modelItem => item.Agreement) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Create.cshtml new file mode 100644 index 00000000..1aac5a7c --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Create.cshtml @@ -0,0 +1,50 @@ +@model DeviceStat + +@{ + Layout = null; +} + + + + + + Create + + +

DeviceStat

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Delete.cshtml new file mode 100644 index 00000000..f3b52359 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Delete.cshtml @@ -0,0 +1,51 @@ +@model DeviceStat + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

DeviceStat

+
+
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Revision) +
+
+ @Html.DisplayFor(model => model.Revision) +
+
+ @Html.DisplayNameFor(model => model.Bus) +
+
+ @Html.DisplayFor(model => model.Bus) +
+
+
+ + | + Back to List +
+
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Details.cshtml new file mode 100644 index 00000000..c59f294d --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Details.cshtml @@ -0,0 +1,49 @@ +@model DeviceStat + +@{ + Layout = null; +} + + + + + + Details + + +
+

DeviceStat

+
+
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Revision) +
+
+ @Html.DisplayFor(model => model.Revision) +
+
+ @Html.DisplayNameFor(model => model.Bus) +
+
+ @Html.DisplayFor(model => model.Bus) +
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Edit.cshtml new file mode 100644 index 00000000..c9516fb1 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Edit.cshtml @@ -0,0 +1,51 @@ +@model DeviceStat + +@{ + Layout = null; +} + + + + + + Edit + + +

DeviceStat

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Index.cshtml new file mode 100644 index 00000000..d73d47ff --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/DeviceStats/Index.cshtml @@ -0,0 +1,61 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Manufacturer) + + @Html.DisplayNameFor(model => model.Model) + + @Html.DisplayNameFor(model => model.Revision) + + @Html.DisplayNameFor(model => model.Bus) +
+ @Html.DisplayFor(modelItem => item.Manufacturer) + + @Html.DisplayFor(modelItem => item.Model) + + @Html.DisplayFor(modelItem => item.Revision) + + @Html.DisplayFor(modelItem => item.Bus) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Devices/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Devices/Create.cshtml new file mode 100644 index 00000000..3eb19fb3 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Devices/Create.cshtml @@ -0,0 +1,70 @@ +@model Device + +@{ + Layout = null; +} + + + + + + Create + + +

Device

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Devices/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Devices/Delete.cshtml new file mode 100644 index 00000000..f5025a19 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Devices/Delete.cshtml @@ -0,0 +1,75 @@ +@model Device + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

Device

+
+
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead) +
+
+ @Html.DisplayFor(model => model.OptimalMultipleSectorsRead) +
+
+ @Html.DisplayNameFor(model => model.CompactFlash) +
+
+ @Html.DisplayFor(model => model.CompactFlash) +
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Revision) +
+
+ @Html.DisplayFor(model => model.Revision) +
+
+ @Html.DisplayNameFor(model => model.Type) +
+
+ @Html.DisplayFor(model => model.Type) +
+
+
+ + | + Back to List +
+
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Devices/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Devices/Details.cshtml new file mode 100644 index 00000000..cc159553 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Devices/Details.cshtml @@ -0,0 +1,73 @@ +@model Device + +@{ + Layout = null; +} + + + + + + Details + + +
+

Device

+
+
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead) +
+
+ @Html.DisplayFor(model => model.OptimalMultipleSectorsRead) +
+
+ @Html.DisplayNameFor(model => model.CompactFlash) +
+
+ @Html.DisplayFor(model => model.CompactFlash) +
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Revision) +
+
+ @Html.DisplayFor(model => model.Revision) +
+
+ @Html.DisplayNameFor(model => model.Type) +
+
+ @Html.DisplayFor(model => model.Type) +
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Devices/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Devices/Edit.cshtml new file mode 100644 index 00000000..7ecb0f07 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Devices/Edit.cshtml @@ -0,0 +1,71 @@ +@model Device + +@{ + Layout = null; +} + + + + + + Edit + + +

Device

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+ +
+ +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Devices/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Devices/Index.cshtml new file mode 100644 index 00000000..a305003b --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Devices/Index.cshtml @@ -0,0 +1,85 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.AddedWhen) + + @Html.DisplayNameFor(model => model.ModifiedWhen) + + @Html.DisplayNameFor(model => model.OptimalMultipleSectorsRead) + + @Html.DisplayNameFor(model => model.CompactFlash) + + @Html.DisplayNameFor(model => model.Manufacturer) + + @Html.DisplayNameFor(model => model.Model) + + @Html.DisplayNameFor(model => model.Revision) + + @Html.DisplayNameFor(model => model.Type) +
+ @Html.DisplayFor(modelItem => item.AddedWhen) + + @Html.DisplayFor(modelItem => item.ModifiedWhen) + + @Html.DisplayFor(modelItem => item.OptimalMultipleSectorsRead) + + @Html.DisplayFor(modelItem => item.CompactFlash) + + @Html.DisplayFor(modelItem => item.Manufacturer) + + @Html.DisplayFor(modelItem => item.Model) + + @Html.DisplayFor(modelItem => item.Revision) + + @Html.DisplayFor(modelItem => item.Type) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Create.cshtml new file mode 100644 index 00000000..df0b4e86 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Create.cshtml @@ -0,0 +1,40 @@ +@model Filesystem + +@{ + Layout = null; +} + + + + + + Create + + +

Filesystem

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Delete.cshtml new file mode 100644 index 00000000..9580fabd --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Delete.cshtml @@ -0,0 +1,39 @@ +@model Filesystem + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

Filesystem

+
+
+
+ @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/Filesystems/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Details.cshtml new file mode 100644 index 00000000..fdeabd92 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Details.cshtml @@ -0,0 +1,37 @@ +@model Filesystem + +@{ + Layout = null; +} + + + + + + Details + + +
+

Filesystem

+
+
+
+ @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/Filesystems/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Edit.cshtml new file mode 100644 index 00000000..732f965c --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Edit.cshtml @@ -0,0 +1,41 @@ +@model Filesystem + +@{ + Layout = null; +} + + + + + + Edit + + +

Filesystem

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Index.cshtml new file mode 100644 index 00000000..b2852bad --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filesystems/Index.cshtml @@ -0,0 +1,49 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Name) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Filters/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filters/Create.cshtml new file mode 100644 index 00000000..c1a4a685 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filters/Create.cshtml @@ -0,0 +1,40 @@ +@model Filter + +@{ + Layout = null; +} + + + + + + Create + + +

Filter

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Filters/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filters/Delete.cshtml new file mode 100644 index 00000000..c0e3b4b4 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filters/Delete.cshtml @@ -0,0 +1,39 @@ +@model Filter + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

Filter

+
+
+
+ @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/Filters/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filters/Details.cshtml new file mode 100644 index 00000000..830dce92 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filters/Details.cshtml @@ -0,0 +1,37 @@ +@model Filter + +@{ + Layout = null; +} + + + + + + Details + + +
+

Filter

+
+
+
+ @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/Filters/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filters/Edit.cshtml new file mode 100644 index 00000000..eeb6df60 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filters/Edit.cshtml @@ -0,0 +1,41 @@ +@model Filter + +@{ + Layout = null; +} + + + + + + Edit + + +

Filter

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Filters/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Filters/Index.cshtml new file mode 100644 index 00000000..4d9acf1c --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Filters/Index.cshtml @@ -0,0 +1,49 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Name) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Create.cshtml new file mode 100644 index 00000000..8329abd3 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Create.cshtml @@ -0,0 +1,40 @@ +@model MediaFormat + +@{ + Layout = null; +} + + + + + + Create + + +

MediaFormat

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Delete.cshtml new file mode 100644 index 00000000..06afad62 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Delete.cshtml @@ -0,0 +1,39 @@ +@model MediaFormat + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

MediaFormat

+
+
+
+ @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/MediaFormats/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Details.cshtml new file mode 100644 index 00000000..2defa63f --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Details.cshtml @@ -0,0 +1,37 @@ +@model MediaFormat + +@{ + Layout = null; +} + + + + + + Details + + +
+

MediaFormat

+
+
+
+ @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/MediaFormats/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Edit.cshtml new file mode 100644 index 00000000..77ee34a3 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Edit.cshtml @@ -0,0 +1,41 @@ +@model MediaFormat + +@{ + Layout = null; +} + + + + + + Edit + + +

MediaFormat

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Index.cshtml new file mode 100644 index 00000000..1fad7142 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/MediaFormats/Index.cshtml @@ -0,0 +1,49 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Name) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Medias/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Medias/Create.cshtml new file mode 100644 index 00000000..a1bd677e --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Medias/Create.cshtml @@ -0,0 +1,45 @@ +@model Media + +@{ + Layout = null; +} + + + + + + Create + + +

Media

+
+
+
+
+
+
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Medias/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Medias/Delete.cshtml new file mode 100644 index 00000000..bd8c4b80 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Medias/Delete.cshtml @@ -0,0 +1,45 @@ +@model Media + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

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) +
+
+
+ + | + Back to List +
+
+ + \ 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 new file mode 100644 index 00000000..f1efbe76 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Medias/Details.cshtml @@ -0,0 +1,43 @@ +@model Media + +@{ + Layout = null; +} + + + + + + Details + + +
+

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 new file mode 100644 index 00000000..bd36f481 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Medias/Edit.cshtml @@ -0,0 +1,46 @@ +@model Media + +@{ + Layout = null; +} + + + + + + Edit + + +

Media

+
+
+
+
+
+ +
+ + + +
+
+ +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Medias/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Medias/Index.cshtml new file mode 100644 index 00000000..2f2fc7f3 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Medias/Index.cshtml @@ -0,0 +1,55 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Type) + + @Html.DisplayNameFor(model => model.Real) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Type) + + @Html.DisplayFor(modelItem => item.Real) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Create.cshtml new file mode 100644 index 00000000..5e1aca5d --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Create.cshtml @@ -0,0 +1,45 @@ +@model DiscImageChef.Server.Models.OperatingSystem + +@{ + Layout = null; +} + + + + + + Create + + +

OperatingSystem

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Delete.cshtml new file mode 100644 index 00000000..b49c198e --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Delete.cshtml @@ -0,0 +1,45 @@ +@model DiscImageChef.Server.Models.OperatingSystem + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

OperatingSystem

+
+
+
+ @Html.DisplayNameFor(model => model.Name) +
+
+ @Html.DisplayFor(model => model.Name) +
+
+ @Html.DisplayNameFor(model => model.Version) +
+
+ @Html.DisplayFor(model => model.Version) +
+
+ @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/OperatingSystems/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Details.cshtml new file mode 100644 index 00000000..eb45fe6b --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Details.cshtml @@ -0,0 +1,43 @@ +@model DiscImageChef.Server.Models.OperatingSystem + +@{ + Layout = null; +} + + + + + + Details + + +
+

OperatingSystem

+
+
+
+ @Html.DisplayNameFor(model => model.Name) +
+
+ @Html.DisplayFor(model => model.Name) +
+
+ @Html.DisplayNameFor(model => model.Version) +
+
+ @Html.DisplayFor(model => model.Version) +
+
+ @Html.DisplayNameFor(model => model.Count) +
+
+ @Html.DisplayFor(model => model.Count) +
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Edit.cshtml new file mode 100644 index 00000000..a613ca9b --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Edit.cshtml @@ -0,0 +1,46 @@ +@model DiscImageChef.Server.Models.OperatingSystem + +@{ + Layout = null; +} + + + + + + Edit + + +

OperatingSystem

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Index.cshtml new file mode 100644 index 00000000..6b0e6b38 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/OperatingSystems/Index.cshtml @@ -0,0 +1,55 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Name) + + @Html.DisplayNameFor(model => model.Version) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.Version) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Partitions/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Create.cshtml new file mode 100644 index 00000000..b92f48a3 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Create.cshtml @@ -0,0 +1,40 @@ +@model Partition + +@{ + Layout = null; +} + + + + + + Create + + +

Partition

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ 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 new file mode 100644 index 00000000..4104e055 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Delete.cshtml @@ -0,0 +1,39 @@ +@model Partition + +@{ + Layout = null; +} + + + + + + Delete + + +

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 new file mode 100644 index 00000000..67aa0587 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Details.cshtml @@ -0,0 +1,37 @@ +@model Partition + +@{ + Layout = null; +} + + + + + + Details + + +
+

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 new file mode 100644 index 00000000..0233df4d --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Edit.cshtml @@ -0,0 +1,41 @@ +@model Partition + +@{ + Layout = null; +} + + + + + + Edit + + +

Partition

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ 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 new file mode 100644 index 00000000..f9ef3f90 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Partitions/Index.cshtml @@ -0,0 +1,49 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Name) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Name) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Reports/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Reports/Create.cshtml new file mode 100644 index 00000000..80b3a6da --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Reports/Create.cshtml @@ -0,0 +1,51 @@ +@model UploadedReport + +@{ + ViewData["Title"] = "Create"; +} +

Create

+

UploadedReport

+
+
+
+
+
+
+ + + +
+
+ +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Reports/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Reports/Delete.cshtml new file mode 100644 index 00000000..5a8fe684 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Reports/Delete.cshtml @@ -0,0 +1,54 @@ +@model UploadedReport + +@{ + ViewData["Title"] = "Delete"; +} +

Delete

+

Are you sure you want to delete this?

+
+

UploadedReport

+
+
+
+ @Html.DisplayNameFor(model => model.UploadedWhen) +
+
+ @Html.DisplayFor(model => model.UploadedWhen) +
+
+ @Html.DisplayNameFor(model => model.CompactFlash) +
+
+ @Html.DisplayFor(model => model.CompactFlash) +
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Revision) +
+
+ @Html.DisplayFor(model => model.Revision) +
+
+ @Html.DisplayNameFor(model => model.Type) +
+
+ @Html.DisplayFor(model => model.Type) +
+
+
+ + | + Back to List +
+
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Reports/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Reports/Details.cshtml new file mode 100644 index 00000000..e5fe6078 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Reports/Details.cshtml @@ -0,0 +1,52 @@ +@model UploadedReport + +@{ + ViewData["Title"] = "Details"; +} +

Details

+
+

UploadedReport

+
+
+
+ @Html.DisplayNameFor(model => model.UploadedWhen) +
+
+ @Html.DisplayFor(model => model.UploadedWhen) +
+
+ @Html.DisplayNameFor(model => model.CompactFlash) +
+
+ @Html.DisplayFor(model => model.CompactFlash) +
+
+ @Html.DisplayNameFor(model => model.Manufacturer) +
+
+ @Html.DisplayFor(model => model.Manufacturer) +
+
+ @Html.DisplayNameFor(model => model.Model) +
+
+ @Html.DisplayFor(model => model.Model) +
+
+ @Html.DisplayNameFor(model => model.Revision) +
+
+ @Html.DisplayFor(model => model.Revision) +
+
+ @Html.DisplayNameFor(model => model.Type) +
+
+ @Html.DisplayFor(model => model.Type) +
+
+
+ \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Reports/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Reports/Edit.cshtml new file mode 100644 index 00000000..c161c8a6 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Reports/Edit.cshtml @@ -0,0 +1,52 @@ +@model UploadedReport + +@{ + ViewData["Title"] = "Edit"; +} +

Edit

+

UploadedReport

+
+
+
+
+
+
+ + + +
+ +
+ +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Reports/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Reports/Index.cshtml new file mode 100644 index 00000000..69f082fb --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Reports/Index.cshtml @@ -0,0 +1,64 @@ +@model IEnumerable + +@{ + ViewData["Title"] = "Index"; +} +

Index

+

+ Create New +

+ + + + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.UploadedWhen) + + @Html.DisplayNameFor(model => model.CompactFlash) + + @Html.DisplayNameFor(model => model.Manufacturer) + + @Html.DisplayNameFor(model => model.Model) + + @Html.DisplayNameFor(model => model.Revision) + + @Html.DisplayNameFor(model => model.Type) +
+ @Html.DisplayFor(modelItem => item.UploadedWhen) + + @Html.DisplayFor(modelItem => item.CompactFlash) + + @Html.DisplayFor(modelItem => item.Manufacturer) + + @Html.DisplayFor(modelItem => item.Model) + + @Html.DisplayFor(modelItem => item.Revision) + + @Html.DisplayFor(modelItem => item.Type) + + Edit | + Details | + Delete +
\ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Create.cshtml new file mode 100644 index 00000000..2cdb4243 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Create.cshtml @@ -0,0 +1,54 @@ +@model UsbProduct + +@{ + Layout = null; +} + + + + + + Create + + +

UsbProduct

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Delete.cshtml new file mode 100644 index 00000000..5a13bcb4 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Delete.cshtml @@ -0,0 +1,57 @@ +@model UsbProduct + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

UsbProduct

+
+
+
+ @Html.DisplayNameFor(model => model.ProductId) +
+
+ @Html.DisplayFor(model => model.ProductId) +
+
+ @Html.DisplayNameFor(model => model.Product) +
+
+ @Html.DisplayFor(model => model.Product) +
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayNameFor(model => model.Vendor) +
+
+ @Html.DisplayFor(model => model.Vendor.Id) +
+
+
+ + | + Back to List +
+
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Details.cshtml new file mode 100644 index 00000000..05b49474 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Details.cshtml @@ -0,0 +1,55 @@ +@model UsbProduct + +@{ + Layout = null; +} + + + + + + Details + + +
+

UsbProduct

+
+
+
+ @Html.DisplayNameFor(model => model.ProductId) +
+
+ @Html.DisplayFor(model => model.ProductId) +
+
+ @Html.DisplayNameFor(model => model.Product) +
+
+ @Html.DisplayFor(model => model.Product) +
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayNameFor(model => model.Vendor) +
+
+ @Html.DisplayFor(model => model.Vendor.Id) +
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Edit.cshtml new file mode 100644 index 00000000..914bbd20 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Edit.cshtml @@ -0,0 +1,56 @@ +@model UsbProduct + +@{ + Layout = null; +} + + + + + + Edit + + +

UsbProduct

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Index.cshtml new file mode 100644 index 00000000..23e9cbea --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbProducts/Index.cshtml @@ -0,0 +1,67 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.ProductId) + + @Html.DisplayNameFor(model => model.Product) + + @Html.DisplayNameFor(model => model.AddedWhen) + + @Html.DisplayNameFor(model => model.ModifiedWhen) + + @Html.DisplayNameFor(model => model.Vendor) +
+ @Html.DisplayFor(modelItem => item.ProductId) + + @Html.DisplayFor(modelItem => item.Product) + + @Html.DisplayFor(modelItem => item.AddedWhen) + + @Html.DisplayFor(modelItem => item.ModifiedWhen) + + @Html.DisplayFor(modelItem => item.Vendor.Id) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Create.cshtml new file mode 100644 index 00000000..a79cd91f --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Create.cshtml @@ -0,0 +1,50 @@ +@model UsbVendor + +@{ + Layout = null; +} + + + + + + Create + + +

UsbVendor

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Delete.cshtml new file mode 100644 index 00000000..c897a485 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Delete.cshtml @@ -0,0 +1,51 @@ +@model UsbVendor + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

UsbVendor

+
+
+
+ @Html.DisplayNameFor(model => model.VendorId) +
+
+ @Html.DisplayFor(model => model.VendorId) +
+
+ @Html.DisplayNameFor(model => model.Vendor) +
+
+ @Html.DisplayFor(model => model.Vendor) +
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+
+ + | + Back to List +
+
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Details.cshtml new file mode 100644 index 00000000..b3e781b0 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Details.cshtml @@ -0,0 +1,49 @@ +@model UsbVendor + +@{ + Layout = null; +} + + + + + + Details + + +
+

UsbVendor

+
+
+
+ @Html.DisplayNameFor(model => model.VendorId) +
+
+ @Html.DisplayFor(model => model.VendorId) +
+
+ @Html.DisplayNameFor(model => model.Vendor) +
+
+ @Html.DisplayFor(model => model.Vendor) +
+
+ @Html.DisplayNameFor(model => model.AddedWhen) +
+
+ @Html.DisplayFor(model => model.AddedWhen) +
+
+ @Html.DisplayNameFor(model => model.ModifiedWhen) +
+
+ @Html.DisplayFor(model => model.ModifiedWhen) +
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Edit.cshtml new file mode 100644 index 00000000..547e31bd --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Edit.cshtml @@ -0,0 +1,51 @@ +@model UsbVendor + +@{ + Layout = null; +} + + + + + + Edit + + +

UsbVendor

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Index.cshtml new file mode 100644 index 00000000..0daa2c30 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/UsbVendors/Index.cshtml @@ -0,0 +1,61 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + + + @foreach (var item in Model) + { + + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.VendorId) + + @Html.DisplayNameFor(model => model.Vendor) + + @Html.DisplayNameFor(model => model.AddedWhen) + + @Html.DisplayNameFor(model => model.ModifiedWhen) +
+ @Html.DisplayFor(modelItem => item.VendorId) + + @Html.DisplayFor(modelItem => item.Vendor) + + @Html.DisplayFor(modelItem => item.AddedWhen) + + @Html.DisplayFor(modelItem => item.ModifiedWhen) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Versions/Create.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Versions/Create.cshtml new file mode 100644 index 00000000..2aea80cf --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Versions/Create.cshtml @@ -0,0 +1,40 @@ +@model DiscImageChef.Server.Models.Version + +@{ + Layout = null; +} + + + + + + Create + + +

Version

+
+
+
+
+
+
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Versions/Delete.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Versions/Delete.cshtml new file mode 100644 index 00000000..e06e4dbc --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Versions/Delete.cshtml @@ -0,0 +1,39 @@ +@model DiscImageChef.Server.Models.Version + +@{ + Layout = null; +} + + + + + + Delete + + +

Are you sure you want to delete this?

+
+

Version

+
+
+
+ @Html.DisplayNameFor(model => model.Value) +
+
+ @Html.DisplayFor(model => model.Value) +
+
+ @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/Versions/Details.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Versions/Details.cshtml new file mode 100644 index 00000000..ae9d7639 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Versions/Details.cshtml @@ -0,0 +1,37 @@ +@model DiscImageChef.Server.Models.Version + +@{ + Layout = null; +} + + + + + + Details + + +
+

Version

+
+
+
+ @Html.DisplayNameFor(model => model.Value) +
+
+ @Html.DisplayFor(model => model.Value) +
+
+ @Html.DisplayNameFor(model => model.Count) +
+
+ @Html.DisplayFor(model => model.Count) +
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Versions/Edit.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Versions/Edit.cshtml new file mode 100644 index 00000000..ab4dbd37 --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Versions/Edit.cshtml @@ -0,0 +1,41 @@ +@model DiscImageChef.Server.Models.Version + +@{ + Layout = null; +} + + + + + + Edit + + +

Version

+
+
+
+
+
+ +
+ + + +
+
+ + + +
+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/DiscImageChef.Server/Areas/Admin/Views/Versions/Index.cshtml b/DiscImageChef.Server/Areas/Admin/Views/Versions/Index.cshtml new file mode 100644 index 00000000..37c80d0e --- /dev/null +++ b/DiscImageChef.Server/Areas/Admin/Views/Versions/Index.cshtml @@ -0,0 +1,49 @@ +@model IEnumerable + +@{ + Layout = null; +} + + + + + + Index + + +

+ Create New +

+ + + + + + + + + + @foreach (var item in Model) + { + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Value) + + @Html.DisplayNameFor(model => model.Count) +
+ @Html.DisplayFor(modelItem => item.Value) + + @Html.DisplayFor(modelItem => item.Count) + + Edit | + Details | + Delete +
+ + \ No newline at end of file diff --git a/DiscImageChef.Server/DiscImageChef.Server.csproj b/DiscImageChef.Server/DiscImageChef.Server.csproj index 63017579..77f43df2 100644 --- a/DiscImageChef.Server/DiscImageChef.Server.csproj +++ b/DiscImageChef.Server/DiscImageChef.Server.csproj @@ -91,6 +91,11 @@ <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_Layout.cshtml" /> <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_LoginPartial.cshtml" /> <_ContentIncludedByDefault Remove="Areas\Admin\Shared\_ValidationScriptsPartial.cshtml" /> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Create.cshtml" /> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Delete.cshtml" /> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Details.cshtml" /> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Edit.cshtml" /> + <_ContentIncludedByDefault Remove="Areas\Admin\Views\Device\Index.cshtml" />