using GreenTree.Nachtragsmanagement.Core.Authentication; using GreenTree.Nachtragsmanagement.Web.Models.Global; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace GreenTree.Nachtragsmanagement.Web.Controllers { public class GlobalController : Controller { private readonly IUserHelper _userHelper; public GlobalController( IUserHelper userHelper) { _userHelper = userHelper; } /// /// Represents the global Footer /// public ActionResult Footer() { var currentUser = _userHelper.FromCookies(); if (currentUser == null) return View("~/Views/Shared/_Footer.cshtml", null); var footerModel = new FooterModel { CustomNumber = currentUser.CustomId, Forename = currentUser.Forename, Lastname = currentUser.Lastname }; return View("~/Views/Shared/_Footer.cshtml", footerModel); } } }