PlotDirector/PlotLine/Views/Writer/_SessionHistory.cshtml

8 lines
1.5 KiB
Plaintext

@model WriterDashboardViewModel
@{var work=Model.Work??new PlotLine.Models.WriterWorkPage{BookID=Model.BookID??0};}
<label>Filter sessions <input type="search" data-session-filter class="form-control" placeholder="Activity, chapter or note" /></label><div class="writer21-bounded" data-session-history>
<h3 class="mt-3">@(work.Day.HasValue?"Sessions on this day":"Recent sessions")</h3>
@foreach(var session in work.Sessions.Take(20)){<article class="writer-reminder"><strong>@session.Kind · @(session.ChapterTitle??"Across the book")</strong><p>@session.StartedUtc.ToString("d MMM yyyy HH:mm") · @(session.EndedUtc.HasValue?Math.Round((session.EndedUtc.Value-session.StartedUtc).TotalMinutes)+" minutes elapsed":"Session open")</p>@if(!string.IsNullOrWhiteSpace(session.Note)){<p class="review-recorded">@session.Note</p>}<details><summary>Recording details</summary><p>This session was started explicitly. Elapsed time is not active time. @Math.Floor(session.EngagedSeconds/60d) browser-engaged minutes and @Math.Floor(session.PlaybackSeconds/60) observed playback minutes may overlap and are not added. Dates use UTC.</p>@if(session.ChangesDuringSession>0){<p>@session.ChangesDuringSession accepted manuscript changes were recorded during this interval; this association does not establish what caused them.</p>}</details></article>}
<a asp-controller="WriterWork" asp-action="Export" asp-route-bookId="@work.BookID" asp-route-day="@work.Day?.ToString("yyyy-MM-dd")">Export recent session evidence (up to 50)</a>
</div>