Files
odoo_source/addons/mail/static/src/components/composer/composer.xml
T
Alexandre Kühn cc6546677d [IMP] mail, *: Rename component to match model (step 2)
[IMP] mail: rename ActivityBox to ActivityBoxView (component)
Task-3046113

[IMP] mail: rename ActivityMarkDonePopoverContent (component)
Task-3046122

[IMP] mail: rename AttachmentBox to AttachmentBoxView (component)
Task-3046129

[IMP] mail: rename AttachmentDeleteConfirm (component)
Task-3046160

[IMP] mail: rename CallActionList (component)
Task-3046187

[IMP] mail: rename CallParticipantVideo to CallParticipantVideoView (component)
Task-3046193

[IMP] mail: rename ChannelInvitationFormSelectablePartner (component)
Task-3046287

[IMP] mail: rename ChannelInvitationFormSelectedPartner (component)
Task-3046288

[IMP] mail: rename ChannelMember (component)
Task-3046298

[IMP] mail: rename ChannelMemberList (component)
Task-3046306

[IMP] mail: rename ChannelMemberListCategory (component)
Task-3046307

[IMP] mail: *: rename ChatWindowHeader (component)
*: hr, im_livechat, website_livechat
Task-3046330

[IMP] mail: rename ChatWindowHiddenMenu (component)
Task-3046358

[IMP] mail: rename ChatWindowHiddenMenuItem (component)
Task-3046515

[IMP] mail, *: rename Composer (component)
*: hr_recruitment, im_livechat
Task-3046555

[IMP] mail: rename ComposerSuggestedRecipient (component)
Task-3046598

[IMP] mail: rename ComposerSuggestedRecipientList (component)
Task-3046624

[IMP] mail, *: rename ComposerTextInput (component)
*: im_livechat
Task-3046648

[IMP] mail: rename DeleteMessageConfirm (component)
Task-3046661

[IMP] mail, *: rename Discuss (component)
*: im_livechat
Task-3046685

[IMP] mail: rename DiscussMobileMailboxSelection (component)
Task-3046703

[IMP] mail: rename DiscussMobileMailboxSelectionItem (component)
Task-3046709

[IMP] mail, *: rename DiscussSidebar (component)
Task-3046719

[IMP] mail: rename DiscussSidebarMailbox (component)
Task-3046732

[IMP] mail: rename DropZone (component)
Task-3046739

[IMP] mail: rename FollowButton (component)
Task-3047154

[IMP] mail: rename Follower (component)
Task-3047203

[IMP] mail: rename FollowerListMenu (component)
Task-3047236

[IMP] mail: rename FollowerSubtype (component)
Task-3047272

[IMP] mail: rename MailTemplate (component)
Task-3047314

[IMP] mail, *: rename Message (component)
*: im_livechat, sms, snailmail, website_sale
Task-3047352

[IMP] mail: rename MessageAuthorPrefix (component)
Task-3047683

[IMP] mail, *: rename MessageList (component)
*: hr_recruitment, website_livechat
Task-3047718

[IMP] mail, *: rename MessageNotificationPopoverContent (component)
*: sms
Task-3047742

[IMP] mail: rename MessageSeenIndicator (component)
Task-3047765

[IMP] mail, *: rename MessagingMenuTab (component)
*: im_livechat
Task-3047802

[IMP] mail: rename MobileMessagingNavbar (component)
Task-3047806

[IMP] mail, *: rename NotificationGroup (component)
*: sms, snailmail
Task-3047829

[IMP] mail, *: rename NotificationList (component)
*: im_livechat
Task-3047871

[IMP] mail: rename NotificationRequest (component)
Task-3047883

[IMP] mail, *: rename PersonaImStatusIcon (component)
*: hr_holidays
Task-3047969

[IMP] mail, *: rename ThreadIcon (component)
*: hr_holidays, im_livechat
Task-3047980

[IMP] mail, *: rename ThreadNeedactionPreview (component)
*: im_livechat, rating, test_mail_full
Task-3048021

[IMP] mail, *: rename ThreadTextualTypingStatus (component)
*: im_livechat
Task-3048042

[IMP] mail, *: rename ThreadTypingIcon (component)
*: im_livechat
Task-3048043

[IMP] snailmail: rename SnailmailError (component)
Task-3048051

[IMP] website_livechat: rename VisitorBanner (component)
Task-3048069

Task-3047725

closes odoo/odoo#104548

Related: odoo/enterprise#33411
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-28 20:39:58 +02:00

