a3d46f9756
- Public landing page at / for unauthenticated users (EN/NO/UK/PL) - Authenticated / shows Case Workbench dashboard with manifesto strip, stats, and launched-tool grid (Transcribe, Timeline, BVJ, Advocate, Deep Research, Corpus) - Added includes/i18n.php with full 4-language translation layer - Extended layout.php to Case Workbench shell with tool rail, lang switcher - AI output language normalization extended to en/no/uk/pl in PHP agents - SSO token validation in bootstrap.php / index.php (dobetternorge.no bridge) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
119 lines
9.5 KiB
PHP
119 lines
9.5 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
$toolName = 'timeline';
|
|
$toolTitle = 'Build a timeline';
|
|
$toolKind = 'Timeline Builder';
|
|
$toolBadge = 'process-and-forget';
|
|
require_once __DIR__ . '/includes/layout.php';
|
|
?>
|
|
<form id="toolForm" class="tool-form">
|
|
|
|
<div class="lang-switcher" id="timelineLangSwitcher" role="group" aria-label="UI language">
|
|
<button type="button" class="lang-btn is-active" data-lang="en">🇬🇧 EN</button>
|
|
<button type="button" class="lang-btn" data-lang="no">🇳🇴 NO</button>
|
|
<button type="button" class="lang-btn" data-lang="uk">🇺🇦 UK</button>
|
|
<button type="button" class="lang-btn" data-lang="pl">🇵🇱 PL</button>
|
|
</div>
|
|
|
|
<div class="control-row" id="timelineEngineControl">
|
|
<span class="control-label" data-i18n="timelineEngine">Engine</span>
|
|
<label><input type="radio" name="timelineEngine" value="azure_mini" checked id="timelineEngineAzureMini"> <span data-i18n="timelineEngineAzureMini">Azure gpt-4o-mini</span> ★ <small class="control-hint">(fast)</small></label>
|
|
<label><input type="radio" name="timelineEngine" value="azure_full" id="timelineEngineAzureFull"> <span data-i18n="timelineEngineAzureFull">Azure gpt-4o</span> <small class="control-hint">(best)</small></label>
|
|
<label><input type="radio" name="timelineEngine" value="gpu" id="timelineEngineGpu"> <span data-i18n="timelineEngineGpu">GPU (cuttlefish)</span> <small class="control-hint">(local)</small></label>
|
|
</div>
|
|
<p class="upload-hint" data-i18n="timelineEngineHint">Azure engines use your BNL Azure credits. GPU runs the local LiteLLM proxy on cuttlefish.</p>
|
|
|
|
<details class="advanced-panel" id="timelineAdvanced">
|
|
<summary class="advanced-toggle" data-i18n="timelineAdvancedToggle">Advanced settings</summary>
|
|
|
|
<div class="control-row" id="timelineFocusControl">
|
|
<span class="control-label" data-i18n="timelineFocus">Focus</span>
|
|
<label><input type="radio" name="timelineFocus" value="all" checked> <span data-i18n="timelineFocusAll">All events</span> ★</label>
|
|
<label><input type="radio" name="timelineFocus" value="deadlines"> <span data-i18n="timelineFocusDeadlines">Legal deadlines</span></label>
|
|
<label><input type="radio" name="timelineFocus" value="hearings"> <span data-i18n="timelineFocusHearings">Court hearings</span></label>
|
|
<label><input type="radio" name="timelineFocus" value="cps"> <span data-i18n="timelineFocusCps">CPS milestones</span></label>
|
|
</div>
|
|
<p class="upload-hint" data-i18n="timelineFocusHint">All events: extract every temporal reference. Legal deadlines: filing dates, appeal windows, statutory limits. Court hearings: tribunal and mediation sessions. CPS milestones: Barnevernet interventions and Fylkesnemnda proceedings.</p>
|
|
|
|
<div class="control-row" id="timelineConfidenceControl">
|
|
<span class="control-label" data-i18n="timelineConfidence">Confidence</span>
|
|
<label><input type="radio" name="confidenceFilter" value="all" checked> <span data-i18n="timelineConfidenceAll">Show all events</span> ★</label>
|
|
<label><input type="radio" name="confidenceFilter" value="high_medium"> <span data-i18n="timelineConfidenceHighMed">Hide low-confidence</span></label>
|
|
</div>
|
|
<p class="upload-hint" data-i18n="timelineConfidenceHint">Show all: includes events the model is uncertain about (shown in grey). Hide low-confidence: only returns events the model is reasonably sure of.</p>
|
|
|
|
<div class="control-row" id="timelineBackgroundControl">
|
|
<span class="control-label" data-i18n="timelineBackground">Background events</span>
|
|
<label><input type="checkbox" id="includeBackgroundCheck" name="include_background" checked> <span data-i18n="timelineIncludeBackground">Include narrative / background dates</span></label>
|
|
</div>
|
|
<p class="upload-hint" data-i18n="timelineBackgroundHint">When checked, historical context dates are included (e.g. "born 30.07.2015", "met around 2011/2012"). Uncheck to extract only operational events and deadlines.</p>
|
|
|
|
<div class="control-row" id="timelineDatesControl">
|
|
<span class="control-label" data-i18n="timelineDates">Date types</span>
|
|
<label><input type="checkbox" id="includeRelativeCheck" name="include_relative" checked> <span data-i18n="timelineIncludeRelative">Include relative / recurring dates</span></label>
|
|
</div>
|
|
<p class="upload-hint" data-i18n="timelineDatesHint">When checked, relative references ("three weeks later", "every Monday") and recurring dates are included. Uncheck to return only exact calendar dates.</p>
|
|
|
|
</details>
|
|
|
|
<div class="upload-zone" id="uploadZone" role="region" aria-label="File upload" data-i18n-aria="timelineUploadAria">
|
|
<input type="file" id="uploadInput" multiple accept=".pdf,.docx,.txt" aria-label="Choose files">
|
|
<div id="uploadPrompt" class="upload-prompt">
|
|
<span class="upload-icon" aria-hidden="true">⇧</span>
|
|
<p><span data-i18n="timelineUploadDrop">Drop up to 5 files here, or</span> <label for="uploadInput" class="upload-browse" data-i18n="timelineUploadBrowse">browse</label></p>
|
|
<p class="upload-hint"><strong>PDF</strong>, <strong>DOCX</strong>, <strong>TXT</strong> — <span data-i18n="timelineUploadHint">text extracted in memory, never stored</span></p>
|
|
</div>
|
|
<div id="uploadFileInfo" class="upload-file is-hidden">
|
|
<ul id="uploadFileList" class="upload-file-list"></ul>
|
|
<button type="button" id="uploadClear" class="upload-clear" data-i18n="timelineUploadClear">× Clear</button>
|
|
</div>
|
|
</div>
|
|
|
|
<label class="input-label" for="toolInput" id="inputLabel" data-i18n="timelineInputLabel">Pasted text</label>
|
|
<textarea id="toolInput" name="toolInput" rows="10" required data-i18n-placeholder="timelineInputPlaceholder" placeholder="Paste case notes, court decisions, or correspondence containing dates and events."></textarea>
|
|
|
|
<div class="form-footer">
|
|
<p id="toolStatus" class="form-status" role="status" aria-live="polite"></p>
|
|
<button id="runButton" type="submit" data-i18n="timelineRun">Run</button>
|
|
</div>
|
|
</form>
|
|
|
|
<section id="results" class="results" aria-live="polite">
|
|
<div class="empty-state">
|
|
<h3 data-i18n="timelineReadyTitle">Ready</h3>
|
|
<p data-i18n="timelineReadyDesc">Paste text or upload a file, configure options, then run.</p>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Hidden stubs so tools.js element refs don't crash on this page -->
|
|
<div class="is-hidden" id="languageControl" aria-hidden="true">
|
|
<input type="radio" name="language" value="en" checked>
|
|
<input type="radio" name="language" value="no">
|
|
<input type="radio" name="language" value="uk">
|
|
<input type="radio" name="language" value="pl">
|
|
</div>
|
|
<div class="is-hidden" id="redactionControl" aria-hidden="true"></div>
|
|
<div class="is-hidden" id="audioZone" aria-hidden="true">
|
|
<input type="file" id="audioInput" style="display:none">
|
|
<div id="audioPrompt"></div>
|
|
<div id="audioFileInfo"><ol id="audioQueueList"></ol><button type="button" id="audioClear"></button></div>
|
|
</div>
|
|
<div class="is-hidden" id="diarizeControl" aria-hidden="true">
|
|
<input type="checkbox" id="diarizeCheck">
|
|
<input type="number" id="numSpeakersInput">
|
|
</div>
|
|
<div class="is-hidden" id="transcribeLangControl" aria-hidden="true"><input type="radio" name="transcribeLang" value="no" checked></div>
|
|
<div class="is-hidden" id="vocabControl" aria-hidden="true">
|
|
<div id="vocabPresets"></div>
|
|
<textarea id="initPromptInput"></textarea>
|
|
</div>
|
|
<div class="is-hidden" id="aliasSection" aria-hidden="true">
|
|
<button type="button" id="addAliasRow"></button>
|
|
<div id="aliasRows"></div>
|
|
</div>
|
|
<div class="is-hidden" id="exemptSection" aria-hidden="true">
|
|
<button type="button" id="addExemptRow"></button>
|
|
<div id="exemptRows"></div>
|
|
</div>
|
|
<?php require_once __DIR__ . '/includes/layout_footer.php'; ?>
|