609 lines
21 KiB
Plaintext
609 lines
21 KiB
Plaintext
@model EnVisage.AspNetUser
|
|
@using EnVisage.Code.HtmlHelpers
|
|
|
|
@{
|
|
ViewBag.Title = (!string.IsNullOrEmpty( Model.Id)) ? "Edit " + Model.UserName : "Add New User";
|
|
}
|
|
|
|
@section Scripts
|
|
{
|
|
<link rel="stylesheet" href="~/Content/stylesheets/jquery.treegrid.css">
|
|
<script type="text/javascript">
|
|
emulateNavUrl = "/User";
|
|
|
|
init.push(function() {
|
|
@if (!string.IsNullOrEmpty(Model.Id))
|
|
{
|
|
<text>
|
|
StartEdit('User', '@Model.Id', "#btnDelete", "#btnsave", "erorMsgPlaceholder");
|
|
</text>
|
|
}
|
|
|
|
getProjectTree();
|
|
|
|
$("input[name='areasread']").click(function () {
|
|
$(this).removeAttr("inherited");
|
|
});
|
|
|
|
$("input[name='areaswrite']").click(function () {
|
|
$(this).removeAttr("inherited");
|
|
var val = $(this).val();
|
|
var read = $("input[value='" + val + "'][name='areasread']");
|
|
if (read.length > 0 && this.checked)
|
|
read.removeAttr("inherited");
|
|
read.prop("checked", true);
|
|
});
|
|
|
|
$("input[name='roleitems']").click(function() {
|
|
var optionTexts = [];
|
|
$("input[name='roleitems']").each(function() {
|
|
if (this.checked)
|
|
optionTexts.push($(this).val());
|
|
});
|
|
var siteRoot = location.protocol + '//' + location.host;
|
|
$.ajax({
|
|
type: "post",
|
|
url: siteRoot + "/User/GetRolePermissions",
|
|
datatype: "json",
|
|
traditional: true,
|
|
data: { "roleId": optionTexts },
|
|
async: false,
|
|
error: function(returnval) {
|
|
console.writeln(returnval);
|
|
},
|
|
success: function(returnval) {
|
|
var arr = $.parseJSON(returnval);
|
|
|
|
$.each($("input[name='areasread']"), function(i, o) {
|
|
updatePermissionFormRole($(o), arr[0], 1, false);
|
|
});
|
|
|
|
$.each($("[name='areaswrite']"), function(i, o) {
|
|
updatePermissionFormRole($(o), arr[0], 2, false);
|
|
});
|
|
|
|
$.each($("input[name='projectlistread']"), function (i, o) {
|
|
updatePermissionFormRole($(o), arr[1], 1, true);
|
|
});
|
|
|
|
$.each($("input[name='projectlistwrite']"), function (i, o) {
|
|
updatePermissionFormRole($(o), arr[1], 2, true);
|
|
});
|
|
|
|
result = true;
|
|
}
|
|
});
|
|
});
|
|
$('#btnsave').click(function () {
|
|
if ($('#frmEditUser').valid())
|
|
blockUI();
|
|
});
|
|
|
|
});
|
|
|
|
function updatePermissionFormRole(chk, arr, propIndx, useTreeObj) {
|
|
var inherited = false;
|
|
|
|
if (arr.length == 0) {
|
|
if (IsInherited(chk)) {
|
|
setInherited(chk, false, useTreeObj);
|
|
}
|
|
}
|
|
else {
|
|
for (var j = 0; j < arr.length; j++) {
|
|
var item = arr[j][0];
|
|
var itemAllow = arr[j][propIndx];
|
|
|
|
//area is inherited from role
|
|
if (item == chk.val() && IsInherited(chk)) {
|
|
setInherited(chk, itemAllow == "True", useTreeObj);
|
|
inherited = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!inherited) {
|
|
if (IsInherited(chk)) {
|
|
setInherited(chk, false, useTreeObj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function setInherited(o, checked, useTreeObj) {
|
|
o.attr("inherited", "inherited");
|
|
o.attr("role", checked ? '1' : '0');
|
|
if (useTreeObj == true) {
|
|
var obj = ProjectTree.setDataValue($(o).val(), $(o).attr("name") == "projectlistwrite" ? 'write' : 'read', $(o).attr("role") == "1");
|
|
ProjectTree.setParentValues(obj);
|
|
}
|
|
else {
|
|
o.prop("checked", checked);
|
|
}
|
|
}
|
|
|
|
function IsInherited(o) {
|
|
return o.attr("inherited") != null;
|
|
}
|
|
|
|
function reset() {
|
|
$.each($("input[name='areasread']"), function (i, o) {
|
|
if ($(o).attr("inherited") != "inherited") {
|
|
setInherited($(o), $(o).attr("role") == "1", false);
|
|
}
|
|
});
|
|
|
|
$.each($("[name='areaswrite']"), function (i, o) {
|
|
if ($(o).attr("inherited") != "inherited") {
|
|
setInherited($(o), $(o).attr("role") == "1", false);
|
|
}
|
|
});
|
|
|
|
$.each($("input[name='projectlistread']"), function (i, o) {
|
|
if ($(o).attr("inherited") != "inherited") {
|
|
setInherited($(o), $(o).attr("role") == "1", true);
|
|
}
|
|
});
|
|
|
|
$.each($("input[name='projectlistwrite']"), function (i, o) {
|
|
if ($(o).attr("inherited") != "inherited") {
|
|
setInherited($(o), $(o).attr("role") == "1", true);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
function getProjectTree() {
|
|
$.post('@Url.Action("GetProjectAccessTree", "User")?userId=@Model.Id', null, function (data) {
|
|
if (data != undefined) {
|
|
ProjectTree.data = data;
|
|
ProjectTree.initData();
|
|
var table = $('<table class="tree"></table>');
|
|
$(table).append('<tr class="treegrid-1" style="border-top:0;"><td style="font-weight:600;border-top-width:0">Projects</td><td style="border-top-width:0;text-align: center;"> R W</td></tr>');
|
|
for (var i = 0; i < data.length; i++) {
|
|
var company = data[i];
|
|
var cmp = ProjectTree.getDataObjectById(data[i].Id);
|
|
var tr = buildProjectTreeNode(company.Id, company.Name, 'company', company.Clients.length > 0);
|
|
$(table).append(tr);
|
|
for (var c = 0; c < company.Clients.length; c++) {
|
|
var client = company.Clients[c];
|
|
var clt = ProjectTree.getDataObjectById(client.Id);
|
|
var tr = buildProjectTreeNode(client.Id, client.Name, 'client', client.Projects.length > 0);
|
|
$(table).append(tr);
|
|
for (var p = 0; p < client.Projects.length; p++) {
|
|
var project = client.Projects[p];
|
|
var tr = buildProjectTreeNode(project.Id, project.Name, 'project', false);
|
|
$(table).append(tr);
|
|
}
|
|
}
|
|
}
|
|
|
|
$('#projectTree').append(table);
|
|
|
|
$('.tree > tbody > tr > td > nobr > input').click(function (event) {
|
|
var id = $(event.target).parent().parent().parent()[0].id;
|
|
var attrName = $(event.target).attr('name');
|
|
var type = (attrName == 'projectlistread' || attrName == 'clientread' || attrName == 'companyread') ? 'read' : 'write';
|
|
ProjectTree.changeDataValue(id, type, event.target);
|
|
});
|
|
|
|
$('span.glyphicon').click(function (event) {
|
|
var id = $(event.target).parent().parent().attr('id');
|
|
ProjectTree.showHideTree(id);
|
|
if ($(event.target).hasClass('glyphicon-chevron-down')) {
|
|
$(event.target).removeClass('glyphicon-chevron-down');
|
|
$(event.target).addClass('glyphicon-chevron-right');
|
|
} else {
|
|
$(event.target).removeClass('glyphicon-chevron-right');
|
|
$(event.target).addClass('glyphicon-chevron-down');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
function buildProjectTreeNode(id, name, type, hasChilds){
|
|
var tr = $('<tr class="treegrid-' + id + '" id="' + id + '"></tr>');
|
|
if (hasChilds)
|
|
$(tr).addClass('treegrid-expanded');
|
|
|
|
var nameCol = '<td style="border-width=0px;">';
|
|
if (type == 'client')
|
|
nameCol += '<span class="treegrid-indent"></span>';
|
|
if (type == 'project')
|
|
nameCol += '<span class="treegrid-indent"></span><span class="treegrid-indent"></span>';
|
|
nameCol += '<span class="treegrid-expander ';
|
|
if (hasChilds)
|
|
nameCol += 'glyphicon glyphicon-chevron-down';
|
|
nameCol += '"></span>' + name + '</td>';
|
|
$(tr).append(nameCol);
|
|
|
|
var permCol = $('<td style="border-width=0px;"></td>');
|
|
var nobr = $('<nobr></nobr>');
|
|
var input = $('<input type="checkbox" class="custominput" autocomplete="off" value="' + id + '">');
|
|
|
|
var obj = ProjectTree.getDataObjectById(id);
|
|
if (obj.Type == 'company') {
|
|
$(input).attr('name', 'companyread');
|
|
} else if (obj.Type == 'client') {
|
|
$(input).attr('name', 'clientread');
|
|
$(input).attr('companyr', obj.Parent);
|
|
} else if (obj.Type == 'project') {
|
|
$(input).attr('name', 'projectlistread');
|
|
$(input).attr('clientr', obj.Parent);
|
|
var client = ProjectTree.getDataObjectById(obj.Parent);
|
|
$(input).attr('companyr', client.Parent);
|
|
}
|
|
|
|
if (obj.Read == true) {
|
|
$(input).prop('checked', 'checked');
|
|
$(input).removeAttr('inherited');
|
|
}
|
|
if (obj.ReadInherited == true) {
|
|
$(input).attr('inherited', 'inherited');
|
|
}
|
|
if (obj.RoleRead != null) {
|
|
$(input).attr('role', obj.RoleRead == true ? '1' : '0');
|
|
}
|
|
|
|
$(nobr).append(input);
|
|
|
|
var input = $('<input type="checkbox" class="custominput" autocomplete="off" value="' + id + '"/>');
|
|
|
|
if (obj.Type == 'company') {
|
|
$(input).attr('name', 'companywrite');
|
|
} else if (obj.Type == 'client') {
|
|
$(input).attr('name', 'clientwrite');
|
|
$(input).attr('companyw', obj.Parent);
|
|
} else if (obj.Type == 'project') {
|
|
$(input).attr('name', 'projectlistwrite');
|
|
$(input).attr('clientw', obj.Parent);
|
|
var client = ProjectTree.getDataObjectById(obj.Parent);
|
|
$(input).attr('companyw', client.Parent);
|
|
}
|
|
|
|
if (obj.Write == true) {
|
|
$(input).attr('checked', 'checked');
|
|
$(input).removeAttr('inherited');
|
|
}
|
|
if (obj.WriteInherited == true) {
|
|
$(input).attr('inherited', 'inherited');
|
|
}
|
|
if (obj.RoleWrite != null) {
|
|
$(input).attr('role', obj.RoleWrite == true ? '1' : '0');
|
|
}
|
|
|
|
$(nobr).append(input);
|
|
|
|
$(permCol).append(nobr);
|
|
$(tr).append(permCol);
|
|
|
|
return tr;
|
|
}
|
|
|
|
var ProjectTree = new Object();
|
|
ProjectTree.dataObjects = new Array();
|
|
|
|
ProjectTree.initData = function () {
|
|
if (ProjectTree.data != undefined) {
|
|
for (var i = 0; i < ProjectTree.data.length; i++) {
|
|
var company = ProjectTree.data[i];
|
|
var cmp = new Object();
|
|
cmp.Id = company.Id;
|
|
cmp.Type = 'company';
|
|
cmp.Parent = undefined;
|
|
cmp.Childs = new Array();
|
|
var isAllClientsReadEnabled = true;
|
|
var isAllClientsWriteEnabled = true;
|
|
for (var c = 0; c < company.Clients.length; c++) {
|
|
var client = company.Clients[c];
|
|
cmp.Childs.push(client.Id);
|
|
var clt = new Object();
|
|
clt.Id = client.Id;
|
|
clt.Type = 'client';
|
|
clt.Parent = cmp.Id;
|
|
clt.Childs = new Array();
|
|
var isAllProjectsReadEnabled = true;
|
|
var isAllProjectsWriteEnabled = true;
|
|
for (var p = 0; p < client.Projects.length; p++) {
|
|
var project = client.Projects[p];
|
|
clt.Childs.push(project.Id);
|
|
var prg = new Object();
|
|
prg.Id = project.Id;
|
|
prg.Type = 'project';
|
|
prg.Parent = clt.Id;
|
|
prg.Childs = new Array();
|
|
prg.Read = project.Read;
|
|
prg.ReadInherited = project.ReadInherited;
|
|
prg.RoleRead = project.RoleRead;
|
|
prg.Write = project.Write;
|
|
prg.WriteInherited = project.WriteInherited;
|
|
prg.RoleWrite = project.RoleWrite;
|
|
|
|
if (prg.Read == false)
|
|
isAllProjectsReadEnabled = false;
|
|
if (prg.Write == false)
|
|
isAllProjectsWriteEnabled = false;
|
|
|
|
ProjectTree.dataObjects.push(prg);
|
|
}
|
|
|
|
if (isAllProjectsReadEnabled) {
|
|
clt.Read = true;
|
|
} else {
|
|
clt.Read = false;
|
|
isAllClientsReadEnabled = false;
|
|
}
|
|
if (isAllProjectsWriteEnabled) {
|
|
clt.Write = true;
|
|
} else {
|
|
clt.Write = false;
|
|
isAllClientsWriteEnabled = false;
|
|
}
|
|
|
|
ProjectTree.dataObjects.push(clt);
|
|
}
|
|
|
|
cmp.Read = isAllClientsReadEnabled ? true : false;
|
|
cmp.Write = isAllClientsWriteEnabled ? true : false;
|
|
ProjectTree.dataObjects.push(cmp);
|
|
}
|
|
}
|
|
}
|
|
|
|
ProjectTree.getDataObjectById = function (id) {
|
|
for (var i = 0; i < ProjectTree.dataObjects.length; i++) {
|
|
var item = ProjectTree.dataObjects[i];
|
|
if (item.Id == id)
|
|
return item;
|
|
}
|
|
|
|
return undefined;
|
|
}
|
|
|
|
ProjectTree.changeDataValue = function (id, type, eventTarget) {
|
|
var obj = ProjectTree.getDataObjectById(id);
|
|
var val = undefined;
|
|
if (type == 'read') {
|
|
val = obj.Read;
|
|
} else if (type == 'write') {
|
|
val = obj.Write;
|
|
}
|
|
|
|
$(eventTarget).removeAttr("inherited");
|
|
|
|
var nextVal = ProjectTree.getNextVal(obj.Type, val);
|
|
obj = ProjectTree.setDataValue(id, type, nextVal);
|
|
|
|
ProjectTree.setParentValues(obj);
|
|
}
|
|
|
|
ProjectTree.getNextVal = function (type, val) {
|
|
if (val == false)
|
|
return true;
|
|
if (val == true)
|
|
return false;
|
|
}
|
|
|
|
ProjectTree.getReadWriteValById = function(id){
|
|
var obj = ProjectTree.getDataObjectById(id);
|
|
var readWrite = new Object();
|
|
if(obj != undefined){
|
|
readWrite.Read = obj.Read;
|
|
readWrite.Write = obj.Write;
|
|
}
|
|
|
|
return readWrite;
|
|
}
|
|
|
|
ProjectTree.setDataValue = function(id, valType, val){
|
|
var obj = ProjectTree.getDataObjectById(id);
|
|
|
|
if (valType == 'read') {
|
|
obj.Read = val;
|
|
}
|
|
else if (valType == 'write') {
|
|
obj.Write = val;
|
|
if (val == true && obj.Read != true) {
|
|
obj.Read = val;
|
|
ProjectTree.setCheckboxValue(obj, 'read', val);
|
|
}
|
|
}
|
|
ProjectTree.setCheckboxValue(obj, valType, val);
|
|
|
|
if (obj.Type != 'project') {
|
|
for (var i = 0; i < obj.Childs.length; i++) {
|
|
var ch = obj.Childs[i];
|
|
ProjectTree.setDataValue(ch, valType, val);
|
|
}
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
|
|
ProjectTree.setParentValues = function (obj) {
|
|
if (obj.Parent != undefined) {
|
|
var parent = ProjectTree.getDataObjectById(obj.Parent);
|
|
var v = ProjectTree.checkIsAllChecked(obj.Parent, 'read') ? true : false;
|
|
parent.Read = v;
|
|
ProjectTree.setCheckboxValue(parent, 'read', v);
|
|
|
|
v = ProjectTree.checkIsAllChecked(obj.Parent, 'write') ? true : false;
|
|
parent.Write = v;
|
|
ProjectTree.setCheckboxValue(parent, 'write', v);
|
|
|
|
if(parent.Parent != undefined)
|
|
ProjectTree.setParentValues(parent);
|
|
}
|
|
}
|
|
|
|
ProjectTree.setCheckboxValue = function(obj, permissionType, permissionVal) {
|
|
var input = undefined;
|
|
if ('read' == permissionType) {
|
|
if ('project' == obj.Type) {
|
|
input = $($($('tr#' + obj.Id).children('td')[1]).children('nobr')).children('input[name="projectlistread"]');
|
|
} else if ('client' == obj.Type) {
|
|
input = $($($('tr#' + obj.Id).children('td')[1]).children('nobr')).children('input[name="clientread"]');
|
|
} else if ('company' == obj.Type) {
|
|
input = $($($('tr#' + obj.Id).children('td')[1]).children('nobr')).children('input[name="companyread"]');
|
|
}
|
|
} else if ('write' == permissionType) {
|
|
if ('project' == obj.Type) {
|
|
input = $($($('tr#' + obj.Id).children('td')[1]).children('nobr')).children('input[name="projectlistwrite"]');
|
|
} else if ('client' == obj.Type) {
|
|
input = $($($('tr#' + obj.Id).children('td')[1]).children('nobr')).children('input[name="clientwrite"]');
|
|
} else if ('company' == obj.Type) {
|
|
input = $($($('tr#' + obj.Id).children('td')[1]).children('nobr')).children('input[name="companywrite"]');
|
|
}
|
|
}
|
|
|
|
if (input != undefined) {
|
|
$(input).prop('checked', permissionVal);
|
|
$(input).removeAttr("inherited");
|
|
}
|
|
};
|
|
|
|
ProjectTree.checkIsAllChecked = function (id, type) {
|
|
var obj = ProjectTree.getDataObjectById(id);
|
|
var allChecked = true;
|
|
for (var i = 0; i < obj.Childs.length; i++) {
|
|
var child = ProjectTree.getDataObjectById(obj.Childs[i]);
|
|
if (type == 'read' && child.Read == 0)
|
|
allChecked = false;
|
|
if (type == 'write' && child.Write == 0)
|
|
allChecked = false;
|
|
}
|
|
|
|
return allChecked;
|
|
}
|
|
|
|
ProjectTree.showHideTree = function (id) {
|
|
var obj = ProjectTree.getDataObjectById(id);
|
|
for(var i = 0; i < obj.Childs.length; i++){
|
|
var child = ProjectTree.getDataObjectById(obj.Childs[i]);
|
|
if (child.Childs.length > 0) {
|
|
ProjectTree.showHideTree(child.Id);
|
|
}
|
|
var isHide = $('.treegrid-' + child.Id).css('display') == 'none';
|
|
if (isHide)
|
|
$('.treegrid-' + child.Id).css('display', 'table-row');
|
|
else
|
|
$('.treegrid-' + child.Id).css('display', 'none');
|
|
}
|
|
}
|
|
|
|
function beforeSubmit() {
|
|
$("input[name='overriden']").remove();
|
|
var form = document.getElementById("frmEditUser");
|
|
$.each($(".custominput"), function (i, o) {
|
|
if ($(o).attr("inherited") == "inherited") {
|
|
var hid = document.createElement('input');
|
|
$(hid).prop("type", "hidden");
|
|
$(hid).prop("name", "overriden");
|
|
$(hid).prop("value", $(o).prop("name") + "|" + $(o).prop("value"));
|
|
form.appendChild(hid);
|
|
}
|
|
});
|
|
return true;
|
|
}
|
|
|
|
$('#PreferredResourceAllocation').switcher({
|
|
on_state_content: 'Resources',
|
|
off_state_content: 'Hours'
|
|
});
|
|
$('#PreferredResourceAllocation').parent().css("width", "90px");
|
|
|
|
</script>
|
|
}
|
|
<div id="erorMsgPlaceholder"></div>
|
|
@using (Html.BeginForm("Edit", "User", FormMethod.Post, new { @id="frmEditUser", @class = "panel form-horizontal", @onsubmit="return beforeSubmit();" }))
|
|
{
|
|
@Html.AntiForgeryToken()
|
|
<div class="panel-body">
|
|
<div class="form-group">
|
|
@Html.LabelFor(model => model.UserName, new { @class = "col-sm-2 control-label" })
|
|
<div class="col-sm-10">
|
|
@Html.TextBoxFor(model => model.UserName, new { @class = "form-control" })
|
|
@Html.ValidationMessageFor(model => model.UserName)
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
@Html.LabelFor(model => model.Email, new { @class = "col-sm-2 control-label" })
|
|
<div class="col-sm-10">
|
|
@Html.TextBoxFor(model => model.Email, new { @class = "form-control" })
|
|
@Html.ValidationMessageFor(model => model.Email)
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
@Html.LabelFor(model => model.Phone, new { @class = "col-sm-2 control-label" })
|
|
<div class="col-sm-10">
|
|
@Html.TextBoxFor(model => model.Phone, new { @class = "form-control" })
|
|
@Html.ValidationMessageFor(model => model.Phone)
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label" for="Phone">Preferred Resource Allocation</label>
|
|
<div class="col-sm-10">
|
|
@Html.CheckBoxFor(model => model.PreferredResourceAllocation, new { @class = "form-control" })
|
|
@Html.ValidationMessageFor(model => model.PreferredResourceAllocation)
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<span class = "col-sm-2 control-label" style="font-weight:600;" >Roles</span>
|
|
<div class="col-sm-10" style="padding-top:5px;padding-left:11px;">
|
|
@Html.GetRolesList(@Url, Model)
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<span class = "col-sm-2 control-label" style="font-weight:600;"></span>
|
|
<div class="col-sm-10" style="padding-top:5px;padding-left:11px;">
|
|
<a class="btn btn-primary" href="javascript:reset();">Reset permissions</a>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-2 control-label" for="UserName">Permissions</label>
|
|
<div class="col-sm-10">
|
|
<table cellspacing="0" border="0">
|
|
<tbody>
|
|
<tr>
|
|
<td style="padding-top: 7px; vertical-align:top;">
|
|
<table>
|
|
<tbody>
|
|
@Html.GetAreaItemsList(@Url, Model)
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td style="padding:10px;vertical-align:top; padding-left:50px;" id="projectTree">
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
@Html.ValidationSummary(false, "The user could not be saved due to the following errors:")
|
|
<div class="form-group" style="margin-bottom: 0;">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<a class="btn btn-primary" href="@Url.Action("Index", "User")"><i class="fa fa-backward"></i> Back to list</a>
|
|
<button type="submit" class="btn btn-success" id="btnsave"><i class="fa fa-save"></i> Save</button>
|
|
@if (Model != null)
|
|
{
|
|
@*if (Model.Projects.Count > 0)
|
|
{
|
|
<a id="btnDelete" class="btn btn-danger disabled" href="javascript:void(0);"><i class="fa fa-trash-o"></i> Delete</a>
|
|
}
|
|
else
|
|
{
|
|
*@
|
|
if (!string.IsNullOrEmpty( Model.Id))
|
|
{
|
|
<a id="btnDelete" class="btn btn-danger" href="@Url.Action("Delete", "User", new {@id = Model.Id})"><i class="fa fa-trash-o"></i> Delete</a>
|
|
}
|
|
//}
|
|
}
|
|
</div>
|
|
@if (Model != null) { Html.HiddenFor(model => model.Id); }
|
|
@if (Model != null) { Html.HiddenFor(model => model.Discriminator); }
|
|
</div>
|
|
</div>
|
|
} |