Improve layout review navigation and simplify replica outputs
This commit is contained in:
parent
b8a9a3f731
commit
93f3086b48
|
|
@ -2196,7 +2196,7 @@ def document_detail(document_id: str, request: Request, queue: str | None = None
|
||||||
requested_tab = request.query_params.get("tab", "ocr-review")
|
requested_tab = request.query_params.get("tab", "ocr-review")
|
||||||
if requested_tab == "layout-review" and viewer_source != "scan":
|
if requested_tab == "layout-review" and viewer_source != "scan":
|
||||||
return RedirectResponse(
|
return RedirectResponse(
|
||||||
url=f"/documents/{document_id}?tab=ocr-review&viewer_source={viewer_source}",
|
url=f"/documents/{document_id}?tab=layout-review&viewer_source=scan",
|
||||||
status_code=303,
|
status_code=303,
|
||||||
)
|
)
|
||||||
current_user = getattr(request.state, "current_user", None)
|
current_user = getattr(request.state, "current_user", None)
|
||||||
|
|
|
||||||
|
|
@ -6308,3 +6308,19 @@ table {
|
||||||
padding-right: 0.55rem;
|
padding-right: 0.55rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Force layout review tool rows to stack */
|
||||||
|
#layout-review-toolbar .word-ribbon-group:first-child {
|
||||||
|
display: flex !important;
|
||||||
|
flex-direction: column !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout-review-toolbar .word-ribbon-group:first-child .word-ribbon-row.layout-tool-row {
|
||||||
|
display: flex !important;
|
||||||
|
flex-wrap: nowrap !important;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout-review-toolbar .word-ribbon-group:first-child .word-ribbon-row.layout-tool-row + .word-ribbon-row.layout-tool-row {
|
||||||
|
margin-top: 0.35rem !important;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -318,8 +318,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if replica_debug_overlay_output %}
|
{% if replica_debug_overlay_output %}
|
||||||
<a class="preview-source-link{% if viewer_source == 'replica_debug_overlay' %} active{% endif %}" href="/documents/{{ document.document_id }}?tab={{ active_tab }}&viewer_source=replica_debug_overlay">Replica (Debug)</a>
|
<a class="preview-source-link{% if viewer_source == 'replica_debug_overlay' %} active{% endif %}" href="/documents/{{ document.document_id }}?tab={{ active_tab }}&viewer_source=replica_debug_overlay">Replica (Debug)</a>
|
||||||
<a class="preview-source-link{% if viewer_source == 'docx' %} active{% endif %}" href="/documents/{{ document.document_id }}?tab={{ active_tab }}&viewer_source=docx">DOCX</a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<a class="preview-source-link{% if viewer_source == 'docx' %} active{% endif %}" href="/documents/{{ document.document_id }}?tab={{ active_tab }}&viewer_source=docx">DOCX</a>
|
||||||
</div>
|
</div>
|
||||||
{% if overlay_page_data %}
|
{% if overlay_page_data %}
|
||||||
<div class="preview-overlay-controls" style="display:flex; gap:0.5rem; flex-wrap:wrap; margin-top:0.75rem;">
|
<div class="preview-overlay-controls" style="display:flex; gap:0.5rem; flex-wrap:wrap; margin-top:0.75rem;">
|
||||||
|
|
@ -1981,6 +1981,11 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
<div class="word-ribbon-group">
|
<div class="word-ribbon-group">
|
||||||
<div class="word-ribbon-row">
|
<div class="word-ribbon-row">
|
||||||
<button type="submit" form="layout-review-save-form" class="layout-tool-btn primary" onclick="window.prepareLayoutReviewSubmit && window.prepareLayoutReviewSubmit()">Save</button>
|
<button type="submit" form="layout-review-save-form" class="layout-tool-btn primary" onclick="window.prepareLayoutReviewSubmit && window.prepareLayoutReviewSubmit()">Save</button>
|
||||||
|
<a class="layout-tool-btn" href="/documents/{{ document.document_id }}?tab=ocr-review&viewer_source=scan">View Scan</a>
|
||||||
|
{% if replica_clean_output %}
|
||||||
|
<a class="layout-tool-btn" href="/documents/{{ document.document_id }}?tab=ocr-review&viewer_source=replica">View Replica</a>
|
||||||
|
{% endif %}
|
||||||
|
<a class="layout-tool-btn" href="/documents/{{ document.document_id }}?tab=ocr-review&viewer_source=docx">View DOCX</a>
|
||||||
<span id="layout-review-status">Ready</span>
|
<span id="layout-review-status">Ready</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="word-ribbon-label">Document</div>
|
<div class="word-ribbon-label">Document</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue