{% extends "base.html" %} {% block title %}Document β€” Document Intelligence β€” ICDEVβ„’{% endblock %} {% block content %}
CUI // SP-CTI

πŸ“„ {{ doc.title or 'Untitled Document' }}

{{ doc.filename or 'β€”' }} Β· {{ doc.collection_id }} Β· {{ doc.classification or 'CUI' }}

πŸ”„ Regenerate in DocGen {% if doc.template_type %} {% endif %} ← Collections
Viewing:

Versions

Active: {{ active_version_id[:16] }}… {% if active_version_id and role_levels.get(user_role, 0) >= 1 %} Export: {% endif %} {% if versions|length >= 2 %} {% endif %}
{% for v in versions %}
v{{ v.version_no }} {{ v.origin }} {% if v.status == 'approved' %}βœ“{% elif v.status == 'pending_review' %}⏳{% elif v.status == 'rejected' %}βœ•{% elif v.status == 'needs_revision' %}✏️{% else %}β€”{% endif %} {{ v.status }} {% if v.assigned_to %}β†’ {{ v.assigned_to }}{% endif %}
{% else %} No versions yet. {% endfor %}

πŸ“ Page Layer

Loading page geometry…

Sections {% if doc.template_type %}{{ doc.template_type | replace('_', ' ') }}{% endif %}

{# dwr-fid-03: a document with an outline can still have lost its upload. Stating that only on the degraded page would hide it on exactly the documents that look complete. The degraded pane includes this band itself. #} {% if reading_pane and reading_pane.basis == 'sections' %} {% include "document_intelligence/_reading_limits.html" %} {% endif %} {% for s in sections %}
{{ s.heading }} {{ s.status or 'draft' }} {{ s.origin or 'human' }} {% if s.assigned_to %}β†’ {{ s.assigned_to }}{% endif %}
{% if s.origin == 'ai_generated' or s.origin == 'ai_assisted' %} AI-generated Β· pending review {% endif %}
{% if s.content %} {{ s.content | markdown | safe }}{% if s.content|length > 1000 %}…{% endif %} {% else %} Empty β€” use AI Assist or edit manually. {% endif %}
{% if s.citations %}
{% for c in s.citations %} πŸ“„ {{ c.doc_title or c.doc_id }} Β· p.{{ c.page or '?' }} Β· {{ c.chunk_id[:16] }}… {% endfor %}
{% endif %} {% if doc.template_type %} {% endif %}
{% if role_levels.get(user_role, 0) >= 1 %} {% endif %} {% if role_levels.get(user_role, 0) >= 1 %} {% endif %} {% if role_levels.get(user_role, 0) >= 2 %} {% endif %} {% if doc.template_type %} {% if config.EXCALIDRAW_HOST %} {% endif %} {% endif %}
{% else %} {% include "document_intelligence/_reading_pane.html" %} {% endfor %}
{% include "document_intelligence/_review_rail.html" %} {% if doc.template_type %} {% endif %}
{% if doc.template_type and config.EXCALIDRAW_HOST %}
✏ Excalidraw
{% endif %} {% if doc.template_type %}
⬑ Diagram Editor
Mermaid Syntax
Preview
{% endif %} {% if doc.template_type %} {% endif %} {% set iqe_canvas = "dic" %} {% set iqe_api_route = "/document-intelligence/api/iqe-query" %} {% set iqe_title = "IQE Query β€” Document" %} {% set iqe_examples = [ {"label": "Versions", "query": "foreach v in dic.versions where v.doc_id == \"{{ doc.doc_id }}\" select v.version_no, v.status, v.origin"} ] %} {% include "includes/iqe_query_widget.html" %} {% endblock %}