@using HeuristicLab.Clients.Hive.WebJobManager.ViewModels.User; @using HeuristicLab.Clients.Access; @model UserViewModel
@Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User", Model.User)) @Html.Partial("_ErrorMessage", Model.message)
@foreach (var group in Model.ugroups.OrderBy(x => x.Name)) { @group.Name }
@if (Model.SelectedGroup != null) {

@if (Model.SelectedGroup.Id != Guid.Empty) { @Model.SelectedGroup.Name } else { @("Add new group") }

@if (Model.SelectedGroup.Id != Guid.Empty) {
@foreach (var member in Model.SelectedGroupMembers) {

@if (member is User) { var umember = (User)member; @(umember.UserName + "(" + umember.FullName + ")") } else if (member is UserGroup) { var gmember = (UserGroup)member; @(gmember.Name) }

} @if (Model.SelectedGroupMembers.Count == 0) {

This group currently has no members

}
}

Users

@foreach (var user in Model.users) {
}

Groups

@foreach (var group in Model.ugroups) {
}
@if (Model.SelectedGroup.Id == Guid.Empty) {//New goup
} else {//Changing an existing group
}
}