[FIX] mail: fix project invite button alignment in chatter message

This happens because last `<p>` of message was always `inline-block`
to properly position "(edited)". However, this was breaking some
non-editable content that relies on `<p>` default displays (`block`).

This commit fixes the issue by only inlining the last `<p>` of
an edited message. Non-edited message keeps the default styling of
`<p>`.

Also slightly improve alignment of edited on empty body messages.

Related to Task-3374747

closes odoo/odoo#126988

X-original-commit: 92b359347fc3e390a75ef7a27a9fa758a21673dc
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2023-07-01 00:51:48 +02:00
parent ba5a6752a4
commit 574a5a2f48
2 changed files with 2 additions and 2 deletions
@@ -23,7 +23,7 @@
.o-mail-Message-body > p {
margin-bottom: 0;
&:last-of-type {
&:last-of-type:has(~ .o-mail-Message-edited) {
display: inline-block;
}
}
@@ -94,7 +94,7 @@
<t t-else="">
<em t-if="message.subject and !message.isSubjectSimilarToOriginThreadName and !message.isSubjectDefault" class="mb-1 me-2">Subject: <t t-esc="message.subject"/></em>
<t t-if="message.body" t-out="message.body"/>
<small t-if="message.editDate" class="ms-2 fst-italic text-muted" t-att-title="message.editDatetimeHuge">(edited)</small>
<small t-if="message.editDate" class="o-mail-Message-edited fst-italic text-muted" t-att-class="{ 'ms-2': !message.isBodyEmpty }" t-att-title="message.editDatetimeHuge">(edited)</small>
<t t-if="showSubtypeDescription" t-out="message.subtypeDescription"/>
</t>
</div>