public PartialViewResult DoubleMetroTileForSponsors() { var tileViewModel = new MetroTileViewModel { TileLinkActionName = "Sponsors", TileLinkControllerName = "Home", TileDisplayName = "Sponsors", TileBackgroundCssClass = "blueLightTile" // "singleTileGreenImage", }; var defaultEvent = service.GetDefaultEvent(); var sponsors = new List<Service.Webhost.Services.Sponsor>(service.GetSponsors(defaultEvent.ID)); foreach (var sponsor in sponsors) { if (!string.IsNullOrEmpty(sponsor.Name) && sponsor.Image != null) { tileViewModel.MetroTileIcons.Add(new MetroTileImage(new Infrastructure.WebImageOCC(sponsor.Image)) { AltText = sponsor.Name, Title = string.Format("{0} ({1} sponsor)", sponsor.Name, sponsor.SponsorshipLevel.Replace("sponsor", String.Empty)), AnchorTagUri = sponsor.WebsiteUrl }); } } tileViewModel.MetroTileIcons.Shuffle(); return PartialView("_DoubleMetroTile", tileViewModel); }
public PartialViewResult DoubleMetroTileForCCPhotos() { var tileViewModel = new MetroTileViewModel { TileLinkActionName = "Index", TileLinkControllerName = "Home", TileDisplayName = "Codecamp Photos", TileBackgroundCssClass = "greenTile" }; tileViewModel.MetroTileIcons.Add(new MetroTileImage("~/Content/Avatar/2014.jpg") { AltText = "Codecamp Photos", Title = "Codecamp Photos", }); return PartialView("_DoubleMetroTile", tileViewModel); }
public PartialViewResult SingleMetroTileForVolunteers() { var tileViewModel = new MetroTileViewModel { TileLinkActionName = "Volunteers", TileLinkControllerName = "Home", TileDisplayName = "Volunteers", DefaultTileImage = new MetroTileImage("../../Content/themes/Metro/MetroIcons/QVolunteer.png") { AltText = "Volunteers", Title = "Volunteers" }, TileBackgroundCssClass = "limeTile" }; return PartialView("_SingleMetroTile", tileViewModel); }
public PartialViewResult SingleMetroTileForVenue() { var tileViewModel = new MetroTileViewModel { TileLinkActionName = "Venue", TileLinkControllerName = "Home", TileDisplayName = "Venue", TileBackgroundCssClass = "singleTileMapImage", DefaultTileImage = new MetroTileImage("../../Content/themes/Metro/MetroIcons/BlankImage-1x1.png") { AltText = "Venue", Title = "Venue" } }; return PartialView("_SingleMetroTile", tileViewModel); }
public PartialViewResult SingleMetroTileForSpeakers() { var defaultEvent = service.GetDefaultEvent(); int speakersCount = service.GetSpeakersCount(defaultEvent.ID); var tileViewModel = new MetroTileViewModel { TileLinkActionName = "Speakers", TileLinkControllerName = "Home", TileDisplayName = "Speakers", TileBackgroundCssClass = "redTile", DefaultTileImage = new MetroTileImage("../../Content/themes/Metro/MetroIcons/QSpeaker.png") { AltText = "Speakers", Title = "Speakers" }, TileNotificationMessage = speakersCount.ToString() }; return PartialView("_SingleMetroTile", tileViewModel); }
public PartialViewResult SingleMetroTileForAgenda() { var tileViewModel = new MetroTileViewModel { TileLinkActionName = "Agenda", TileLinkControllerName = "Home", TileDisplayName = "Agenda", TileBackgroundCssClass = "greenTile", DefaultTileImage = new MetroTileImage("../../Content/themes/Metro/MetroIcons/QAgenda.png") { AltText = "Agenda", Title = "Agenda" } }; return PartialView("_SingleMetroTile", tileViewModel); }
public PartialViewResult SingleMetroTileForAccount() { MetroTileImage metroTileImage = null; MetroTileViewModel metroTileViewModel = null; if (CurrentUser != null) { metroTileViewModel = new MetroTileViewModel { TileLinkActionName = "UpdateProfile", TileLinkControllerName = "Account", TileDisplayName = "Update Profile", TileBackgroundCssClass = "singleTileGreenImage" }; var user = CurrentUser; if (!String.IsNullOrEmpty(user.ImageUrl)) { metroTileImage = new MetroTileImage(user.ImageUrl) { AltText = user.FullName, Title = string.Format("Welcome, {0}", user.FirstName) }; } } else { metroTileViewModel = new MetroTileViewModel { TileLinkActionName = "LogOn", TileLinkControllerName = "Account", TileDisplayName = "Login / Register", TileBackgroundCssClass = "singleTileGreenImage" }; metroTileImage = new MetroTileImage("../../Content/themes/Shared/BlankUser.png") { AltText = "Login or Register", Title = "Login or Register" }; } if (metroTileImage == null) { metroTileImage = new MetroTileImage("../../Content/themes/Shared/BlankUser.png") { AltText = "Login or Register", Title = "Login or Register" }; } metroTileViewModel.MetroTileIcons.Add(item: metroTileImage); metroTileViewModel.MetroTileIcons.Add(new MetroTileImage("../../Content/themes/Shared/SpaceNeedle.ico") { AltText = "The only tug", Title = "The only tug" }); return PartialView("_SingleMetroTile", metroTileViewModel); }