Navigation tidy up 1C
This commit is contained in:
parent
5d2a435892
commit
efa514a2e4
@ -1,6 +1,27 @@
|
||||
@model ArchivedItemsViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Archived Items";
|
||||
ViewData["ProjectSection"] = "Archive";
|
||||
var selectedProject = Model.ProjectID.HasValue
|
||||
? Model.ProjectOptions.FirstOrDefault(x => x.Value == Model.ProjectID.Value.ToString())
|
||||
: null;
|
||||
var projectNavigation = Model.ProjectID.HasValue
|
||||
? new Project { ProjectID = Model.ProjectID.Value, ProjectName = selectedProject?.Text ?? "Project" }
|
||||
: null;
|
||||
}
|
||||
|
||||
<nav class="breadcrumb-trail" aria-label="Breadcrumb">
|
||||
<a asp-controller="Projects" asp-action="Index">Projects</a>
|
||||
@if (projectNavigation is not null)
|
||||
{
|
||||
<a asp-controller="Projects" asp-action="Details" asp-route-id="@projectNavigation.ProjectID">@projectNavigation.ProjectName</a>
|
||||
}
|
||||
<span>Archived Items</span>
|
||||
</nav>
|
||||
|
||||
@if (projectNavigation is not null)
|
||||
{
|
||||
<partial name="_ProjectSectionNav" model="projectNavigation" />
|
||||
}
|
||||
|
||||
<div class="page-heading">
|
||||
|
||||
@ -23,14 +23,21 @@
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<a class="btn btn-outline-secondary" asp-action="Edit" asp-route-id="@Model.Book.BookID">Edit book</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Timeline" asp-action="Index" asp-route-projectId="@Model.Project.ProjectID" asp-route-bookId="@Model.Book.BookID">Timeline</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Analytics" asp-action="Index" asp-route-projectId="@Model.Project.ProjectID" asp-route-bookId="@Model.Book.BookID">Story health</a>
|
||||
<a class="btn btn-primary" asp-controller="Chapters" asp-action="Create" asp-route-bookId="@Model.Book.BookID">Add chapter</a>
|
||||
<form asp-action="Archive" method="post" class="archive-button-form" data-confirm-message="Archive this book? This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
|
||||
<input type="hidden" name="id" value="@Model.Book.BookID" />
|
||||
<input type="hidden" name="projectId" value="@Model.Project.ProjectID" />
|
||||
<button class="btn btn-outline-danger" type="submit">Archive Book</button>
|
||||
</form>
|
||||
<div class="dropdown pw-actions">
|
||||
<button class="btn pw-actions__toggle dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Actions
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" asp-controller="Analytics" asp-action="Index" asp-route-projectId="@Model.Project.ProjectID" asp-route-bookId="@Model.Book.BookID">Story health</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<form asp-action="Archive" method="post" class="archive-button-form" data-confirm-message="Archive this book? This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
|
||||
<input type="hidden" name="id" value="@Model.Book.BookID" />
|
||||
<input type="hidden" name="projectId" value="@Model.Project.ProjectID" />
|
||||
<button class="dropdown-item text-danger" type="submit">Archive Book</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -27,15 +27,21 @@
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<a class="btn btn-outline-secondary" asp-action="Edit" asp-route-id="@Model.Chapter.ChapterID">Edit chapter</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Timeline" asp-action="Index" asp-route-projectId="@Model.Project.ProjectID" asp-route-bookId="@Model.Book.BookID">Timeline</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Writer" asp-action="Chapter" asp-route-id="@Model.Chapter.ChapterID">Chapter workflow</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Exports" asp-action="ChapterBrief" asp-route-id="@Model.Chapter.ChapterID">Chapter brief</a>
|
||||
<a class="btn btn-primary" asp-controller="Scenes" asp-action="Create" asp-route-chapterId="@Model.Chapter.ChapterID">Add scene</a>
|
||||
<form asp-action="Archive" method="post" class="archive-button-form" data-confirm-message="Archive this chapter? This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
|
||||
<input type="hidden" name="id" value="@Model.Chapter.ChapterID" />
|
||||
<input type="hidden" name="bookId" value="@Model.Book.BookID" />
|
||||
<button class="btn btn-outline-danger" type="submit">Archive Chapter</button>
|
||||
</form>
|
||||
<div class="dropdown pw-actions">
|
||||
<button class="btn pw-actions__toggle dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Actions
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<form asp-action="Archive" method="post" class="archive-button-form" data-confirm-message="Archive this chapter? This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
|
||||
<input type="hidden" name="id" value="@Model.Chapter.ChapterID" />
|
||||
<input type="hidden" name="bookId" value="@Model.Book.BookID" />
|
||||
<button class="dropdown-item text-danger" type="submit">Archive Chapter</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -20,18 +20,19 @@
|
||||
<p class="lead-text">@Model.Project.Description</p>
|
||||
}
|
||||
</div>
|
||||
<div class="dropdown pw-actions">
|
||||
<button class="btn pw-actions__toggle dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Actions
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" asp-action="Edit" asp-route-id="@Model.Project.ProjectID">Edit project</a>
|
||||
<div class="button-row">
|
||||
<a class="btn btn-outline-secondary" asp-action="Edit" asp-route-id="@Model.Project.ProjectID">Edit project</a>
|
||||
<a class="btn btn-primary" asp-controller="Books" asp-action="Create" asp-route-projectId="@Model.Project.ProjectID">Add book</a>
|
||||
<div class="dropdown pw-actions">
|
||||
<button class="btn pw-actions__toggle dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Actions
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<a class="dropdown-item" asp-action="Activity" asp-route-id="@Model.Project.ProjectID">Activity</a>
|
||||
@if (Model.Project.IsOwner)
|
||||
{
|
||||
<a class="dropdown-item" asp-controller="ProjectCollaborators" asp-action="Index" asp-route-projectId="@Model.Project.ProjectID">Collaborators</a>
|
||||
}
|
||||
<a class="dropdown-item" asp-controller="Books" asp-action="Create" asp-route-projectId="@Model.Project.ProjectID">Add book</a>
|
||||
@if (Model.Project.IsOwner)
|
||||
{
|
||||
<a class="dropdown-item" asp-controller="Exports" asp-action="ProjectBackup" asp-route-projectId="@Model.Project.ProjectID">Download Project Backup</a>
|
||||
@ -46,6 +47,7 @@
|
||||
<button class="dropdown-item text-danger" type="submit">Archive Project</button>
|
||||
</form>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -37,13 +37,19 @@
|
||||
<a class="btn btn-outline-primary" asp-controller="Exports" asp-action="SceneBrief" asp-route-id="@Model.SceneID">Scene brief</a>
|
||||
<a class="btn btn-outline-secondary" asp-controller="Exports" asp-action="SceneBrief" asp-route-id="@Model.SceneID" asp-route-format="markdown">Markdown</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Exports" asp-action="WritingSession" asp-route-sceneId="@Model.SceneID">Prepare Writing Session</a>
|
||||
<form asp-action="Archive" method="post" class="archive-button-form" data-confirm-message="Archive this scene? This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
|
||||
<input type="hidden" name="id" value="@Model.SceneID" />
|
||||
<input type="hidden" name="chapterId" value="@Model.ChapterID" />
|
||||
<button class="btn btn-outline-danger" type="submit">Archive Scene</button>
|
||||
</form>
|
||||
<div class="dropdown pw-actions">
|
||||
<button class="btn pw-actions__toggle dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Actions
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end">
|
||||
<form asp-action="Archive" method="post" class="archive-button-form" data-confirm-message="Archive this scene? This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
|
||||
<input type="hidden" name="id" value="@Model.SceneID" />
|
||||
<input type="hidden" name="chapterId" value="@Model.ChapterID" />
|
||||
<button class="dropdown-item text-danger" type="submit">Archive Scene</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<a class="btn btn-outline-secondary" asp-controller="Chapters" asp-action="Details" asp-route-id="@Model.ChapterID">Back to chapter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -230,14 +230,10 @@
|
||||
|
||||
<div class="inspector-actions">
|
||||
<button class="btn btn-primary" type="submit">Save scene</button>
|
||||
@if (!Model.ReturnToTimeline)
|
||||
{
|
||||
<a class="btn btn-outline-secondary" asp-controller="Chapters" asp-action="Details" asp-route-id="@Model.ChapterID">Back to chapter</a>
|
||||
}
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@if (Model.SceneID > 0)
|
||||
@if (Model.SceneID > 0 && Model.ReturnToTimeline)
|
||||
{
|
||||
<form asp-controller="Scenes" asp-action="Archive" method="post" class="inspector-archive-form archive-button-form mt-2" data-confirm-message="Archive this scene? This will hide it from active lists and timelines, but the data will be kept and can be restored later.">
|
||||
<input type="hidden" name="id" value="@Model.SceneID" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user