From 6b8b436ee2c3e9de8e1c5ba98ffc798728fa86aa Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sun, 5 Jan 2020 11:24:50 +0100 Subject: [PATCH] Info page updates --- Pages/Info.cshtml | 14 ++++++++++++-- c3stream.cs | 8 +++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Pages/Info.cshtml b/Pages/Info.cshtml index bcb8d47..d3defa9 100644 --- a/Pages/Info.cshtml +++ b/Pages/Info.cshtml @@ -23,7 +23,7 @@ } var title = talk.Title; - var speakers = talk.Persons.Aggregate((s, s1) => $"{s}, {s1}"); + var speakers = talk.Persons.Any() ? talk.Persons.Aggregate((s, s1) => $"{s}, {s1}") : ""; var description = talk.Description; if (string.IsNullOrEmpty(description)) { description = "<missing description>"; @@ -34,7 +34,8 @@ var file = $"{talk.Slug}.mp4"; var conference = c3stream.GetConferenceByEventGuid(talk.Guid); - var eventName = talk.Tags.Count > 1 ? conference.Acronym : talk.Tags[0].Replace("-", "-
"); + var eventName = talk.Tags.Count <= 1 ? conference.Acronym : talk.Tags[0]; + var logoPath = System.IO.Path.Combine(c3stream.CachePath, conference.Acronym, "logo.png"); var category = talk.Tags.Count switch { 0 => "", @@ -47,6 +48,14 @@ }; } +@if (System.IO.File.Exists(logoPath)) { + Conference logo +} +else { + Conference logo +} +
+ @if (isWatched) {

@title - @speakers

} @@ -57,6 +66,7 @@ else {

@title - @speakers

} +
@eventName - @category - @talk.Date?.Date.ToShortDateString()