Skip to content

Commit

Permalink
Update SearchResults.cshtml
Browse files Browse the repository at this point in the history
  • Loading branch information
MattReda11 committed Feb 13, 2023
1 parent 3205016 commit 7a73d05
Showing 1 changed file with 49 additions and 48 deletions.
97 changes: 49 additions & 48 deletions Views/Connections/SearchResults.cshtml
Original file line number Diff line number Diff line change
@@ -1,56 +1,57 @@
@model IEnumerable<LinkedInClone.Models.ApplicationUser>

@{
@{
ViewData["Title"] = "Friend Search Results";
}
<div class="main-container">
<partial name="_LeftSideBarForUser" />
}
<div class="main-container">
<partial name="_LeftSideBarForUser" />

<div class="main-center">
<div class="main-center">

<h1 class="u-flex u-justify-center mb-4">@ViewData["Title"]</h1>
<h1 class="u-flex u-justify-center mb-4">@ViewData["Title"]</h1>

<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.FullName)
</th>
<th>
@Html.DisplayNameFor(model => model.Email)
</th>
<th>
Member Since
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
<table class="table">
<thead>
<tr>
<th>
Full Name
</th>
<th>
@Html.DisplayNameFor(model => model.Email)
</th>
<th>
Member Since
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
@if (User.Identity.Name != item.Email)
{
@if (User.Identity.Name != item.Email){
<tr>
@* <td>
@Html.DisplayFor(modelItem => item.AccountOwner.Id)
</td> *@
<td>
@Html.DisplayFor(modelItem => item.FullName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>
<td>
@Html.DisplayFor(modelItem => item.CreatedDate)
</td>
<td>
<a asp-controller="Connections" asp-action="AddConnection" asp-route-id="@item.Id">Add
friend</a>
</td>
</tr>
<tr>
@* <td>
@Html.DisplayFor(modelItem => item.AccountOwner.Id)
</td> *@
<td>
@Html.DisplayFor(modelItem => item.FullName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Email)
</td>
<td>
@Html.DisplayFor(modelItem => item.CreatedDate)
</td>
<td>
<a asp-controller="Connections" asp-action="AddConnection" asp-route-id="@item.Id">Add
friend</a>
</td>
</tr>
}
}
</tbody>
</table>
</div>
<!-- <partial name="_RightSideBarForUser" /> -->
</div>
}
</tbody>
</table>
</div>
<!-- <partial name="_RightSideBarForUser" /> -->
</div>

0 comments on commit 7a73d05

Please sign in to comment.