odoo18/addons/website_livechat/static/src/web/thread_patch.xml

33 lines
1.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="website_livechat.Thread" t-inherit="mail.Thread" t-inherit-mode="extension">
<xpath expr="//*[hasclass('o-mail-Thread')]" position="before">
<t t-set="visitor" t-value="props.thread.visitor"/>
<div t-if="visitor and !env.inChatWindow" class="o-website_livechat-VisitorBanner py-4 px-2 d-flex border-bottom">
<div t-if="props.thread.correspondent" class="o-website_livechat-VisitorBanner-sidebar me-2 d-flex justify-content-center">
<img class="rounded o-website_livechat-VisitorBanner-avatar o_object_fit_cover" t-att-src="props.thread.correspondent.persona.avatarUrl" alt="Avatar"/>
</div>
<div>
<div class="d-flex align-items-baseline">
<ImStatus t-if="visitor.is_connected" className="'me-1'" persona="visitor"/>
<span class="me-2 fw-bolder" t-esc="visitor.name"/>
<img t-if="visitor.country" class="me-2 o_country_flag align-self-center" t-att-src="visitor.country.flagUrl" t-att-alt="visitor.country.code or visitor.country.name"/>
<span class="me-2">
<i class="me-1 fa fa-comment-o" aria-label="Lang"/>
<t t-esc="visitor.lang_name"/>
</span>
<span t-if="visitor.website_name">
<i class="me-1 fa fa-globe" aria-label="Website"/>
<span t-esc="visitor.website_name"/>
</span>
</div>
<div class="mt-1">
<i class="me-1 fa fa-history" aria-label="History"/>
<span t-esc="visitor.history"/>
</div>
</div>
</div>
</xpath>
</t>
</templates>