@model PlotLine.Models.AuthoringSection @{ var add=Model.Kind.StartsWith("Add",StringComparison.Ordinal); var id="authoring-"+Model.Key;var compact=ViewData["CompactEditorial"] is true; }

@Model.Title

@if(Model.Kind=="Checklist"){} @if(add&&!compact){

Optional — keep a useful detail here when you need it.

} else if(!add&&Model.Kind!="Checklist"){ var readable=Model.Fields.Where(x=>(!compact||x.Name!="SortOrder")&&!string.IsNullOrWhiteSpace(Model.Value(x.Name)) && Model.Value(x.Name)!="false").ToArray(); @if(readable.Length==0&&!compact){

Nothing recorded yet. Add this when it helps your writing.

} @foreach(var f in (Model.Kind=="Goals"?readable.Take(1):readable)){var value=Model.Value(f.Name);
@if(f.Label!=Model.Title){@f.Label}@if(f.Type=="textarea"&&value.Length>280){

@value[..280]…

Read complete text

@value

}else{

@(f.Type=="checkbox"?"Yes":f.Type=="purpose"?Model.Purposes.FirstOrDefault(x=>x.Value==value).Label??"Recorded purpose":f.Type=="noteType"?Model.NoteTypes.FirstOrDefault(x=>x.Value==value).Label??"Recorded note":value)

}
} @if(Model.Kind=="Goals"&&readable.Length>1){
More chapter intentions@foreach(var f in readable.Skip(1)){
@f.Label

@Model.Value(f.Name)

}
} }