@using EnVisage.Models @using EnVisage.Code @using StackExchange.Profiling @ViewBag.Title - Prevu @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") @{ var currviews = new List(); var currteams = new List(); var currlinks = new List(); 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) 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()); }
@if (User.Identity.IsAuthenticated && User.Identity.GetID() != Guid.Empty.ToString()) { }
@RenderBody()
@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*@ @RenderSection("scripts", required: false) @Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "angular-common")) @MiniProfiler.RenderIncludes()