initial add
This commit is contained in:
304
Fab2ApprovalSystem/Views/Home/ECNList.cshtml
Normal file
304
Fab2ApprovalSystem/Views/Home/ECNList.cshtml
Normal file
@ -0,0 +1,304 @@
|
||||
@using Microsoft.AspNet.Identity
|
||||
@{
|
||||
Layout = "_HomeLayout.cshtml";
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="~/Scripts/js.cookie.js" />
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>@ViewBag.Title</title>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
@*<body>*@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<table style="width: 100%">
|
||||
<tr>
|
||||
<td align="center" style="font-size: 15px; font-weight: bold; color: crimson">
|
||||
|
||||
<label id="header" style="font-size: large; font-weight: bold; color: crimson; font-family: 'Times New Roman'">
|
||||
ECN List
|
||||
</label><br />
|
||||
<label id="headerID" style="font-size: small; font-weight: bold; color: blue; font-family: 'Times New Roman'">
|
||||
|
||||
</label>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="ecnTasklistdiv" class="k-content" style="font-size: 11px;">
|
||||
@if ((bool)Session[GlobalVars.IS_ADMIN])
|
||||
{
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("ecnTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Template(t => { }).HeaderTemplate("").ClientTemplate(@"
|
||||
<a href='javascript: void(0)' class='abutton delete' onclick='deleteRowECN(this)' title='button delete'>button delete</a>");
|
||||
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
//.Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetECNList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@(Html.Kendo().Grid<Fab2ApprovalSystem.ViewModels.IssuesViewModel>()
|
||||
.Name("ecnTasklist")
|
||||
.Columns(columns =>
|
||||
{
|
||||
//columns.Bound(l => l.IssueID);
|
||||
columns.Bound(l => l.IssueID).Template(@<text> @Html.ActionLink(@item.IssueID.ToString(), null)</text>)
|
||||
.ClientTemplate("<a href='/#=DocumentType#/Edit?IssueID=#=DocID#'>#=IssueID#</a>");
|
||||
columns.Bound(l => l.DocumentType);
|
||||
columns.Bound(l => l.SubDoc);
|
||||
columns.Bound(l => l.Originator);
|
||||
columns.Bound(l => l.IssueDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.Title);
|
||||
columns.Bound(l => l.LotNos);
|
||||
columns.Bound(l => l.PendingApprovers).HtmlAttributes(new { style = "font-weight: bold; color: red;" }).Width("350px");
|
||||
columns.Bound(l => l.SubmitedDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
columns.Bound(l => l.CloseDate).Format("{0:MM/dd/yy hh:mm:ss}");
|
||||
})
|
||||
//.Events(e => e.DataBound("onAllDocsDB"))
|
||||
// .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
|
||||
.Editable(editable => editable.Mode(GridEditMode.InLine))
|
||||
.HtmlAttributes(new { style = "height: 700px;" })
|
||||
.Scrollable()
|
||||
.Sortable()
|
||||
.Filterable(filterable => filterable
|
||||
.Extra(false)
|
||||
.Operators(operators => operators
|
||||
.ForString(str => str
|
||||
.Clear()
|
||||
.Contains("Contains")
|
||||
.DoesNotContain("Does not contain")
|
||||
.StartsWith("Starts with")
|
||||
.EndsWith("Ends with")
|
||||
.IsEqualTo("Is equal to")
|
||||
.IsNotEqualTo("Is not equal to ")
|
||||
)
|
||||
)
|
||||
)
|
||||
.Pageable(pageable => pageable
|
||||
.Refresh(true)
|
||||
.PageSizes(true)
|
||||
.ButtonCount(5))
|
||||
|
||||
.DataSource(dataSource => dataSource
|
||||
|
||||
.Ajax()
|
||||
.Model(model =>
|
||||
{
|
||||
model.Id(p => p.IssueID);
|
||||
|
||||
//model.Field(p => p.TotalCost).Editable(false);
|
||||
})
|
||||
// .Events(e => e.RequestEnd("LoadState"))
|
||||
.PageSize(50)
|
||||
.Read(read => read.Action("GetECNList", "Home"))
|
||||
.Destroy(destroy => destroy.Action("DeleteItem", "Home"))
|
||||
)
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="OOODialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Out Of Office for user: @User.Identity.GetUserName()</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Delegate To:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DropDownList()
|
||||
.Name("DelegateTo")
|
||||
.HtmlAttributes(new { style = "width: 250px" })
|
||||
.DataTextField("FullName")
|
||||
.DataValueField("UserID")
|
||||
.DataSource(source =>
|
||||
{
|
||||
source.Read(read =>
|
||||
{
|
||||
read.Action("GetAllUserList", "Admin");
|
||||
});
|
||||
})
|
||||
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">Start Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<div class="controls">
|
||||
<label for="CurrentUser">End Date:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtStartDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<input type="text" id="test"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="col-sm-6">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
@(Html.Kendo().DatePicker()
|
||||
.Name("txtEndDate")
|
||||
//.Value()
|
||||
)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" id="SaveOOOInfo">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="ReAssignApproval" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval From: <label class="bg-danger" id="ReAssignApproverFromLabel">Me</label></h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<h4 class="modal-title" id="myModalLabel">Re-Assign for Approval to:</h4>
|
||||
<div id='lstReAssignApproval'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="ConfirmReAssignment">Confirm Re-assignment</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function deleteRowECN(element) {
|
||||
grid = $("#ecnTasklist").data("kendoGrid");
|
||||
grid.removeRow($(element).closest("tr"));
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user