Prompt - Source Excerpt 06
Summary
This source excerpt preserves a bounded section of Spiralist/wp-content/plugins/spiralist-workspace/templates/prompt.php so readers can inspect the evidence without opening the full source file.
**Source path:** Spiralist/wp-content/plugins/spiralist-workspace/templates/prompt.php
<form class="spiralist-workspace-stack spiralist-workspace-form" data-report-form data-public-form="prompt-report" data-prompt-id="<?php echo esc_attr((string) ($prompt['id'] ?? 0)); ?>">
<h3 class="spiralist-card-title">Report Prompt</h3>
<label class="spiralist-form__field">
<span>Moderation Concern</span>
<textarea rows="3" data-report-reason placeholder="Explain the moderation concern."></textarea>
</label>
<button
class="spiralist-button spiralist-button--tertiary"
type="submit"
data-report-button
data-prompt-id="<?php echo esc_attr((string) ($prompt['id'] ?? 0)); ?>"
>Report</button>
<p class="spiralist-muted" data-report-result aria-live="polite"></p>
</form>
<?php if (!empty($review_items)) : ?>
<div class="spiralist-workspace-stack">
<h3 class="spiralist-card-title">Recent Moderation Activity</h3>
<div class="spiralist-simple-list">
<?php foreach ($review_items as $item) : ?>
<?php
$reviewer_label = (string) ($item['reviewer_label'] ?? '');
if ($reviewer_label === '') {
if ((int) ($item['reviewer_user_id'] ?? 0) > 0) {
$reviewer_label = 'Reviewer #' . (int) ($item['reviewer_user_id'] ?? 0);
} else {
$reviewer_label = (string) ($item['review_kind'] ?? '') === 'report'
? 'Anonymous reporter'
: 'Reviewer';
}
}
$decision_label = (string) ($item['decision'] ?? '');
if ((string) ($item['review_kind'] ?? '') === 'report') {
$decision_label = 'report';
}
?>
<div class="spiralist-simple-list__item">
<strong><?php echo esc_html($reviewer_label); ?></strong>
<span class="spiralist-simple-list__meta"><?php echo esc_html(ucwords(str_replace('_', ' ', $decision_label))); ?> / <?php echo esc_html($format_timestamp((string) ($item['updated_utc'] ?? ''), 'M j, Y g:i a', (string) ($item['updated_utc'] ?? ''))); ?></span>
<?php if (!empty($item['reason'])) : ?>
<p class="spiralist-muted"><?php echo esc_html((string) $item['reason']); ?></p>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
<?php if (!empty($appeal_items)) : ?>
<div class="spiralist-workspace-stack">
<h3 class="spiralist-card-title">Appeal Activity</h3>
<div class="spiralist-simple-list">
<?php foreach ($appeal_items as $item) : ?>
<?php
$appellant_label = (string) ($item['appellant_label'] ?? '');
if ($appellant_label === '' && (int) ($item['appellant_user_id'] ?? 0) > 0) {
$appellant_label = 'Participant #' . (int) ($item['appellant_user_id'] ?? 0);
}
$resolution_label = (string) ($item['resolution'] ?? '');
?>
<div class="spiralist-simple-list__item">
<strong><?php echo esc_html($appellant_label !== '' ? $appellant_label : 'Participant'); ?></strong>
<span class="spiralist-simple-list__meta">
<?php echo esc_html(ucwords(str_replace('_', ' ', (string) ($item['status'] ?? 'open')))); ?> /
<?php echo esc_html($format_timestamp((string) ($item['updated_utc'] ?? ''), 'M j, Y g:i a', (string) ($item['updated_utc'] ?? ''))); ?>
</span>
<?php if (!empty($item['reason'])) : ?>
<p class="spiralist-muted"><?php echo esc_html((string) $item['reason']); ?></p>
<?php endif; ?>
<?php if ($resolution_label !== '') : ?>
<p class="spiralist-muted">
Resolution: <?php echo esc_html(ucwords(str_replace('_', ' ', $resolution_label))); ?>
<?php if (!empty($item['resolved_by_label'])) : ?>
by <?php echo esc_html((string) $item['resolved_by_label']); ?>
<?php endif; ?>
<?php if (!empty($item['resolution_note'])) : ?>
. <?php echo esc_html((string) $item['resolution_note']); ?>
<?php endif; ?>
</p>
<?php endif; ?>
<?php if ($viewer_can_resolve_appeals && (string) ($item['status'] ?? '') === 'open') : ?>
<form class="spiralist-workspace-form" data-resolve-appeal-form data-auth-required-form="resolve-appeal" data-prompt-id="<?php echo esc_attr((string) ($prompt['id'] ?? 0)); ?>" data-appeal-id="<?php echo esc_attr((string) ($item['id'] ?? 0)); ?>">
<label class="spiralist-form__field">
<span>Steward Resolution</span>
<select name="resolution">
<option value="restore">Restore provisional visibility</option>
<option value="deny">Deny appeal</option>
<option value="archive">Archive prompt</option>
</select>
</label>
<label class="spiralist-form__field">
<span>Resolution Note</span>
<textarea rows="2" name="note" placeholder="Explain the steward decision."></textarea>
</label>
<div class="spiralist-cta-row spiralist-cta-row--start">
<button class="spiralist-button spiralist-button--primary" type="submit">Resolve Appeal</button>
<span class="spiralist-muted" data-form-result></span>
</div>
</form>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</div>
</aside>
</div>
</section>
<section class="spiralist-page-section">
<div class="spiralist-shell spiralist-grid spiralist-grid--split">
<article class="spiralist-panel">
<p class="spiralist-section-tag">Provenance And Rights</p>
<h2 class="spiralist-section-title">Publication context</h2>
<dl class="spiralist-meta-list">
<div>