794 lines
45 KiB
Plaintext
794 lines
45 KiB
Plaintext
@using EnVisage.Models
|
|
@using EnVisage.Code
|
|
@using StackExchange.Profiling
|
|
<!DOCTYPE html>
|
|
<!--[if IE 9]> <html class="ie9 gt-ie8"> <![endif]-->
|
|
<!--[if gt IE 9]><!-->
|
|
<html class="gt-ie8 gt-ie9 not-ie">
|
|
<!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>@ViewBag.Title - Prevu</title>
|
|
<!-- Open Sans font from Google CDN -->
|
|
<link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,600,700,300&subset=latin" rel="stylesheet" type="text/css">
|
|
|
|
@Styles.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-commonstyles"))
|
|
@RenderSection("stylesheets", required: false)
|
|
@if (HttpContext.Current.Request.Url.Host != null && HttpContext.Current.Request.Url.Host.ToLower().IndexOf("uat.prevuplan") > 0)
|
|
{
|
|
@Styles.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-uatstyles"))
|
|
}
|
|
|
|
@Scripts.Render("~/Scripts/jquery-2.0.3.min.js")
|
|
|
|
<script type="text/javascript">
|
|
@Html.Raw(ViewBag.GlobalVariables)
|
|
var init = [];
|
|
|
|
var dashboardChartType = {
|
|
projectsByStatus: 1,
|
|
optimuse: 2
|
|
};
|
|
|
|
function redirectTo(e, url) {
|
|
window.location.href = url;
|
|
e.stopPropagation();
|
|
return false;
|
|
}
|
|
function linkTo(link) {
|
|
var url = $(link).data('link-url');
|
|
var id = $(link).data('link-id');
|
|
window.location.href = URI(url).setQuery("linkId", id);
|
|
return false;
|
|
}
|
|
</script>
|
|
</head>
|
|
@{
|
|
var currviews = new List<ViewListModel>();
|
|
var currteams = new List<TeamWithResourcesModel>();
|
|
var currlinks = new List<UserQuickLink>();
|
|
try {
|
|
if (User.Identity.IsAuthenticated && User.Identity.GetID() != Guid.Empty.ToString())
|
|
{
|
|
var userId = Guid.Parse(User.Identity.GetID());
|
|
var user = new EnVisage.Code.Cache.UsersCache().Value.FirstOrDefault(t => t.Id == userId);
|
|
currviews = new EnVisage.Code.BLL.ViewManager(new EnVisageEntities()).GetViewsByOwner(Guid.Parse(User.Identity.GetID()), !user.ShowAutomaticViews).OrderBy(x => x.Name).ToList();
|
|
currteams = new EnVisage.Code.BLL.TeamManager(new EnVisageEntities()).LoadTeamsWithResourcesByUser(Guid.Parse(User.Identity.GetID())).OrderBy(x => x.Name).ToList();
|
|
currlinks = (List<UserQuickLink>) Utils.GetQuickLinksByUser(userId);
|
|
}
|
|
} catch
|
|
{
|
|
}
|
|
//TODO: create a new FilterAttribute and collect all neccessary data from DB into ViewData.
|
|
//TODO: do not create EnVisageEntities for each manager. Try to use one instance
|
|
var accountManager = new EnVisage.Code.BLL.AccountManager(new EnVisageEntities());
|
|
var resourceId = accountManager.GetCurrentResourceId(User.Identity.GetID());
|
|
}
|
|
<body class="theme-adminflare main-menu-animated" ng-app="app">
|
|
<div id="main-wrapper">
|
|
@if (User.Identity.IsAuthenticated && User.Identity.GetID() != Guid.Empty.ToString())
|
|
{
|
|
<text>
|
|
<div id="main-navbar" class="navbar navbar-inverse" role="navigation">
|
|
<button type="button" id="main-menu-toggle"><i class="navbar-icon fa fa-bars icon"></i><span class="hide-menu-text">HIDE MENU</span></button>
|
|
|
|
<div class="navbar-inner">
|
|
<div class="navbar-header">
|
|
<a href="@Url.Action("Index", "Home")" class="navbar-brand" style="text-transform:none;font-size:12px;"><div><img alt="Prevu" src="~/Content/images/prevu-xs.png"></div></a>
|
|
<span class="navbarHeading-sm visible-xs-inline hidden-sm hidden-md hidden-lg"> @ViewBag.Title</span>
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-navbar-collapse"><i class="navbar-icon fa fa-bars"></i></button>
|
|
</div>
|
|
<div class="pull-left">
|
|
<h1 id="navbarHeading" class="navbarHeading hidden-xs" title="@ViewBag.Title">@ViewBag.Title</h1>
|
|
</div>
|
|
<div id="main-navbar-collapse" class="collapse navbar-collapse main-navbar-collapse">
|
|
<div>
|
|
<div class="right clearfix">
|
|
@Html.Partial("_LoginPartial")
|
|
@Html.Partial("_NotificationPartial")
|
|
@RenderSection("pagemenu", required: false)
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</text>
|
|
}
|
|
<div id="main-menu" role="navigation">
|
|
<div id="main-menu-inner">
|
|
<ul class="navigation">
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Dashboard, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Home")"><i class="menu-icon fa fa-dashboard"></i><span class="mm-text">Dashboard</span></a>
|
|
</li>
|
|
}
|
|
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.UserQuickLinks, AccessLevel.Read))
|
|
{
|
|
|
|
<li class="@((currlinks.Count > 0) ? "mm-dropdown mm-dropdown-root" : "")">
|
|
<a href="#">
|
|
<i class="menu-icon fa fa-link"></i>
|
|
<span class="mm-text">My Quick Links</span><span class="label label-info" onclick="editQuickLink(event, '@User.Identity.GetID()');"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
<ul id="quicklinksContainer">
|
|
@foreach (var link in currlinks)
|
|
{
|
|
var linkTitle = link.Name;
|
|
<li id="@link.Id">
|
|
<a href="javascript:void(0);">
|
|
<span class="mm-text mm-text-cut-2btn" onclick="linkTo(this);" data-link-id="@Html.Encode(link.Id)" data-link-url="@Html.Encode(link.Url)" title='@linkTitle'>@link.Name</span>
|
|
<span class="label label-danger" onclick="LoadDeleteQLModal('@link.Id');"><i class="fa fa-trash-o"></i></span>
|
|
<span class="label label-info" onclick="editQuickLink(event, '@User.Identity.GetID()', '@link.Id');"><i class="fa fa-edit"></i></span>
|
|
</a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</li>
|
|
}
|
|
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.MyViews, AccessLevel.Read))//&& currviews.Count() > 0)
|
|
{
|
|
<li class="@((currviews.Count > 1) ? "mm-dropdown mm-dropdown-root" : "")" id="view-menu-root">
|
|
@if (currviews.Count == 1)
|
|
{
|
|
var view = currviews[0];
|
|
if (view.CompanyId.HasValue)
|
|
{
|
|
<a href="javascript:void(0);">
|
|
<i class="menu-icon fa fa-picture-o" onclick="redirectTo(event, '@Url.Action("Board", "View", new { companyId = view.CompanyId }, Request.Url.Scheme)');"></i>
|
|
<span class="mm-text-cut-1btn mm-text" onclick="redirectTo(event, '@Url.Action("Board", "View", new { companyId = view.CompanyId }, Request.Url.Scheme)');" title="@view.Name">@view.Name</span>
|
|
<span class="label label-info" onclick="editView(null, this)"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
}
|
|
else
|
|
{
|
|
<a href="javascript:void(0);">
|
|
<i class="menu-icon fa fa-picture-o" onclick="redirectTo(event, '@Url.Action("Board", "View", new { viewId = view.Id }, Request.Url.Scheme)');"></i>
|
|
<span class="mm-text-cut-3btn mm-text" data-view-id="@view.Id.ToString()" onclick="redirectTo(event, '@Url.Action("Board", "View", new { viewId = view.Id }, Request.Url.Scheme)');" title="@view.Name">@view.Name</span>
|
|
<span class="label label-info" onclick="editView('@view.Id', this)"><i class="fa fa-edit"></i></span>
|
|
<span class="label label-danger" onclick="deleteView('@view.Id', this)"><i class="fa fa-trash-o"></i></span>
|
|
<span class="label label-info" onclick="editView(null, this)"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
}
|
|
}
|
|
else if (currviews.Count > 1)
|
|
{
|
|
<a href="javascript:void(0);">
|
|
<i class="menu-icon fa fa-picture-o"></i>
|
|
<span class="mm-text">My Views</span><span class="label label-info" onclick="editView(null, this)"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
<ul>
|
|
@foreach (var view in currviews.OrderBy(x=>x.Name))
|
|
{
|
|
if (view.CompanyId.HasValue)
|
|
{
|
|
<li>
|
|
<a href="javascript:void(0);">
|
|
<span class="mm-text-cut-0btn" onclick="redirectTo(event, '@Url.Action("Board", "View", new { companyId = view.CompanyId }, Request.Url.Scheme)');" title="@view.Name">@view.Name</span>
|
|
</a>
|
|
</li>
|
|
}
|
|
else
|
|
{
|
|
<li>
|
|
<a href="javascript:void(0);">
|
|
<span class="mm-text-cut-2btn" data-view-id="@view.Id.ToString()" onclick="redirectTo(event, '@Url.Action("Board", "View", new { viewId = view.Id }, Request.Url.Scheme)');" title="@view.Name">@view.Name</span>
|
|
<span class="label label-danger" onclick="deleteView('@view.Id', this)"><i class="fa fa-trash-o"></i></span>
|
|
<span class="label label-info" onclick="editView('@view.Id', this)"><i class="fa fa-edit"></i></span>
|
|
</a>
|
|
</li>
|
|
}
|
|
}
|
|
</ul>
|
|
}
|
|
else
|
|
{
|
|
<a href="javascript:void(0);" onclick="editView(null, this)">
|
|
<i class="menu-icon fa fa-picture-o"></i>
|
|
<span class="mm-text">My Views</span><span class="label label-info"><i class="fa fa-plus"></i></span>
|
|
</a>
|
|
}
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Teams, AccessLevel.Read) && currteams.Any())
|
|
{
|
|
<li class='@(currteams.Count > 1 ? "mm-dropdown mm-dropdown-root" : String.Empty)'>
|
|
@if (currteams.Count == 1)
|
|
{
|
|
<a href="@Url.Action("Board", "Team", new { teamId = currteams[0].Id })"><i class="menu-icon fa fa-users"></i><span class="mm-text">@currteams[0].Name</span></a>
|
|
}
|
|
else
|
|
{
|
|
<a href="#">
|
|
<i class="menu-icon fa fa-users"></i><span class="mm-text">My Team(s)</span>
|
|
|
|
</a>
|
|
<ul>
|
|
@foreach (var team in currteams)
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Board", "Team", new { teamId = team.Id })">
|
|
<span class="mm-text mm-text-cut-0btn">@team.Name</span>
|
|
</a>
|
|
|
|
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|
|
</li>
|
|
}
|
|
@if ((SecurityManager.CheckSecurityObjectPermission(Areas.PeopleResourceDetails, AccessLevel.Read) && resourceId.HasValue))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Details", "PeopleResource", new { resourceId })"><i class="menu-icon fa fa-user"></i><span class="mm-text">Resource Details</span></a>
|
|
</li>
|
|
}
|
|
@*@if (SecurityManager.CheckSecurityObjectPermission(Areas.Portfolio, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Portfolio")"><i class="menu-icon fa fa-book"></i><span class="mm-text">Portfolio</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ScheduleBoard, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "ScheduleBoard")"><i class="menu-icon fa fa-table"></i><span class="mm-text">Schedule Board</span></a>
|
|
</li>
|
|
}*@
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Scenarios, AccessLevel.Read))
|
|
{
|
|
<!--<li>
|
|
<a href=@Url.Action("Index", "Scenarios")><i class="menu-icon fa fa-files-o"></i><span class="mm-text">Scenarios</span></a>
|
|
</li>-->
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Projects, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Project")"><i class="menu-icon fa fa-briefcase"></i><span class="mm-text">My Projects</span></a>
|
|
</li>
|
|
}
|
|
@*@if (SecurityManager.CheckSecurityObjectPermission(Areas.Projects, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index2", "Project")"><i class="menu-icon fa fa-briefcase"></i><span class="mm-text">My Projects New</span></a>
|
|
</li>
|
|
}*@
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ActivityCalendar, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "CapacityManagement")"><i class="menu-icon fa fa-calendar"></i><span class="mm-text">Capacity Management</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.SkillsMatrix, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Skills")"><i class="menu-icon fa fa-book"></i><span class="mm-text">Skills Matrix</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Mixes, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Mix")"><i class="menu-icon fa fa-archive"></i><span class="mm-text">Roadmap Optimizer</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Reports, AccessLevel.Read))
|
|
{
|
|
<li class="mm-dropdown mm-dropdown-root">
|
|
<a href="#"><i class="menu-icon fa fa-bar-chart-o"></i><span class="mm-text">Reports</span></a>
|
|
<ul>
|
|
@foreach (KeyValuePair<string, List<KeyValuePair<System.Type, string>>> group in Utils.GetReports())
|
|
{
|
|
if (group.Value != null && group.Value.Count > 0)
|
|
{
|
|
if (!string.IsNullOrEmpty(group.Key))
|
|
{
|
|
@Html.Raw(string.Format("<li class=\"mm-dropdown\"><a href=\"#\"><span class=\"mm-text\">{0}</span></a><ul>", Html.Encode(group.Key)));
|
|
}
|
|
|
|
foreach (KeyValuePair<System.Type, string> report in group.Value)
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Reporting", new { rpt = report.Key.Name})"><span class="mm-text">@report.Value</span></a>
|
|
</li>
|
|
}
|
|
if (!string.IsNullOrEmpty(group.Key))
|
|
{
|
|
@Html.Raw("</ul></li>");
|
|
}
|
|
}
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.CustomReports, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "SupplyDemandReport")"><span class="mm-text">Supply and Demand</span></a>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckAnySecurityObjectPermission(new List<Areas>() { Areas.Users, Areas.Roles, Areas.Company, Areas.Clients, Areas.CreditDepartments, Areas.GLAccounts, Areas.Expenditures,
|
|
Areas.ExpenditureCategories, Areas.UnitsOfMeasure, Areas.ProjectClassifications, Areas.ProjectStatuses, Areas.FiscalCalendar, Areas.ScenarioTemplates,
|
|
Areas.ImportActuals}, AccessLevel.Read))
|
|
{
|
|
<li class="mm-dropdown mm-dropdown-root">
|
|
<a href="#"><i class="menu-icon fa fa-desktop"></i><span class="mm-text">Administration</span></a>
|
|
<ul>
|
|
@if (SecurityManager.CheckAnySecurityObjectPermission(new List<Areas>() { Areas.Users, Areas.Roles }, AccessLevel.Read))
|
|
{
|
|
<li class="mm-dropdown">
|
|
<a href="#"><span class="mm-text">Security</span></a>
|
|
<ul>
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Roles, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("index", "Role")"><span class="mm-text">Roles</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Users, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("index", "User")"><span class="mm-text">Users</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.WorkFlowRoles, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("RoleIndex", "WorkFlowDefinition")"><span class="mm-text">Workflow Roles</span></a>
|
|
</li>
|
|
}
|
|
|
|
</ul>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Company, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Company")"><span class="mm-text">Company</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="@Url.Action("Index", "Contact")"><span class="mm-text">Internal Contacts</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Clients, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Clients")"><span class="mm-text">Clients</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.CreditDepartments, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "CreditDepartment")"><span class="mm-text">Cost Centers</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.GLAccounts, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "GLAccount")"><span class="mm-text">GL Accounts</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Expenditures, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Expenditure")"><span class="mm-text">Expenditures</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ExpenditureCategories, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "ExpenditureCategory")"><span class="mm-text">Expenditure Categories</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.UnitsOfMeasure, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "UnitOfMeasure")"><span class="mm-text">Units of Measure</span></a>
|
|
</li>
|
|
}
|
|
@*@if (SecurityManager.CheckSecurityObjectPermission(Areas.Views, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "View")"><span class="mm-text">Views</span></a>
|
|
</li>
|
|
}*@
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Teams, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Team")"><span class="mm-text">Teams</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ProjectClassifications, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Type")"><span class="mm-text">Project Classifications</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ProjectStatuses, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Status")"><span class="mm-text">Project Statuses</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.FiscalCalendar, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Calendar")"><span class="mm-text">Fiscal Calendar</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ScenarioTemplates, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Templates", "Scenarios")"><span class="mm-text">Scenario Templates</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ImportActuals, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("ImportActuals", "Project")"><span class="mm-text">Import actuals</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Scenarios, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "ScenarioGroup")"><span class="mm-text">Scenario Groups</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceNonProjectTime, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "NonProjectTimeCategory")"><span class="mm-text">Non-Project Time Categories</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.StrategicGoals, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "StrategicGoal")"><span class="mm-text">Strategic Goals</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.WorkWeeks, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "WorkWeek")"><span class="mm-text">Work Weeks</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.ProjectTags, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Tag",new { TagType= (int) EnVisage.Code.TagType.Project })"><span class="mm-text">Project Tags</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.PortfolioTags, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "Tag",new { TagType= (int) EnVisage.Code.TagType.Portfolio })"><span class="mm-text">Portfolio/Product Labels</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.UserDefinedFields, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "UDF")"><span class="mm-text">User Defined Fields</span></a>
|
|
</li>
|
|
}
|
|
@if (SecurityManager.CheckSecurityObjectPermission(Areas.WorkFlowDefinitions, AccessLevel.Read))
|
|
{
|
|
<li>
|
|
<a href="@Url.Action("Index", "WorkFlowDefinition")"><span class="mm-text">WorkFlow Definitions</span></a>
|
|
</li>
|
|
}
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
}
|
|
</ul> <!-- / .navigation -->
|
|
</div> <!-- / #main-menu-inner -->
|
|
</div> <!-- / #main-menu -->
|
|
<!-- /4. $MAIN_MENU -->
|
|
<!-- Error modal alert -->
|
|
<div id="modal-error" class="modal modal-alert modal-danger fade">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<i class="fa fa-times-circle"></i>
|
|
</div>
|
|
<div class="modal-title"></div>
|
|
<div class="modal-body"></div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-danger" data-dismiss="modal">OK</button>
|
|
</div>
|
|
</div> <!-- / .modal-content -->
|
|
</div> <!-- / .modal-dialog -->
|
|
</div> <!-- / .modal -->
|
|
<!-- / Error modal alert -->
|
|
<div id="main-menu-bg" class="main-menu-bg-nav" ></div> <!--style="background-color: #2b2b2b!important;"></div> -->
|
|
<div id="content-wrapper">
|
|
@RenderBody()
|
|
</div> <!-- / #content-wrapper -->
|
|
<!-- Modal for quicklink -->
|
|
<div id="editQuickLink" class="modal fade" tabindex="-1" role="dialog" style="display: none;" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" id="editReloadQL">
|
|
|
|
</div> <!-- / .modal-content -->
|
|
</div> <!-- / .modal-dialog -->
|
|
</div> <!-- /.modal -->
|
|
<!-- / Modal -->
|
|
<div id="modal-deleteQuickLink" class="modal fade" tabindex="-1" role="dialog" style="display: none;">
|
|
<div class="modal-dialog divForCreate">
|
|
|
|
</div>
|
|
</div>
|
|
<div id="generalModalContainer" class="modal fade" tabindex="-1" role="dialog" style="display:none;" data-backdrop="static">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content" id="generalModalContent"></div>
|
|
</div>
|
|
</div>
|
|
</div> <!-- / #main-wrapper -->
|
|
@Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "platform-pixeladmin"))
|
|
@Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "platform-coremodules"))
|
|
@Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-common"))
|
|
|
|
@* Function is extracted from flot.js*@
|
|
<script type="text/javascript">
|
|
(function ($, e, t) { "$:nomunge"; var i = [], n = $.resize = $.extend($.resize, {}), a, r = false, s = "setTimeout", u = "resize", m = u + "-special-event", o = "pendingDelay", l = "activeDelay", f = "throttleWindow"; n[o] = 200; n[l] = 20; n[f] = true; $.event.special[u] = { setup: function () { if (!n[f] && this[s]) { return false } var e = $(this); i.push(this); e.data(m, { w: e.width(), h: e.height() }); if (i.length === 1) { a = t; h() } }, teardown: function () { if (!n[f] && this[s]) { return false } var e = $(this); for (var t = i.length - 1; t >= 0; t--) { if (i[t] == this) { i.splice(t, 1); break } } e.removeData(m); if (!i.length) { if (r) { cancelAnimationFrame(a) } else { clearTimeout(a) } a = null } }, add: function (e) { if (!n[f] && this[s]) { return false } var i; function a(e, n, a) { var r = $(this), s = r.data(m) || {}; s.w = n !== t ? n : r.width(); s.h = a !== t ? a : r.height(); i.apply(this, arguments) } if ($.isFunction(e)) { i = e; return a } else { i = e.handler; e.handler = a } } }; function h(t) { if (r === true) { r = t || 1 } for (var s = i.length - 1; s >= 0; s--) { var l = $(i[s]); if (l[0] == e || l.is(":visible")) { var f = l.width(), c = l.height(), d = l.data(m); if (d && (f !== d.w || c !== d.h)) { l.trigger(u, [d.w = f, d.h = c]); r = t || true } } else { d = l.data(m); d.w = 0; d.h = 0 } } if (a !== null) { if (r && (t == null || t - r < 1e3)) { a = e.requestAnimationFrame(h) } else { a = setTimeout(h, n[o]); r = false } } } if (!e.requestAnimationFrame) { e.requestAnimationFrame = function () { return e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (t, i) { return e.setTimeout(function () { t((new Date).getTime()) }, n[l]) } }() } if (!e.cancelAnimationFrame) { e.cancelAnimationFrame = function () { return e.webkitCancelRequestAnimationFrame || e.mozCancelRequestAnimationFrame || e.oCancelRequestAnimationFrame || e.msCancelRequestAnimationFrame || clearTimeout }() } })(jQuery, this);
|
|
</script>
|
|
|
|
<script type="text/javascript">
|
|
var emulateNavUrl = "";
|
|
var USER_PREFERENCE_LASTPAGE_URL = "@Constants.USER_PREFERENCE_LASTPAGE_URL";
|
|
var USER_PREFERENCE_LASTPAGE_SECTION = "@Constants.USER_PREFERENCE_LASTPAGE_SECTION";
|
|
var USER_PREFERENCE_LASTPAGE_KEY = "@Constants.USER_PREFERENCE_LASTPAGE_KEY";
|
|
</script>
|
|
|
|
@RenderSection("scripts", required: false)
|
|
@Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "angular-common"))
|
|
|
|
<script type="text/javascript">
|
|
function loadQuickLink(qlId) {
|
|
blockUI();
|
|
$.ajax({
|
|
url: '@Url.Action("Edit", "UserQuickLink")' + (qlId != null ? "?Id=" + qlId : ""),
|
|
cache: false,
|
|
success: function (content) {
|
|
$('#editReloadQL').html(content);
|
|
$('#editQuickLink').modal('show');
|
|
initQuickLink();
|
|
},
|
|
error: function () {
|
|
showErrorModal();
|
|
},
|
|
complete: function () {
|
|
unblockUI();
|
|
},
|
|
});
|
|
|
|
return false;
|
|
}
|
|
|
|
function editQuickLink(e, aId, Id) {
|
|
e.stopPropagation();
|
|
loadQuickLink(Id);
|
|
return false;
|
|
}
|
|
|
|
function LoadDeleteQLModal(id) {
|
|
$.ajax({
|
|
url: '@Url.Action("Delete", "UserQuickLink")' + (id != null ? "?Id=" + id : ""),
|
|
cache: false,
|
|
success: function (content) {
|
|
$('#modal-deleteQuickLink .divForCreate').html(content);
|
|
$('#modal-deleteQuickLink').modal("show");
|
|
},
|
|
error: function () {
|
|
showErrorModal();
|
|
},
|
|
complete: function () {
|
|
unblockUI();
|
|
},
|
|
});
|
|
}
|
|
|
|
$(window).on('resize', function () {
|
|
var width = ($('div.navbar-inner').width() - 350) + 'px';
|
|
$('#navbarHeading, .navbarHeading-sm').css('width', width);
|
|
});
|
|
|
|
$(document).on('hide.bs.modal', '#editQuickLink', function (e) {
|
|
// skip modal hide event from datepickers
|
|
if ($(e.target).attr('id') != 'editQuickLink')
|
|
return true; // close modal form
|
|
// check that form has been changed
|
|
if (typeof isQLDataChanged === 'function')
|
|
// if form has been changed
|
|
if (isQLDataChanged()) {
|
|
// ask user for confirmation of form close
|
|
|
|
var msg = "Quick Link form contains unsaved changes, do you really want to close the form?";
|
|
bootbox.confirm(msg, function (result) {
|
|
if (result) {
|
|
if (typeof resetQLDataChanged === 'function') {
|
|
resetQLDataChanged();
|
|
}
|
|
$('#editQuickLink').modal('hide');
|
|
}
|
|
});
|
|
|
|
return false; // DO NOT close modal form
|
|
}
|
|
return true; // close modal form
|
|
}).on('hidden.bs.modal', function () {
|
|
StopEdit();
|
|
});
|
|
|
|
jQuery.validator.setDefaults({
|
|
highlight: function (element, errorClass, validClass) {
|
|
if (element.type === 'radio') {
|
|
this.findByName(element.name).addClass(errorClass).removeClass(validClass);
|
|
} else {
|
|
$(element).addClass(errorClass).removeClass(validClass);
|
|
//$(element).closest('.form-group').addClass('has-error');
|
|
}
|
|
},
|
|
unhighlight: function (element, errorClass, validClass) {
|
|
if (element.type === 'radio') {
|
|
this.findByName(element.name).removeClass(errorClass).addClass(validClass);
|
|
} else {
|
|
$(element).removeClass(errorClass).addClass(validClass);
|
|
//$(element).closest('.control-group').removeClass('has-error');
|
|
}
|
|
}
|
|
});
|
|
var chrome = /chrom(e|ium)/.test(navigator.userAgent.toLowerCase());
|
|
function _printDoc() {
|
|
beforePrint();
|
|
window.print();
|
|
}
|
|
var beforePrint = function () {
|
|
main_wrapper_paddingLeft = $("#main-wrapper").css("padding-left");
|
|
if (chrome == true) {
|
|
$("#main-wrapper").addClass('important-padding-left-0');
|
|
}
|
|
};
|
|
|
|
var afterPrint = function () {
|
|
//all browsers except Chrome hide left nav menu with correct print styleshet. Chrome does not, so we apply a workaround here
|
|
if (chrome == true) {
|
|
$("#main-wrapper").removeClass('important-padding-left-0');
|
|
}
|
|
};
|
|
function editView(id, btn) {
|
|
$('#generalModalContainer').viewsMgmt('editView', id, btn);
|
|
}
|
|
function deleteView(id, btn) {
|
|
$('#generalModalContainer').viewsMgmt('deleteView', id, btn);
|
|
}
|
|
init.push(function () {
|
|
$("span.field-validation-valid, span.field-validation-error").addClass('help-block');
|
|
//$("div.form-group").has("span.field-validation-error").addClass('has-error');
|
|
$("div.validation-summary-errors").has("li:visible").addClass("alert alert-block alert-danger");
|
|
$("body").on("mousemove", function (e) {
|
|
if (ResetInactivePeriod)
|
|
ResetInactivePeriod();
|
|
});
|
|
|
|
if (window.matchMedia) {
|
|
var mediaQueryList = window.matchMedia('print');
|
|
mediaQueryList.addListener(function (mql) {
|
|
if (mql.matches) {
|
|
beforePrint();
|
|
} else {
|
|
afterPrint();
|
|
}
|
|
});
|
|
}
|
|
|
|
if (typeof quickLinkData === 'undefined' && URI().query(true).linkId) {
|
|
$.ajax("/UserQuickLink/GetPreferences",
|
|
{
|
|
async: false,
|
|
data: { linkId: URI().query(true).linkId },
|
|
method: "POST",
|
|
success: function (response, textStatus, jqXHR) {
|
|
if (response && response.Status === "OK" && response.Data) {
|
|
quickLinkData = JSON.parse(response.Data);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
$('#generalModalContainer').viewsMgmt();
|
|
@*
|
|
window.onbeforeprint = beforePrint;
|
|
window.onafterprint = afterPrint;
|
|
*@
|
|
|
|
$(window).keydown(function (event) {
|
|
if ((event.ctrlKey || event.metaKey) && event.keyCode == 80) {
|
|
@* ctrl+P, ctrl+shift+P, cmd+P *@
|
|
beforePrint();
|
|
}
|
|
});
|
|
|
|
@Html.Raw(ViewBag.StartUpJS)
|
|
});
|
|
|
|
init.push(function () {
|
|
@if (!string.IsNullOrEmpty(((string)ViewBag.ssoToken)))
|
|
{
|
|
// UserVoice JavaScript SDK (only needed once on a page)
|
|
<text>
|
|
var quickLinkData;
|
|
(function () {
|
|
var uv = document.createElement('script'); uv.type = 'text/javascript';
|
|
uv.async = true; uv.src = '//widget.uservoice.com/IlZCovN2ONxaRFOhSX3apQ.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
|
|
})()
|
|
</text>
|
|
}
|
|
|
|
@* User Voice page widget *@
|
|
UserVoice = window.UserVoice || [];
|
|
UserVoice.push(['setSSO', '@ViewBag.ssoToken']);
|
|
UserVoice.push(['showTab', 'classic_widget', {
|
|
mode: 'full',
|
|
primary_color: '#499272',
|
|
link_color: '#003A21',
|
|
default_mode: 'support',
|
|
forum_id: 121373,
|
|
tab_label: 'Feedback & Support',
|
|
trigger_position: 'bottom-left',
|
|
tab_inverted: true,
|
|
trigger_style: 'icon',
|
|
trigger_background_color: '#FFFFFF',
|
|
trigger_color: '#499272'
|
|
}]);
|
|
});
|
|
|
|
function signalRLoaded() {
|
|
var srHub = document.createElement('script');
|
|
srHub.type = 'text/javascript';
|
|
srHub.async = true;
|
|
srHub.src = '@Url.Content("~/signalr/hubs")';
|
|
srHub.onload = signalRHubOpened;
|
|
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(srHub, s);
|
|
}
|
|
|
|
function signalRHubOpened() {
|
|
@* Init signalR, when it's script and hub data loaded *@
|
|
var notificationControllerScope = angular.element(document.getElementById('notification-container')).scope();
|
|
notificationControllerScope.init();
|
|
}
|
|
|
|
init.push(function () {
|
|
@* Load signalR scripts and Hub data dynamically. Step-by-step. SignalR script first. Open data hub then *@
|
|
var sr = document.createElement('script');
|
|
sr.type = 'text/javascript';
|
|
sr.async = true;
|
|
sr.src = '@Url.Content("~/Scripts/jquery.signalR-2.2.0.min.js")';
|
|
sr.onload = signalRLoaded;
|
|
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(sr, s);
|
|
});
|
|
|
|
window.PixelAdmin.start(init,
|
|
{
|
|
main_menu: {
|
|
store_state: true,
|
|
detect_active: true,
|
|
detect_active_predicate: function (href, url) {
|
|
return url === href || emulateNavUrl === "/" + href.replace(/^(?:\/\/|[^\/]+)*\//, "");
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
@MiniProfiler.RenderIncludes()
|
|
</body>
|
|
</html>
|