{# The chat's papers, where a chat starts and inside it: one row of tick boxes, papers in the chat ticked, papers found by a search added unticked. Every control belongs to the Ask form. #} {% macro field(ask, picked, page, stacked=False) %} {% set in_chat = ask.papers | map(attribute="stem") | list %} {% set found = [] %}{% for paper in picked.matches %}{% if paper.stem not in in_chat %}{% set _ = found.append(paper) %}{% endif %}{% endfor %}
{% endmacro %}