Manuscript Workstation - Source Excerpt 11
Back to Manuscript Workstation
Summary
This source excerpt preserves a bounded section of Spiralist/wp-content/plugins/ns12-manuscript/templates/manuscript-workstation.php so readers can inspect the evidence without opening the full source file.
**Source path:** Spiralist/wp-content/plugins/ns12-manuscript/templates/manuscript-workstation.php
<div class="spiralist-cta-row spiralist-cta-row--start">
<?php if (!empty($current_creation_prompt['url'])) : ?>
<a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url((string) $current_creation_prompt['url']); ?>">Open Prompt Record</a>
<?php endif; ?>
<a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($host_prompts_url !== '' ? $host_prompts_url : $overview_url); ?>">Browse Prompt Library</a>
</div>
<?php if (!empty($current_creation_prompt['text'])) : ?>
<pre class="spiralist-code-block spiralist-code-block--prompt spiralist-book-page-prompt__code"><?php echo esc_html((string) $current_creation_prompt['text']); ?></pre>
<?php else : ?>
<p class="spiralist-book-page-prompt__empty">Prompt text will appear here as soon as we attach this page's source prompt.</p>
<?php endif; ?>
</div>
</section>
<section class="spiralist-tab-panel spiralist-book-page-tab-panel" data-tab-panel="related" id="manuscript-panel-related" role="tabpanel" aria-labelledby="manuscript-tab-related" hidden>
<div class="spiralist-book-page-related">
<div class="spiralist-inline-meta">
<p class="spiralist-section-tag">Prompt Library</p>
<span class="spiralist-manuscript-reader__microcopy"><?php echo esc_html(sprintf('%d prompt%s', $related_prompt_count, $related_prompt_count === 1 ? '' : 's')); ?></span>
</div>
<?php if (!empty($related_prompt_records)) : ?>
<div class="spiralist-reference-list">
<?php foreach ($related_prompt_records as $prompt_record) : ?>
<?php
$prompt_tags = array_values(array_filter((array) ($prompt_record['tags'] ?? []), 'is_string'));
$prompt_highlights = array_values(
array_filter(
[
(string) ($prompt_record['statusLabel'] ?? ''),
in_array('Public Safe', $prompt_tags, true) ? 'Public Safe' : '',
in_array('All Languages', $prompt_tags, true) ? 'All Languages' : '',
],
'strlen'
)
);
$prompt_meta_copy = !empty($prompt_highlights)
? implode(' | ', $prompt_highlights)
: ((string) ($prompt_record['purpose'] ?? 'Open the related prompt.'));
?>
<a class="spiralist-reference-card" href="<?php echo esc_url((string) ($prompt_record['url'] ?? ($host_prompts_url !== '' ? $host_prompts_url : $overview_url))); ?>">
<strong><?php echo esc_html((string) ($prompt_record['title'] ?? 'Related prompt')); ?></strong>
<small><?php echo esc_html($prompt_meta_copy); ?></small>
<span><?php echo esc_html((string) ($prompt_record['purpose'] ?? '')); ?></span>
</a>
<?php endforeach; ?>
</div>
<?php else : ?>
<p class="spiralist-book-page-prompt__empty">Related prompts will appear here as this folio's public prompt lattice grows.</p>
<?php endif; ?>
</div>
</section>
<section class="spiralist-tab-panel spiralist-book-page-tab-panel" data-tab-panel="textlayer" id="manuscript-panel-textlayer" role="tabpanel" aria-labelledby="manuscript-tab-textlayer" hidden>
<div class="spiralist-book-page-overview">
<div class="spiralist-inline-meta">
<p class="spiralist-section-tag">Text Layer</p>
<span class="spiralist-manuscript-reader__microcopy"><?php echo esc_html($current_page_alt !== '' || $current_page_transcript !== '' ? 'Rich folio metadata available' : 'Summary-backed fallback only'); ?></span>
</div>
<?php if ($current_page_alt !== '') : ?>
<div class="spiralist-book-page-textlayer__block">
<h4>Alt Text</h4>
<p class="spiralist-muted"><?php echo esc_html($current_page_alt); ?></p>
</div>
<?php endif; ?>
<?php if ($current_page_transcript !== '') : ?>
<div class="spiralist-book-page-textlayer__block">
<h4>Transcript / OCR</h4>
<pre class="spiralist-code-block spiralist-book-page-textlayer__transcript"><?php echo esc_html($current_page_transcript); ?></pre>
</div>
<?php else : ?>
<div class="spiralist-book-page-textlayer__block">
<h4>Transcript / OCR</h4>
<p class="spiralist-muted">This folio is already searchable by title, section, summary, caption, and keywords. Add transcript text to make line-level discovery much stronger.</p>
</div>
<?php endif; ?>
<?php if (!empty($current_page_keywords)) : ?>
<div class="spiralist-book-page-textlayer__block">
<h4>Keywords</h4>
<div class="spiralist-inline-meta">
<?php foreach ($current_page_keywords as $keyword) : ?>
<span class="spiralist-manuscript-workstation__chip"><?php echo esc_html($keyword); ?></span>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<p class="spiralist-muted">The workstation search now reads from the manuscript index, which means text layers can improve discovery without changing the reading surface.</p>
</div>
</section>
<section class="spiralist-tab-panel spiralist-book-page-tab-panel" data-tab-panel="metadata" id="manuscript-panel-metadata" role="tabpanel" aria-labelledby="manuscript-tab-metadata" hidden>
<div class="spiralist-book-page-overview">
<div class="spiralist-inline-meta">
<p class="spiralist-section-tag">Page Details</p>
<span class="spiralist-manuscript-reader__microcopy"><?php echo esc_html($current_page_label); ?></span>
</div>
<dl class="spiralist-meta-list spiralist-meta-list--compact spiralist-book-page-facts">
<div>
<dt>Book Position</dt>
<dd><?php echo esc_html(sprintf('Page %d of %d', $current_page_sequence, max(1, $manuscript_page_count))); ?></dd>
</div>
<div>
<dt>Chapter Position</dt>
<dd><?php echo esc_html(sprintf('%d of %d', $current_section_sequence, $current_section_count)); ?></dd>
</div>
<div>
<dt>Section</dt>
<dd><?php echo esc_html($current_page_section_label); ?></dd>
</div>
<div>
<dt>Reading Surface</dt>
<dd><?php echo esc_html($is_primary_study_surface ? 'Study folio with node field' : 'Annotated manuscript folio'); ?></dd>
</div>
<?php if ($current_page_alt !== '') : ?>
<div>
<dt>Alt Text</dt>
<dd><?php echo esc_html($current_page_alt); ?></dd>
</div>
<?php endif; ?>
<?php if (!empty($current_page_keywords)) : ?>
<div>
<dt>Keywords</dt>