{# _partials/paper_card.html — Bundle H shared paper card partial. Used by /discovery/{id}, /themes/{id}, /feedback, and future cluster-aware-ask (Bundle I). Required context: paper — dict with keys: doi, title, score, rationale, score_breakdown_json, ingested, [distance_to_centroid (optional, themes only)] loop — Jinja loop variable (for unique element IDs); pass loop.index OR a unique index manually via `card_index`. Optional context flags (all default off/on as noted): show_feedback_buttons bool — controlled by web_ui.show_feedback_buttons config (P4: default True). Gates the Save/Dismiss/👍/👎/Rate row. show_score_decomp bool — show "Why this paper?" panel (default True). show_action_buttons bool — show Relink/Re-extract buttons from P8 (default False, enabled on /discovery/{id} only). feedback_source str — value passed as 'source' in /api/feedback POST (default "discovery"). card_index int — fallback unique index when not inside a Jinja loop. #} {% set _idx = card_index if card_index is defined else loop.index %} {% set _source = feedback_source if feedback_source is defined else "discovery" %}
{{ paper.rationale }}
{% endif %} {# Bundle B: collapsible "Why this paper?" panel (default open). #} {% if show_score_decomp | default(true) and paper.score_breakdown_json %} {% include "_partials/score_decomposition.html" %} {% endif %} {# Bundle H: feedback buttons — gated by web_ui.show_feedback_buttons (P4: default true). #} {% if show_feedback_buttons %}