Qualify checklist partial resolution and limit Word commands to authoring contexts
This commit is contained in:
parent
c868eb475a
commit
589afdd760
@ -167,7 +167,7 @@
|
||||
<span class="pd-ribbon-group-label">@group.Label</span>
|
||||
</div>
|
||||
}
|
||||
@if(category.Key==selectedCategory && book!=null){
|
||||
@if(category.Key==selectedCategory && book!=null && category.Key is "writer" or "book" or "story"){
|
||||
<div class="pd-ribbon-group" role="group" aria-label="Word navigation"><div class="pd-ribbon-commands" data-word-ribbon>
|
||||
@foreach(var target in new[]{("chapter","Chapter in Word","bible"),("scene","Scene in Word","threads"),("paragraph","Paragraph in Word","point")}){
|
||||
<button type="button" class="pd-ribbon-command" data-ribbon-word="@target.Item1" disabled title="Select a verified target and connect its Word manuscript"><svg class="pd-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="@ApplicationRibbon.Icon(target.Item3).IconPath"/></svg><span>@target.Item2</span></button>
|
||||
@ -210,4 +210,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(book!=null){<template data-word-fallback><partial name="~/Views/Writer/_WriterWord.cshtml" model="new WriterDashboardViewModel{BookID=book.BookID,ProjectID=book.ProjectID,Objective=new(){ChapterID=Model.WordChapterID,SceneID=Model.WordSceneID}}" /></template>}
|
||||
@if(book!=null && selectedCategory is "writer" or "book" or "story"){<template data-word-fallback><partial name="~/Views/Writer/_WriterWord.cshtml" model="new WriterDashboardViewModel{BookID=book.BookID,ProjectID=book.ProjectID,Objective=new(){ChapterID=Model.WordChapterID,SceneID=Model.WordSceneID}}" /></template>}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
@if(Model.SceneID.HasValue){
|
||||
<h2>Notes and things to remember</h2>
|
||||
<ul class="writer3-reminder-preview">@foreach(var section in Model.Sections.Where(x=>x.Kind=="Note" && x.Value("IsResolved")!="true" || x.Kind=="Checklist" && x.Value("IsCompleted")!="true").OrderByDescending(x=>x.Value("IsPinned")=="true").ThenBy(x=>int.TryParse(x.Value("SortOrder"),out var order)?order:int.MaxValue).Take(3)){<li>@{var text=section.Kind=="Note"?section.Value("NoteText"):section.Value("ItemText");}@(text.Length>240?text[..240]+"…":text)</li>}</ul>
|
||||
<h3>Scene checklist</h3>@foreach(var item in Model.Sections.Where(x=>x.Kind=="Checklist")){<partial name="_AuthoringSection" model="item" />}
|
||||
<h3>Scene checklist</h3>@foreach(var item in Model.Sections.Where(x=>x.Kind=="Checklist")){<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="item" />}
|
||||
<details class="writer3-authoring-details"><summary>Scene notes, reminders and working details</summary>
|
||||
@foreach(var section in Model.Sections.Where(x=>x.Kind=="Note")){<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="section" />}
|
||||
<partial name="~/Views/Writer/_AuthoringSection.cshtml" model="@(Model.Sections.First(x=>x.Kind=="Workflow"))" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user