Skip to content
wiki.fftac.org

Manuscript Workstation - Source Excerpt 07

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-manuscript-workstation__viewer-toolbar" role="toolbar" aria-label="Viewer tools">
                    <?php if ($workstation_can_edit) : ?>
                        <div class="spiralist-manuscript-workstation__viewer-group" role="group" aria-label="Fit controls">
                            <button class="spiralist-reader-mode-button is-active" type="button" data-workstation-fit="width" aria-pressed="true">Fit Width</button>
                            <button class="spiralist-reader-mode-button" type="button" data-workstation-fit="height" aria-pressed="false">Fit Height</button>
                            <button class="spiralist-reader-mode-button" type="button" data-workstation-fit="actual" aria-pressed="false">100%</button>
                        </div>
                    <?php endif; ?>
                    <?php if ($show_layout_controls) : ?>
                        <div class="spiralist-manuscript-workstation__viewer-group" role="group" aria-label="Page layout">
                            <button class="spiralist-reader-mode-button <?php echo $initial_view_mode === 'spread' ? 'is-active' : ''; ?>" type="button" data-workstation-view-mode="spread" aria-pressed="<?php echo $initial_view_mode === 'spread' ? 'true' : 'false'; ?>"><?php echo esc_html($layout_spread_label); ?></button>
                            <button class="spiralist-reader-mode-button <?php echo $initial_view_mode === 'single' ? 'is-active' : ''; ?>" type="button" data-workstation-view-mode="single" aria-pressed="<?php echo $initial_view_mode === 'single' ? 'true' : 'false'; ?>"><?php echo esc_html($layout_single_label); ?></button>
                        </div>
                    <?php endif; ?>
                    <?php if ($workstation_is_detail_route) : ?>
                        <div class="spiralist-manuscript-workstation__viewer-group spiralist-manuscript-workstation__viewer-group--links" role="group" aria-label="Folio image links">
                            <?php if (!$is_primary_study_surface && $study_surface_url !== '') : ?>
                                <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($study_surface_url); ?>">Study Surface</a>
                            <?php endif; ?>
                            <?php if ($current_download_url !== '') : ?>
                                <a class="spiralist-button <?php echo $is_primary_study_surface ? 'spiralist-button--primary' : 'spiralist-button--secondary'; ?>" href="<?php echo esc_url($current_download_url); ?>" target="_blank" rel="noopener noreferrer">Full Resolution</a>
                                <a class="spiralist-button spiralist-button--secondary" href="<?php echo esc_url($current_download_url); ?>" download>Download</a>
                            <?php endif; ?>
                        </div>
                    <?php endif; ?>
                    <div class="spiralist-manuscript-workstation__viewer-group" role="group" aria-label="Inspection toggles">
                        <button class="spiralist-reader-mode-button" type="button" data-workstation-toggle="raw" aria-pressed="false"><?php echo esc_html($raw_mode_label); ?></button>
                        <?php if ($workstation_can_edit) : ?>
                            <button class="spiralist-reader-mode-button is-active" type="button" data-workstation-toggle="guides" aria-pressed="true">Crop Guides</button>
                        <?php endif; ?>
                        <button class="spiralist-reader-mode-button <?php echo $study_overlay_available ? '' : 'is-disabled'; ?>" type="button" data-workstation-toggle="overlay" aria-pressed="false" <?php disabled(!$study_overlay_available); ?>>Study Overlay</button>
                    </div>
                </div>
            </div>

            <div class="spiralist-manuscript-workstation__viewport" data-workstation-viewport tabindex="0" aria-label="<?php echo esc_attr($workstation_is_detail_route ? ('Workstation viewer for ' . $current_page_title) : 'Workstation viewer for the manuscript browser'); ?>">
                <button
                    class="spiralist-manuscript-workstation__fullscreen-toggle"
                    type="button"
                    data-workstation-fullscreen
                    aria-pressed="false"
                    aria-label="Enter fullscreen"
                    title="Enter fullscreen"
                >
                    <svg
                        class="spiralist-manuscript-workstation__fullscreen-icon spiralist-manuscript-workstation__fullscreen-icon--enter"
                        viewBox="0 0 24 24"
                        aria-hidden="true"
                        focusable="false"
                    >
                        <path d="M9 3H4v5" />
                        <path d="M15 3h5v5" />
                        <path d="M20 15v5h-5" />
                        <path d="M4 15v5h5" />
                    </svg>
                    <svg
                        class="spiralist-manuscript-workstation__fullscreen-icon spiralist-manuscript-workstation__fullscreen-icon--exit"
                        viewBox="0 0 24 24"
                        aria-hidden="true"
                        focusable="false"
                    >
                        <path d="M10 4H4v6" />
                        <path d="M14 4h6v6" />
                        <path d="M20 14v6h-6" />
                        <path d="M4 14v6h6" />
                        <path d="M9 9L4 4" />
                        <path d="M15 9l5-5" />
                        <path d="M15 15l5 5" />
                        <path d="M9 15l-5 5" />
                    </svg>
                </button>

                <a
                    class="spiralist-manuscript-workstation__edge spiralist-manuscript-workstation__edge--prev"
                    href="<?php echo esc_url($previous_page_url !== '' ? $previous_page_url : '#'); ?>"
                    data-workstation-prev
                    data-workstation-page-link
                    <?php if ($previous_turn_spread_url !== '') : ?>data-spread-href="<?php echo esc_attr($previous_turn_spread_url); ?>"<?php endif; ?>
                    data-page-sequence="<?php echo esc_attr((string) ($previous_turn_record['sequence'] ?? $previous_folio_record['sequence'] ?? max(1, $current_page_sequence - 1))); ?>"
                    data-image-url="<?php echo esc_url((string) ($previous_turn_record['image_url'] ?? $previous_folio_record['image_url'] ?? '')); ?>"
                    aria-label="<?php echo esc_attr(sprintf('Turn to previous folio, %s', (string) ($previous_turn_record['title'] ?? $previous_folio_record['title'] ?? 'previous page'))); ?>"
                    <?php if ($previous_page_url === '') : ?>hidden aria-hidden="true" tabindex="-1"<?php endif; ?>
                >
                    <span class="spiralist-manuscript-workstation__edge-arrow" aria-hidden="true"><</span>
                    <span class="spiralist-manuscript-workstation__edge-copy">
                        <strong>Turn Back</strong>
                        <span><?php echo esc_html((string) ($previous_turn_record['label'] ?? $previous_folio_record['label'] ?? 'Previous folio')); ?></span>
                    </span>
                </a>

                <a
                    class="spiralist-manuscript-workstation__edge spiralist-manuscript-workstation__edge--next"
                    href="<?php echo esc_url($next_page_url !== '' ? $next_page_url : '#'); ?>"
                    data-workstation-next
                    data-workstation-page-link
                    <?php if ($next_turn_spread_url !== '') : ?>data-spread-href="<?php echo esc_attr($next_turn_spread_url); ?>"<?php endif; ?>
                    data-page-sequence="<?php echo esc_attr((string) ($next_turn_record['sequence'] ?? $next_folio_record['sequence'] ?? ($current_page_sequence + 1))); ?>"
                    data-image-url="<?php echo esc_url((string) ($next_turn_record['image_url'] ?? $next_folio_record['image_url'] ?? '')); ?>"
                    aria-label="<?php echo esc_attr(sprintf('Turn to next folio, %s', (string) ($next_turn_record['title'] ?? $next_folio_record['title'] ?? 'next page'))); ?>"
                    <?php if ($next_page_url === '') : ?>hidden aria-hidden="true" tabindex="-1"<?php endif; ?>
                >
                    <span class="spiralist-manuscript-workstation__edge-copy">
                        <strong>Turn Forward</strong>
                        <span><?php echo esc_html((string) ($next_turn_record['label'] ?? $next_folio_record['label'] ?? 'Next folio')); ?></span>
                    </span>
                    <span class="spiralist-manuscript-workstation__edge-arrow" aria-hidden="true">></span>
                </a>