{% import "components.html" as c with context %} {# the right column: one conversation, or nothing yet; picking a contact swaps this column alone, the two lists staying as they are. a conversation still waiting to be looked at shows the question about it instead #} {% set back = "/agents/" ~ ref(selected.computer_id) ~ "/" ~ ref(selected.id) ~ ("?review=pending" if asked else "") if selected else "/agents" %}
{% if contact and asked %} {% call c.column_header(contact.name, back=back) %} {{ c.channels((contact.channel,)) }}{{ t.text("contacts." ~ contact.kind) }} ยท {{ t.text("review.pending") }} {{ c.search_button() }} {% endcall %} {% include "review_card.html" %} {% elif contact %} {% set profile_url = "/agents/" ~ ref(selected.computer_id) ~ "/" ~ ref(selected.id) ~ "/contacts/" ~ ref(contact.thread_id) ~ "/profile?actor=" ~ ref(contact.actor_id) ~ "&target=" ~ ref(contact.target) ~ "&channel=" ~ contact.channel|urlencode ~ "&name=" ~ contact.name|urlencode %}
{{ c.back_link(back) }} {# the avatar opens the card about the conversation, over the chat #} {{ contact.name }}{{ c.channels((contact.channel,)) }}{{ t.text("contacts." ~ contact.kind) }} {{ t.text('search.located') }}{{ c.search_button() }}
{{ c.icon("loader") }}
{% elif selected %}
{{ t.text('contacts.tab_chats') }}{{ c.search_button() }}
{% endif %}