[IMP] mail: add banner on archived channels

This PR adds a banner on archived channels in detailed view
It also adds a banner on archived channels in kaban view, and
reduces the space available for description in case of banner.

Task-2494469

closes odoo/odoo#117619

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Nemael
2023-04-17 15:18:51 +02:00
committed by Alexandre Kühn
parent f5797774c6
commit f80e2aad37
2 changed files with 33 additions and 3 deletions
+26 -1
View File
@@ -1,7 +1,32 @@
$o-kanban-attachement-image-size: 80px;
.o_kanban_renderer {
.o_mail_channel_kanban {
.o_module_desc_short {
max-width: 90%;
}
.ribbon {
&::before, &::after {
display: none;
}
span {
padding: 5px;
font-size: x-small;
z-index: unset;
height: auto;
}
}
.ribbon-top-right {
margin-top: 54px;
span {
top: 15px;
left: 10px;
}
}
}
.o_kanban_renderer {
.o_kanban_record.o_kanban_attachment,
.o_kanban_record .o_kanban_attachment {
padding: map-get($spacers, 0);
+7 -2
View File
@@ -12,6 +12,7 @@
<field name="description"/>
<field name="is_member"/>
<field name="group_ids"/>
<field name="active"/>
<templates>
<t t-name="kanban-description">
<div class="oe_group_description" t-if="record.description.raw_value">
@@ -19,11 +20,14 @@
</div>
</t>
<t t-name="kanban-box">
<div class="oe_module_vignette oe_kanban_global_click d-flex align-items-center">
<div class="o_mail_channel_kanban oe_module_vignette oe_kanban_global_click d-flex align-items-center">
<div class="ribbon ribbon-top-right o_small" attrs="{'invisible': [('active', '=', True)]}">
<span class="bg-danger">Archived</span>
</div>
<img t-att-src="kanban_image('mail.channel', 'avatar_128', record.id.raw_value)" class="oe_module_icon" alt="Channel"/>
<div class="oe_module_desc">
<h4 class="o_kanban_record_title">#<field name="name"/></h4>
<p class="oe_module_name">
<p class="oe_module_name" t-att-class="!record.active.raw_value ? 'o_module_desc_short': ''">
<field name="description"/>
</p>
<button type="object" attrs="{'invisible':['|', ('is_member','=',True), ('group_ids', '!=', [])]}" class="btn btn-primary float-end" name="channel_join">Join</button>
@@ -46,6 +50,7 @@
<div class="oe_button_box" name="button_box"/>
<field name="avatar_128" invisible="1"/>
<field name="image_128" widget="image" class="oe_avatar" options="{'size': [90, 90], 'preview_image':'avatar_128'}"/>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<label for="name" string="Group Name"/>
<h1>