Skip to content
wiki.fftac.org

Manuscript Workstation - Source Excerpt 10

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

<a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($host_api_examples_url); ?>">API Examples</a>
                </div>
            <?php endif; ?>
        </div>
    </details>

    <?php if ($workstation_is_detail_route) : ?>
    <details class="spiralist-manuscript-workstation__drawer spiralist-manuscript-workstation__drawer--dossier" id="manuscript-pages" data-workstation-dossier-drawer>
        <summary>
            <span class="spiralist-manuscript-workstation__drawer-title">
                <span class="spiralist-manuscript-workstation__drawer-kicker">Codex Dossier</span>
                <span class="spiralist-manuscript-workstation__drawer-copy">Prompt record, related references, and metadata stay here when you need them.</span>
            </span>
            <span class="spiralist-manuscript-workstation__drawer-meta" aria-hidden="true">
                <span class="spiralist-manuscript-workstation__drawer-chip"><?php echo esc_html($dossier_summary); ?></span>
                <span class="spiralist-manuscript-workstation__drawer-chip"><?php echo esc_html((string) ($current_creation_prompt['status'] ?? 'Prompt pending')); ?></span>
                <span class="spiralist-manuscript-workstation__drawer-chip"><?php echo esc_html('Route ' . $current_page_sequence); ?></span>
            </span>
        </summary>
        <aside class="spiralist-book-page-dossier spiralist-book-page-dossier--reader spiralist-manuscript-reader__dossier">
            <div class="spiralist-book-page-dossier__intro">
                <div>
                    <p class="spiralist-section-tag">Book Dossier</p>
                    <h3 class="spiralist-card-title"><?php echo esc_html($current_section_title); ?></h3>
                    <p class="spiralist-muted">The workstation changes the reading surface, but the codex dossier still keeps notes, prompts, related references, and metadata in the same place.</p>
                    <?php if ($current_prompt_needs_attention) : ?>
                        <p class="spiralist-manuscript-reader__attention-copy">
                            <strong><?php echo esc_html($current_prompt_attention_title !== '' ? $current_prompt_attention_title : 'Prompt attention required'); ?></strong>
                            <?php echo esc_html($current_prompt_attention_copy); ?>
                        </p>
                    <?php endif; ?>
                </div>
                <div class="spiralist-book-page-dossier__status">
                    <span class="spiralist-status-pill <?php echo esc_attr($current_prompt_status_class); ?>"><?php echo esc_html((string) ($current_creation_prompt['status'] ?? 'Prompt pending')); ?></span>
                    <p class="spiralist-book-page-dossier__count"><?php echo esc_html($dossier_summary); ?></p>
                </div>
            </div>
            <?php if (!empty($folio_action_bridges)) : ?>
                <section class="spiralist-manuscript-folio-actions" aria-labelledby="manuscript-folio-actions-title">
                    <div class="spiralist-manuscript-folio-actions__head">
                        <p class="spiralist-section-tag">Use This Folio For</p>
                        <h4 id="manuscript-folio-actions-title">Send the page into a working prompt.</h4>
                        <p class="spiralist-muted">Each action opens the prompt workbench with this folio title, route, summary, caption, and keywords already loaded.</p>
                    </div>
                    <div class="spiralist-manuscript-folio-actions__grid">
                        <?php foreach ($folio_action_bridges as $folio_action_bridge) : ?>
                            <a class="spiralist-manuscript-folio-actions__card" href="<?php echo esc_url((string) $folio_action_bridge['url']); ?>">
                                <span><?php echo esc_html((string) $folio_action_bridge['kicker']); ?></span>
                                <strong><?php echo esc_html((string) $folio_action_bridge['title']); ?></strong>
                                <small><?php echo esc_html((string) $folio_action_bridge['copy']); ?></small>
                            </a>
                        <?php endforeach; ?>
                    </div>
                </section>
            <?php endif; ?>
            <div class="spiralist-tabs spiralist-book-page-tabs" data-tab-group>
            <div class="spiralist-tab-list" role="tablist" aria-label="Book page dossier tabs">
                <?php foreach ($dossier_tabs as $tab_key => $tab_label) : ?>
                    <?php $tab_is_active = $tab_key === 'overview'; ?>
                    <button
                        class="spiralist-tab <?php echo $tab_is_active ? 'is-active' : ''; ?>"
                        id="<?php echo esc_attr('manuscript-tab-' . $tab_key); ?>"
                        type="button"
                        role="tab"
                        data-tab-trigger="<?php echo esc_attr($tab_key); ?>"
                        aria-controls="<?php echo esc_attr('manuscript-panel-' . $tab_key); ?>"
                        aria-selected="<?php echo $tab_is_active ? 'true' : 'false'; ?>"
                        tabindex="<?php echo $tab_is_active ? '0' : '-1'; ?>"
                    >
                        <?php echo esc_html($tab_label); ?>
                    </button>
                <?php endforeach; ?>
            </div>

            <section class="spiralist-tab-panel spiralist-book-page-tab-panel is-active" data-tab-panel="overview" id="manuscript-panel-overview" role="tabpanel" aria-labelledby="manuscript-tab-overview">
                <div class="spiralist-book-page-overview">
                    <h3 class="spiralist-card-title"><?php echo esc_html($current_page_title); ?></h3>
                    <p class="spiralist-muted"><?php echo esc_html($current_page_summary); ?></p>
                    <p class="spiralist-muted"><?php echo esc_html($current_page_caption); ?></p>
                    <p class="spiralist-muted">This online-first, open-source book keeps every folio public, routable, and readable while the manuscript remains a coherent whole.</p>
                    <?php if ($section_note !== '') : ?>
                        <p class="spiralist-muted"><?php echo esc_html($section_note); ?></p>
                    <?php endif; ?>
                    <?php if ($page_count_note !== '') : ?>
                        <p class="spiralist-muted"><?php echo esc_html($page_count_note); ?></p>
                    <?php endif; ?>
                </div>
            </section>

            <section class="spiralist-tab-panel spiralist-book-page-tab-panel" data-tab-panel="prompt" id="manuscript-panel-prompt" role="tabpanel" aria-labelledby="manuscript-tab-prompt" hidden>
                <div class="spiralist-book-page-prompt">
                    <div class="spiralist-inline-meta">
                        <p class="spiralist-section-tag"><?php echo esc_html((string) ($current_creation_prompt['title'] ?? 'Prompt Used')); ?></p>
                        <span class="spiralist-status-pill <?php echo esc_attr($current_prompt_status_class); ?>"><?php echo esc_html((string) ($current_creation_prompt['status'] ?? 'Prompt pending')); ?></span>
                    </div>
                    <?php if ($current_prompt_needs_attention) : ?>
                        <div class="spiralist-manuscript-reader__attention-panel">
                            <h4><?php echo esc_html($current_prompt_attention_title !== '' ? $current_prompt_attention_title : 'Prompt attention required'); ?></h4>
                            <p><?php echo esc_html($current_prompt_attention_copy); ?></p>
                            <div class="spiralist-cta-row spiralist-cta-row--start">
                                <a class="spiralist-button spiralist-button--primary" href="<?php echo esc_url($host_prompts_url !== '' ? $host_prompts_url : $overview_url); ?>">Browse Public Prompt Library</a>
                                <?php if ($host_workspace_url !== '') : ?>
                                    <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($host_workspace_url); ?>">Open Workspace</a>
                                <?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?>
                    <p class="spiralist-muted"><?php echo esc_html((string) ($current_creation_prompt['summary'] ?? '')); ?></p>
                    <?php if (!empty($current_creation_prompt['source_slug'])) : ?>
                        <p class="spiralist-muted"><strong>Source slug:</strong> <?php echo esc_html((string) $current_creation_prompt['source_slug']); ?></p>
                    <?php endif; ?>