84 lines
2.4 KiB
Plaintext
84 lines
2.4 KiB
Plaintext
@model IList<EnVisage.Team>
|
|
|
|
@{
|
|
ViewBag.Title = "Resources by teams";
|
|
}
|
|
|
|
<script type="text/javascript">
|
|
init.push(function () {
|
|
var tbl = $('.table').dataTable({
|
|
"bPaginate": true,
|
|
"bSort": true,
|
|
"bFilter": false,
|
|
"bInfo": true,
|
|
"sScrollY": "",
|
|
"sScrollX": "",
|
|
"bScrollCollapse": true
|
|
});
|
|
});
|
|
|
|
function showHideWidgetContent(id) {
|
|
if ($(id).children('div').children('span').children('i.icon.fa').hasClass('fa-caret-down')) {
|
|
$(id).children('div').children('span').children('i.icon.fa').removeClass('fa-caret-down');
|
|
$(id).children('div').children('span').children('i.icon.fa').addClass('fa-caret-right');
|
|
|
|
$(id).children('div.panel-body').fadeOut();
|
|
} else {
|
|
$(id).children('div').children('span').children('i.icon.fa').removeClass('fa-caret-right');
|
|
$(id).children('div').children('span').children('i.icon.fa').addClass('fa-caret-down');
|
|
|
|
$(id).children('div.panel-body').fadeIn();
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="page-header"><h1>@ViewBag.Title</h1></div>
|
|
|
|
<a class="btn btn-primary" style="margin-bottom: 10px;" href='@Url.Action("Edit", "Resource", new { resourceId = Guid.Empty })'>Add Resource</a>
|
|
|
|
@foreach (var team in Model)
|
|
{
|
|
<div class="panel widget-messages-alt" id="skills">
|
|
<div class="panel-heading" onclick="showHideWidgetContent($(this).parent())">
|
|
<span class="panel-title ui-expander">
|
|
<i class="icon fa fa-caret-right"></i>
|
|
<i class="panel-title-icon fa fa-laptop"></i>
|
|
@team.Name
|
|
</span>
|
|
</div>
|
|
<div class="panel-body padding-sm" style="display: none">
|
|
<div class="messages-list">
|
|
@if(team.Resources.Any())
|
|
{
|
|
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered"
|
|
id="resourceTbl_@team.Id">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Active Employee</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var resource in team.Resources)
|
|
{
|
|
<tr>
|
|
<td>@(resource.FirstName + " " + resource.LastName)</td>
|
|
<td>@(resource.IsActiveEmployee ? "Active" : "Inactive")</td>
|
|
<td><a href="@Url.Action("Details", "Resource", new { resourceId = resource.Id })" class="btn btn-default">Details</a></td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
<tfoot>
|
|
|
|
</tfoot>
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<span>No resources in the team.</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
} |