You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
3.2 KiB

<?xml version="1.0" encoding="UTF-8"?>
<!--Rearranged the DiscussSidebarChannel template-->
<templates id="template" xml:space="preserve">
<t name="mail.DiscussSidebarChannel"
t-inherit="mail.DiscussSidebarChannel"
t-inherit-mode="extension"
owl="1">
<xpath expr="//button" position="replace">
<t t-log="this, thread"/>
<button class="o-mail-DiscussSidebarChannel o-mail-DiscussSidebar-item btn btn-secondary d-flex align-items-center w-100 px-0 py-2 border-0 rounded-0 text-reset"
t-att-class="{
'bg-inherit': thread.notEq(store.discuss.thread),
'o-active': thread.eq(store.discuss.thread),
'o-unread': thread.message_unread_counter > 0 and !thread.muteUntilDateTime,
'opacity-50': thread.muteUntilDateTime,
}"
t-on-click="(ev) => this.openThread(ev, thread)"
>
<div class="d-flex flex-column align-items-center ms-4 w-100">
<div class="bg-inherit position-relative">
<div t-att-class="{'image_size': thread.type === 'chat','other_image_size': thread.type !== 'chat',}">
<img t-att-src="thread.imgUrl"
alt="Thread Image"/>
</div>
<ThreadIcon
t-if="thread.type === 'chat' or (thread.type === 'channel' and !thread.authorizedGroupFullName)"
thread="thread" size="'small'"
className="'o-mail-DiscussSidebarChannel-threadIcon position-absolute bottom-0 end-0 p-1 me-n1 mb-n1 d-flex align-items-center justify-content-center rounded-circle bg-inherit'"
/>
</div>
<span class="mt-2 ms-3 me-2 text-truncate"
t-att-class="{ 'o-item-unread fw-bolder': thread.message_unread_counter > 0 and !thread.muteUntilDateTime }">
<t t-esc="thread.displayName"/>
</span>
</div>
<div class="flex-grow-1"/>
<div class="o-mail-DiscussSidebarChannel-commands d-none ms-1 me-3">
</div>
<t t-foreach="channelIndicators" t-as="indicator"
t-key="indicator_index" t-component="indicator"
t-props="{ thread }"/>
<div t-if="counter > 0">
<span t-attf-class="o-mail-DiscussSidebar-badge badge rounded-pill o-discuss-badge ms-1 me-3 fw-bold {{thread.muteUntilDateTime ? 'o-muted' : ''}}"
t-esc="counter"/>
</div>
</button>
</xpath>
</t>
</templates>