Page Manuscript - Source Excerpt 02
Summary
This source excerpt preserves a bounded section of Spiralist/wp-content/plugins/ns12-manuscript/templates/page-manuscript.php so readers can inspect the evidence without opening the full source file.
**Source path:** Spiralist/wp-content/plugins/ns12-manuscript/templates/page-manuscript.php
$section_note = (string) ($active_section_record['summary'] ?? '');
} elseif ($requested_folio !== '' && !empty($current_page)) {
$hero_copy = sprintf(
'%s is now its own dedicated folio route: folio %d of %d, still connected to the full manuscript.',
$current_page_title,
$current_page_sequence,
max(1, $manuscript_page_count)
);
}
if (!$is_primary_study_surface) {
$study_copy = sprintf(
'%s is presented as a direct folio route. Use the folio rail and spread tools to move between adjacent folios, or return to the study surface for overlay-based symbol inspection.',
$current_page_title
);
}
$reader_copy = trim($hero_copy);
if ($reader_copy !== '') {
$reader_copy .= ' ';
}
$reader_copy .= 'Use the workstation folio rail, dedicated folio routes, zoom controls, and dossier tabs to read and inspect the manuscript without losing the codex structure.';
$workstation_folios = spiralist_book_pages_get_manuscript_workstation_folio_records($visible_pages);
$workstation_spread = spiralist_book_pages_get_manuscript_workstation_spread($visible_pages, $current_page);
$workstation_can_edit = false;
$workstation_action_links = [];
?>
<main class="spiralist-page spiralist-page--manuscript">
<div class="spiralist-page--manuscript__stage">
<section class="spiralist-page-section--manuscript-focus" id="manuscript-study">
<div class="spiralist-shell spiralist-shell--manuscript-stage">
<?php if ($requested_route_missing) : ?>
<article class="spiralist-panel spiralist-panel--viewer">
<p class="spiralist-section-tag">Manuscript Route Not Found</p>
<h1 class="spiralist-section-title">This folio is not in the public manuscript.</h1>
<p class="spiralist-muted">
The requested manuscript route does not match a published folio or chapter in the current codex.
</p>
<div class="spiralist-cta-row spiralist-cta-row--start">
<a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($overview_url); ?>">Open Manuscript</a>
<?php if (!empty($section_records)) : ?>
<a class="spiralist-button spiralist-button--secondary" href="#manuscript-route-index">Browse Chapters</a>
<?php endif; ?>
<?php if (!empty($host_links['home'])) : ?>
<a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url((string) $host_links['home']); ?>">Return Home</a>
<?php endif; ?>
</div>
</article>
<?php if (!empty($section_records)) : ?>
<article class="spiralist-panel" id="manuscript-route-index">
<p class="spiralist-section-tag">Available Manuscript Chapters</p>
<div class="spiralist-simple-list">
<?php foreach ($section_records as $section_record) : ?>
<a class="spiralist-simple-list__item" href="<?php echo esc_url((string) ($section_record['url'] ?? $overview_url)); ?>">
<span class="spiralist-simple-list__meta"><?php echo esc_html((string) ($section_record['label'] ?? 'Section')); ?></span>
<strong><?php echo esc_html((string) ($section_record['title'] ?? 'Manuscript Chapter')); ?></strong>
<span><?php echo esc_html(sprintf('%d folio%s', (int) ($section_record['count'] ?? 0), (int) ($section_record['count'] ?? 0) === 1 ? '' : 's')); ?></span>
</a>
<?php endforeach; ?>
</div>
</article>
<?php endif; ?>
<?php elseif ($current_page_image !== '') : ?>
<?php include SPIRALIST_BOOK_PAGES_PLUGIN_TEMPLATE_PATH . DIRECTORY_SEPARATOR . 'manuscript-workstation.php'; ?>
<?php
$discussion_context = (!$requested_route_missing && $requested_folio !== '')
? spiralist_book_pages_get_discussion_context_for_manuscript_folio(
(array) $current_page,
(string) $current_page_route_url
)
: [];
?>
<?php if (!empty($discussion_context)) : ?>
<?php spiralist_book_pages_render_discussion_panel($discussion_context); ?>
<?php endif; ?>
<?php else : ?>
<div class="spiralist-grid spiralist-grid--split">
<article class="spiralist-panel">
<p class="spiralist-section-tag">Manuscript Status</p>
<h2 class="spiralist-section-title">Manuscript Image Not Found</h2>
<p>The manuscript image set is not currently available in this environment. Add the folio assets and re-open this page to restore the workstation.</p>
</article>
<article class="spiralist-panel spiralist-panel--preview">
<?php if ($preview_image !== '') : ?>
<img src="<?php echo esc_url($preview_image); ?>" alt="Preview of the Spiralist manuscript" loading="lazy" decoding="async" />
<?php else : ?>
<div class="spiralist-manuscript__fallback" aria-hidden="true"></div>
<?php endif; ?>
</article>
</div>
<?php endif; ?>
</div>
</section>
</div>
</main>
<?php
get_footer();