Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a comma separator between multiple GameGroups in the Search #2024

Merged
merged 2 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TASVideos/Pages/Search/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<td>
@foreach (var group in result.Groups)
{
<a asp-page="/GameGroups/Index" asp-route-id="@group.Id">@group.Name</a>
<span><a asp-page="/GameGroups/Index" asp-route-id="@group.Id">@group.Name</a><span condition="group != result.Groups.Last()">, </span></span>
}
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions TASVideos/Pages/Search/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public async Task<IActionResult> OnGet()
g.Id,
g.DisplayName,
g.GameVersions.Select(v => v.System!.Code),
g.GameGroups.Select(gg => new GameGroupEntry(gg.GameGroupId, gg.GameGroup!.Name))))
g.GameGroups.Select(gg => new GameGroupEntry(gg.GameGroupId, gg.GameGroup!.Name)).ToList()))
.ToListAsync();

PublicationResults = await db.Publications
Expand All @@ -91,7 +91,7 @@ public async Task<IActionResult> OnGet()

public record PageSearch(string Highlight, string PageName);
public record PostSearch(string Highlight, string TopicName, int PostId);
public record GameSearch(int Id, string DisplayName, IEnumerable<string> Systems, IEnumerable<GameGroupEntry> Groups);
public record GameSearch(int Id, string DisplayName, IEnumerable<string> Systems, List<GameGroupEntry> Groups);
public record GameGroupEntry(int Id, string Name);
public record PublicationSearch(int Id, string Title, bool IsObsolete);
}
Loading