72 lines
3.7 KiB
Plaintext
72 lines
3.7 KiB
Plaintext
@using EnVisage.Code.HtmlHelpers
|
|
@using EnVisage.Code
|
|
@using Microsoft.AspNet.Identity
|
|
@model EnVisage.Models.ViewBoardModel
|
|
<div class="messages-list" style="overflow-x:auto;">
|
|
@if ((Model.Teams != null) && Model.Teams.Any())
|
|
{
|
|
<table cellpadding='0' cellspacing='0' border='0' class='table table-striped resourceTable'
|
|
id="resourceTbl_viewRes">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Active Employee</th>
|
|
<th>Start Date</th>
|
|
<th>End Date</th>
|
|
<th>Expenditure Category</th> @* SA. ENV-756 *@
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
|
|
@foreach (var team in Model.Teams.OrderBy(x => x.Name))
|
|
{
|
|
<text>
|
|
@*<tr><td><strong>@Html.Raw(team.Name)</strong></td></tr>*@
|
|
<tr>
|
|
<td colspan="5"><strong>@Html.Raw(team.Name)</strong></td>
|
|
<td style="display:none;"></td>
|
|
<td style="display:none;"></td>
|
|
<td style="display:none;"></td>
|
|
<td style="display:none;"></td>
|
|
</tr>
|
|
</text>
|
|
if ((team.PeopleResources != null) && team.PeopleResources.Any())
|
|
{
|
|
foreach (var resource in team.PeopleResources.OrderBy(y => y.LastName))
|
|
{
|
|
<tr>
|
|
<td><a href="@Url.Action("Details", "PeopleResource", new { resourceId = resource.Id, viewId = Model.Id})">@(resource.FirstName + " " + resource.LastName)</a></td>
|
|
<td>@(resource.IsActiveEmployee ? "Active" : "Inactive")</td>
|
|
<td>@resource.StartDate.ToShortDateString()</td>
|
|
<td>@(!resource.PermanentResource && resource.EndDate.HasValue ? resource.EndDate.Value.ToShortDateString() : "")</td>
|
|
@if (resource.ExpenditureCategory == null)
|
|
{ @* SA. ENV-756 *@
|
|
|
|
<td>No expenditure</td>
|
|
}
|
|
else
|
|
{
|
|
<td>@resource.ExpenditureCategory.GetView().ExpCategoryWithCcName</td> @* SA. ENV-756. ENV-839 *@
|
|
}
|
|
</tr>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
@Html.Raw("<!--tr><td colspan=\"5\">No resources in the team.</td></tr-->")
|
|
}
|
|
}
|
|
</tbody>
|
|
<tfoot>
|
|
|
|
</tfoot>
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<span>No teams in the view.</span>
|
|
}
|
|
</div>
|