173 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ComposerView" owl="1">
<t t-if="composerView">
<div class="o_ComposerView"
t-att-class="{
'o-focused': composerView.isFocused,
'o-has-current-partner-avatar pe-3 ps-1': composerView.hasCurrentPartnerAvatar,
'o-has-footer': composerView.hasFooter,
'o-has-header': composerView.hasHeader,
'o-is-in-thread-view bg-view': composerView.threadView,
'o-is-compact': composerView.isCompact,
'o-messaging-in-editing': composerView.messageViewInEditing,
'pt-3 pb-4': composerView.hasCurrentPartnerAvatar and composerView.hasHeader,
'py-4': composerView.hasCurrentPartnerAvatar and !composerView.hasHeader and !composerView.threadView,
'py-1': composerView.hasCurrentPartnerAvatar and !composerView.hasHeader and composerView.threadView,
}"
t-attf-class="{{ className }}"
t-on-keydown="composerView.onKeydown"
t-ref="root"
>
<t t-if="composerView.dropZoneView">
<DropZoneView
className="'o_ComposerView_dropZone'"
record="composerView.dropZoneView"
/>
</t>
<t t-if="composerView.hasHeader">
<div class="o_ComposerView_coreHeader text-truncate" t-att-class="{ 'small p-2': composerView.isInChatWindow or composerView.isInDiscuss }">
<t t-if="composerView.threadView and composerView.threadView.replyingToMessageView">
<span class="cursor-pointer" t-on-click="composerView.onClickReplyingToMessage">
Replying to <b t-esc="composerView.threadView.replyingToMessageView.message.authorName"/>
</span>
<i t-if="composerView.threadView.thread !== messaging.inbox.thread" class="o_ComposerView_cancelReply fa fa-lg fa-times-circle rounded-circle p-0 ms-1 cursor-pointer" title="Stop replying" t-on-click="composerView.onClickStopReplying"/>
</t>
<t t-if="composerView.hasThreadName">
<span class="o_ComposerView_threadName">
on: <b><t t-esc="composerView.composer.activeThread.displayName"/></b>
</span>
</t>
<t t-if="composerView.hasFollowers and !composerView.composer.isLog">
<!-- Text for followers -->
<small class="o_ComposerView_followers flex-shrink-0">
<b class="text-muted">To: </b>
<em class="text-muted">Followers of </em>
<b>
<t t-if="composerView.composer.activeThread.displayName">
&#32;&quot;<t t-esc="composerView.composer.activeThread.displayName"/>&quot;
</t>
<t t-else="">
this document
</t>
</b>
</small>
<ComposerSuggestedRecipientListView record="composerView.composerSuggestedRecipientListView"/>
</t>
</div>
</t>
<t t-if="composerView.hasCurrentPartnerAvatar">
<div class="o_ComposerView_sidebarMain">
<t t-if="!messaging.currentGuest or composerView.composer.activeThread.model !== 'mail.channel'">
<img class="o_ComposerView_currentPartnerAvatar mt-1 rounded-circle o_object_fit_cover" t-att-src="composerView.currentPartnerAvatar" alt="Avatar of user"/>
</t>
<t t-if="messaging.currentGuest and composerView.composer.activeThread.model === 'mail.channel'">
<img class="o_ComposerView_currentPartnerAvatar mt-1 rounded-circle o_object_fit_cover" t-attf-src="/mail/channel/{{ composerView.composer.activeThread.id }}/guest/{{ messaging.currentGuest.id }}/avatar_128?unique={{ messaging.currentGuest.name }}" alt="Avatar of guest"/>
</t>
</div>
</t>
<div
class="o_ComposerView_coreMain d-flex flex-nowrap align-items-start flex-grow-1"
t-att-class="{
'o-composer-is-compact': composerView.isCompact,
'flex-column border rounded-3 bg-view': !composerView.isCompact,
}"
>
<ComposerTextInputView
className="'o_ComposerView_textInput flex-grow-1 align-self-stretch'"
classNameObj="{
'o-composer-is-compact': composerView.isCompact,
'rounded-3': !composerView.isCompact,
'o_ComposerView_textInput-mobile': messaging.device.isSmall,
'o-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar,
'rounded-start-3': composerView.isCompact and composerView.hasCurrentPartnerAvatar,
}"
record="composerView.textInput"
t-key="composerView.localId"
/>
<div class="o_ComposerView_buttons d-flex align-items-stretch align-self-stretch flex-shrink-0" t-att-class="{ 'o-composer-is-compact': composerView.isCompact, 'h-auto w-100 px-3': !composerView.isCompact, 'o-isDeviceSmall': messaging.device.isSmall, 'o-messaging-in-editing': composerView and composerView.messageViewInEditing, 'border-end': composerView.messageViewInEditing and !composerView.hasCurrentPartnerAvatar }">
<div class="o_ComposerView_toolButtons d-flex py-1 border-top bg-view"
t-att-class="{
'o-composer-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar,
'o-composer-is-compact border-bottom': composerView.isCompact,
'flex-row flex-grow-1 justify-content-between': !composerView.isCompact,
}">
<div class="o_ComposerView_primaryToolButtons d-flex align-items-center" t-att-class="{ 'o-composer-is-compact px-2': composerView.isCompact, 'flex-column': composerView.messageViewInEditing and composerView.messageViewInEditing.isInChatWindow }">
<button class="o_ComposerView_button o_ComposerView_buttonEmojis o_ComposerView_toolButton btn btn-light border-0 rounded-pill bg-view"
t-att-class="{
'o-open bg-200': composerView.emojisPopoverView,
'o-isDeviceSmall': messaging.device.isSmall,
}"
t-attf-class="{{ composerView.messageViewInEditing ? 'my-1' : 'mx-1' }}"
t-att-aria-expanded="composerView.emojisPopoverView ? 'true' : 'false'"
t-on-keydown="composerView.onKeydownButtonEmojis"
t-on-click="composerView.onClickButtonEmojis"
t-ref="buttonEmojis"
>
<i class="fa fa-smile-o" role="img" aria-label="Emojis"/>
</button>
<button class="o_ComposerView_button o_ComposerView_buttonAttachment o_ComposerView_toolButton btn btn-light fa fa-paperclip border-0 rounded-pill bg-view" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" t-attf-class="{{ composerView.messageViewInEditing ? 'my-1' : 'mx-1' }}" title="Add attachment" aria-label="Add attachment" type="button" t-on-click="composerView.onClickAddAttachment"/>
</div>
<t t-if="composerView.isExpandable">
<div class="o_ComposerView_secondaryToolButtons">
<button class="o_ComposerView_button o_ComposerView_buttonFullComposer o_ComposerView_toolButton btn btn-light fa fa-expand mx-1 border-0 rounded-pill bg-view" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" title="Full composer" aria-label="Full composer" type="button" t-on-click="composerView.onClickFullComposer"/>
</div>
</t>
</div>
<t t-if="composerView.isCompact">
<t t-call="mail.ComposerView.actionButtons"/>
</t>
</div>
</div>
<t t-if="composerView.hasFooter">
<div class="o_ComposerView_coreFooter overflow-auto" t-att-class="{ 'o-composer-is-compact': composerView.isCompact, 'ms-0': !composerView.isCompact }">
<t t-if="composerView.threadTextualTypingStatusView">
<ThreadTextualTypingStatusView className="'o_ComposerView_threadTextualTypingStatus small'" record="composerView.threadTextualTypingStatusView"/>
</t>
<AttachmentList
t-if="composerView.attachmentList"
className="'o_ComposerView_attachmentList flex-grow-1'"
classNameObj="{ 'o-composer-is-compact': composerView.isCompact, 'overflow-auto': !composerView.isCompact }"
record="composerView.attachmentList"
/>
<t t-if="!composerView.isCompact">
<t t-call="mail.ComposerView.actionButtons"/>
</t>
<t t-if="composerView.messageViewInEditing">
<span class="text-muted">escape to <a href="#" t-on-click="composerView.onClickCancelLink">cancel</a>, enter to <a href="#" t-on-click="composerView.onClickSaveLink">save</a></span>
</t>
</div>
</t>
</div>
</t>
</t>
<t t-name="mail.ComposerView.actionButtons" owl="1">
<div class="o_ComposerView_actionButtons" t-att-class="{ 'o-composer-is-compact d-flex': composerView.isCompact, 'mt-2': !composerView.isCompact }">
<t t-if="composerView.hasSendButton">
<button class="o_ComposerView_actionButton o_ComposerView_button o_ComposerView_buttonSend btn btn-primary"
t-att-class="{
'o-last': !composerView.hasDiscardButton,
'o-composer-is-compact border-start-0': composerView.isCompact,
'o-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar,
'rounded-0 rounded-end-3': !composerView.hasDiscardButton and composerView.hasCurrentPartnerAvatar and composerView.isCompact,
}"
t-att-disabled="!composerView.composer.canPostMessage ? 'disabled' : ''"
type="button"
t-on-click="composerView.onClickSend"
>
<t t-if="!messaging.device.isSmall"><t t-esc="composerView.sendButtonText"/></t>
<t t-else=""><i class="fa fa-paper-plane-o"/></t>
</button>
</t>
<t t-if="composerView.hasDiscardButton">
<button class="o_ComposerView_actionButton o-last o_ComposerView_button o_ComposerView_buttonDiscard btn btn-secondary" t-att-class="{ 'o-composer-is-compact border-start-0': composerView.isCompact, 'o-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar, 'rounded-0 rounded-end-3': composerView.hasCurrentPartnerAvatar and composerView.isCompact }" type="button" t-on-click="composerView.onClickDiscard">
Discard
</button>
</t>
</div>
</t>
</templates>