mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Implement index admin page for resolutions by screen.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
"Id", "Name");
|
||||
ViewData["ScreenId"] =
|
||||
new
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} at {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} with {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
"Id", "Name");
|
||||
return View();
|
||||
}
|
||||
@@ -75,7 +75,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
"Id", "Name", resolutionsByScreen.ResolutionId);
|
||||
ViewData["ScreenId"] =
|
||||
new
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} at {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} with {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
"Id", "Name", resolutionsByScreen.ScreenId);
|
||||
return View(resolutionsByScreen);
|
||||
}
|
||||
@@ -93,7 +93,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
"Id", "Name", resolutionsByScreen.ResolutionId);
|
||||
ViewData["ScreenId"] =
|
||||
new
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} at {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} with {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
"Id", "Name", resolutionsByScreen.ScreenId);
|
||||
return View(resolutionsByScreen);
|
||||
}
|
||||
@@ -130,7 +130,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
||||
"Id", "Name", resolutionsByScreen.ResolutionId);
|
||||
ViewData["ScreenId"] =
|
||||
new
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} at {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
SelectList(_context.Screens.Select(s => new {s.Id, Name = s.NativeResolution != null ? $"{s.Diagonal}\" {s.Type} with {s.NativeResolution}" : $"{s.Diagonal}\" {s.Type}"}).OrderBy(s => s.Name),
|
||||
"Id", "Name", resolutionsByScreen.ScreenId);
|
||||
return View(resolutionsByScreen);
|
||||
}
|
||||
|
||||
@@ -30,10 +30,12 @@
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Screen.Type)
|
||||
@if(item.Screen.NativeResolution != null) { @($"{item.Screen.Diagonal}\" {item.Screen.Type} with {item.Screen.NativeResolution}") }
|
||||
else
|
||||
{ @($"{item.Screen.Diagonal}\" {item.Screen.Type}") }
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Resolution.Id)
|
||||
@item.Resolution.ToString()
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Details"
|
||||
|
||||
Reference in New Issue
Block a user