Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model HRCap.Models.Notification.ViewModels.NotificationVM
- @{
- ViewBag.Title = "Index";
- Layout = "~/Views/Shared/Notification_Layout.cshtml";
- IEnumerable<HRCap.Models.Settings.Menutbl> menuList = (IEnumerable<HRCap.Models.Settings.Menutbl>)System.Web.HttpContext.Current.Session["LeftMenuSide"];
- string create = "/Notify/Create";
- }
- <style>
- pre {
- background-color: #fff;
- }
- div.dt-buttons {
- position: relative;
- float: left;
- margin-top: 10px;
- }
- input[type=search] {
- width: 50%;
- padding: 5px 10px;
- margin: 10px 0;
- box-sizing: border-box;
- }
- .mr-1, .mx-1 {
- margin-right: 0px !important;
- }
- html body .la {
- font-size: 1rem;
- padding: 0px;
- }
- select.form-control:not([size]):not([multiple]) {
- height: calc(1.75rem + 2px);
- }
- div.dataTables_wrapper div.dataTables_length label {
- font-weight: normal;
- text-align: left;
- white-space: nowrap;
- margin-top: 20px;
- }
- .btn-group, .btn-group-vertical {
- position: relative;
- display: -webkit-inline-box;
- display: -webkit-inline-flex;
- display: -moz-inline-box;
- display: -ms-inline-flexbox;
- display: inherit !important;
- vertical-align: middle;
- }
- div.dataTables_wrapper div.dataTables_filter label {
- margin-top: 0rem;
- }
- .col-md-12 {
- padding: 0px;
- }
- .btn-secondary {
- color: white;
- background-color: white;
- border-color: white;
- }
- .PaginDesign {
- margin: 6px;
- font-size: 15px;
- }
- </style>
- <div class="bg-white " style="padding:5px; padding-bottom:0px;">
- <ul class="breadcrumb">
- <li class="breadcrumb-item"><a href="/Dashboard/Notification">Notification Dashboard</a></li>
- <li class="breadcrumb-item active font-weight-bold"> Summary</li>
- </ul>
- </div>
- <div class="card">
- <div class="card-header card-head-inverse bg-blue-grey CustomizeHeader" @*style="padding-bottom: 4px !important;padding-top: 0px !important;"*@>
- <div class="row">
- <div class="col-6 col-md-6 col-lg-6 CustomizeHeaderTextDiv" @*style="padding-top: 7px; padding-bottom: 5px;"*@>
- <h4 class="card-title text-white">
- <i class="la la-clipboard"></i> Notification
- </h4>
- </div>
- <div class="col-6 col-md-6 col-lg-6">
- <div class=" text-white font-weight-bold">
- @if (menuList.Any(x => x.Url == create))
- {
- <a href="/Notify/Create" class="btn btn-white round btn-sm pull-right" style="color:black !important; "><i class="fa fa-plus append-icon"></i> New Notify</a>
- }
- </div>
- </div>
- </div>
- </div>
- <div class="card-body">
- @using (Html.BeginForm("Summary", "Notify", FormMethod.Post, new { id = "searchForm" }))
- {
- <div class="form-body" style="margin-bottom:15px;margin-right:13px;">
- <div class="row">
- @*<div class="col-md-4">
- <label>Receive Date</label>
- <div class="form-group">
- <div class="position-relative has-icon-left">
- <input id="ReceiveDate" class="form-control input-sm " name="ReceiveDate" type="text" autocomplete="off" >
- <div class="form-control-position">
- <i class="ft-calendar" style="margin-left: 1px"></i>
- </div>
- </div>
- </div>
- </div>*@
- @Html.HiddenFor(x => x.page)
- <input type="hidden" name="HiddenItemPerPage" value="@Model.HiddenItemPerPage" />
- <div class="col-md-3">
- <label class="label-control">Number of item</label>
- @Html.DropDownListFor(model => model.ItemPerPage, new SelectList(Model.RangeDdl, "Value", "Text"), new { @class = "form-control input-sm" })
- </div>
- </div>
- <div class="row">
- <div class="col-12 col-sm-12 col-md-12 col-lg-12 pull-right">
- <button type="submit" class="btn btn-sm btn-outline-success pull-right mar-top" id="SearchBtn">
- <i class="fa fa-search"></i> Search
- </button>
- @*<button type="button" class="btn btn-sm btn-outline-warning pull-right mar-top" style="margin-right:8px;" id="ClearBtn">
- <i class="fas fa-sync-alt"></i> Clear
- </button>*@
- </div>
- </div>
- <div class="row" style="margin-top:5px;">
- <div class="col-12">
- <h3>Notifications</h3>
- <hr />
- <style>
- .list-group-item {
- padding: .3rem;
- }
- </style>
- @if (Model.SummaryList != null && Model.SummaryList.Count > 0)
- {
- <ul class="list-group">
- @foreach (var item in Model.SummaryList)
- {
- <li class="list-group-item">
- @if (item.IsJsonData == 1)
- {
- <span>
- @item.NotificationText.Message@if (item.NotificationText.IsLinkAvailable == 1)
- {<span> - </span>@Html.Raw(item.NotificationText.Link)}
- </span>
- }
- else
- {
- <pre>@item.TextNotify</pre>
- }
- <button class="btn btn-sm btn-success pull-right " data-toggle="tooltip" data-placement="top" title="Mark as Seen" id="b_@item.NotificationId" onclick="ChangeStatus('@item.EmpId','@item.NotificationId')"><i class="fas fa-check-circle"></i></button>
- <small class=" pull-right " style="padding-right:10px;">
- <time class="media-meta text-muted">@item.NotificationServiceTime ago</time>
- </small>
- </li>
- }
- </ul>
- }
- </div>
- </div>
- <div class="row">
- <div class="col-12 col-md-12 ">
- <!-- pager -->
- @if (Model.pager.EndPage > 1)
- {
- <ul class="pagination pull-right" id="results">
- @if (Model.pager.CurrentPage > 1)
- {
- <li class="page-item">
- <a class="page-link" href="#" id="@Model.pager.StartPage">First</a>
- </li>
- <li class="page-item">
- <a class="page-link" href="#" id="@(Model.pager.CurrentPage-1)">Previous</a>
- </li>
- }
- @for (var page = Model.pager.StartPage; page <= Model.pager.EndPage; page++)
- {
- <li class="page-item @(page == Model.pager.CurrentPage ? "active" : "")">
- <a class="page-link" href="#" id="@page">@page</a>
- </li>
- }
- @if (Model.pager.CurrentPage < Model.pager.TotalPages)
- {
- <li class="page-item">
- <a class="page-link" href="#" id="@(Model.pager.CurrentPage + 1)">Next</a>
- </li>
- <li class="page-item">
- <a class="page-link" href="#" id="@(Model.pager.TotalPages)">Last</a>
- </li>
- }
- </ul>
- }
- </div>
- </div>
- </div>
- }
- </div>
- </div>
- @section scripts{
- <script type="text/javascript">
- $(document).ready(function () {
- //Btn Submit Click
- $('#SearchBtn').click(function (e) {
- $('#page').val(1);
- $("form").attr("action", "/Notify/Summary");
- // $('#searchForm').submit();
- // return false;
- });
- //Pagination
- $('#results li a').click(function (e) {
- var id = e.currentTarget.id;
- $('#page').val(id);
- $('#searchForm').submit();
- return false;
- });
- });
- </script>
- }
Add Comment
Please, Sign In to add comment