[FIX] portal: alignment problem with attachment in dialog box

Steps to reproduce
==================
1. Go to the slides website.
2. Open any course.
3. Click on 'add a review' or 'edit review'.
4. Attach any files.
-> Files appear misaligned.

After this commit
=================
They will be perfectly aligned.

Task-3624281

closes odoo/odoo#152443

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
Shaan Thakkar (THSH)
2024-02-05 16:32:46 +00:00
parent e538c584ec
commit ce63f541e1
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -425,7 +425,7 @@ img, .media_iframe_video, .o_image {
.o_portal_chatter_composer {
.o_portal_chatter_attachment {
.o_portal_chatter_attachment_name {
word-wrap: break-word;
max-width: 200px;
}
.o_portal_chatter_attachment_delete {
@@ -62,14 +62,16 @@
<t t-name="portal.Chatter.Attachments">
<div t-if="attachments.length" class="d-flex flex-grow-1 flex-wrap gap-1">
<div t-foreach="attachments" t-as="attachment" t-key="attachment_index" class="bg-light p-2 rounded">
<div class="o_portal_chatter_attachment position-relative text-center" t-att-data-id="attachment.id">
<div t-foreach="attachments" t-as="attachment" t-key="attachment_index" class="bg-light p-2 rounded position-relative">
<div class="o_portal_chatter_attachment text-center" t-att-data-id="attachment.id">
<button t-if="showDelete and attachment.state == 'pending'" class="o_portal_chatter_attachment_delete btn btn-sm btn-outline-danger" title="Delete">
<i class="fa fa-times"/>
</button>
<a t-attf-href="/web/content/#{attachment.id}?download=true&amp;access_token=#{attachment.access_token}" target="_blank" class="d-flex flex-row">
<div class='oe_attachment_embedded o_image' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype"/>
<div class='o_portal_chatter_attachment_name align-self-center'><t t-esc='attachment.name'/></div>
<div class='o_portal_chatter_attachment_name align-self-center text-truncate' t-att-data-tooltip="attachment.name" data-tooltip-position="top">
<t t-esc='attachment.name'/>
</div>
</a>
</div>
</div>