{% extends "base.html" %} {% import "_icons.html" as icons with context %} {% block title %}{{ t('review.title', title=title) }} - Leicht·Facile{% endblock %} {% block body_class %}fit-screen{% endblock %} {% block content %} {% set counts = v.counts %} {% set fc = v.fact_counts %} {% set sc = v.segment_counts %} {% set doc_lang = v.draft.lang %} {% set total = v.items %}
{{ t('site.drafts') }}{{ icons.icon('chevron-right', 12) }}

{{ title }}

{{ t('status.' ~ job.status) }}
{{ t.get('lang.' ~ doc_lang, doc_lang) }} · {{ v.draft.level }} · {{ t.get('condition.short.' ~ job.config.condition, job.config.condition) }} {{ icons.sev('error' if counts.error else 'none') }}{{ t('count.errors', n=counts.error) }} {{ icons.sev('warn') }}{{ t('count.warnings', n=counts.warn) }} {% if fc.total %}{{ t('review.facts_present', present=fc.present, total=fc.total) }}{% endif %}

{{ t('review.source') }}

{{ t('review.sentences', n=sc.sentences) }}
{{ t('review.legend.linked') }} {% if sc.unused %}{{ t('review.legend.unused_n', count=sc.unused) }}{% endif %} {% if sc.omitted %}{{ t('review.tag.left_out') }}{{ sc.omitted }}{% endif %}
{% set ns = namespace(para=None) %} {% for seg in v.source.segments %} {% if seg.kind == "heading" %}

{{ seg.id }}{{ seg.text }}

{% else %} {% set state = "used" if seg.id in v.used_segments else ("omitted" if seg.id in v.omitted_segments else "unused") %}

{{ seg.id }} {% if seg.kind == "list_item" %}• {% endif %}{{ seg.text }} {% if state == "omitted" %}{{ t('review.tag.left_out') }}{{ v.omitted_segments[seg.id] }} {% elif state == "unused" %}{{ t('review.tag.unused') }}{% endif %}

{% endif %} {% set ns.para = seg.para %} {% endfor %}

{{ t('draft.version', version=v.draft.version) }}

{{ t('review.blocks', n=v.rows | length) }}
{% if job.config.notice %}

{{ t('review.notice') }}{{ job.config.notice }}

{% endif %} {% for row in v.rows %} {% set b = row.block %} {% set d = row.decision.decision if row.decision else "" %} {% set edited_text = row.decision.text if row.decision and row.decision.text else b.text %} {% set counted = row.issues | rejectattr('severity', 'equalto', 'info') | list | length %}
{{ b.id }} {% if row.worst %}{{ icons.sev(row.worst, t('count.findings', n=row.issues | length)) }}{% if counted %}{% endif %}{% elif row.issues %}{{ icons.sev('info', t('count.findings', n=row.issues | length)) }}{% endif %}

{{ b.text }}{{ edited_text }}

{{ icons.decision_states() }}
{% if row.issues %}
{% for i in row.issues %}
{{ icons.sev(i.severity, t('sev.' ~ i.severity)) }}
{{ i.rule_id }}{{ icons.icon('chip' if i.source == 'judge' else 'code', 12) }}{{ t('review.tag.judge') if i.source == 'judge' else t('review.tag.code') }}
{{ i.message }}
{% if i.suggestion %}
{{ t('review.suggestion', text='') }}{{ i.suggestion }}{% if i.applicable %}{% endif %}
{% endif %}
{% endfor %}
{% endif %} {% if b.fact_ids %}
{{ t('review.carries') }}{% for fid in b.fact_ids %}{% set f = v.facts_by_id.get(fid) %}{{ fid }}{% if f %}{{ f.expected or (f.fact.text | truncate(34, True, '…', 0)) }}{% endif %}{% endfor %}
{% endif %}
{% endfor %} {% if v.glossary_rows %}

{{ t('review.glossary') }} {{ t('review.glossary_review_hint') }}

{% for g in v.glossary_rows %} {% set d = g.decision.decision if g.decision else "" %} {% set edited_text = g.decision.text if g.decision and g.decision.text else g.entry.explanation %}
{{ g.gid }}

{{ g.entry.term }} {{ g.entry.explanation }}{{ edited_text }}

{{ icons.decision_states() }}
{% if g.entry.origin == 'vocabulary' %}

{{ t('review.glossary_vocabulary_title') }}

{% endif %}
{% endfor %} {% endif %}
{{ t('js.decided', decided=v.decided, total=total) }}
{% endblock %}