forked from Mapan/odoo17e
45 lines
2.5 KiB
XML
45 lines
2.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<template id="linkedin_preview" t-name="LinkedIn Preview">
|
|
<div class="o_social_preview o_social_linkedin_preview">
|
|
<div t-attf-class="shadow-sm bg-white px-3 overflow-hidden border rounded
|
|
#{'pt-4' if link_preview else 'py-4'}">
|
|
<div class="o_social_preview_header d-flex align-content-between my-3">
|
|
<span class="o_social_preview_icon_wrapper overflow-hidden me-2">
|
|
<i class="fa fa-linkedin text-white fa-2x"/>
|
|
</span>
|
|
<div class="o_social_preview_author">
|
|
<div><b>LinkedIn Post</b></div>
|
|
<a t-if="live_post_link" t-attf-href="#{live_post_link}" target="blank"><small t-esc="published_date"/></a>
|
|
<t t-else=""><small t-esc="published_date"/></t>
|
|
</div>
|
|
</div>
|
|
<div class="o_social_preview_message">
|
|
<div t-esc="message"></div>
|
|
</div>
|
|
<div class="o_social_stream_post_image d-flex mx-n3 overflow-hidden">
|
|
<t t-foreach="image_urls" t-as="image_url">
|
|
<a t-if="image_url_index == 1 and len(image_urls) > 2" class="o_social_stream_post_image_more position-relative d-flex ms-1">
|
|
<img t-att-src="image_url" alt="Post Image" />
|
|
<div class="o_social_stream_post_image_more_overlay d-flex align-items-center h-100 w-100 text-white justify-content-center position-absolute h1 m-0" style="user-select: none;">
|
|
+<t t-esc="len(image_urls) - 2"/>
|
|
</div>
|
|
</a>
|
|
<a t-elif="image_url_index < 2" class="w-100"
|
|
t-att-href="link_preview.get('url')" target="_blank">
|
|
<img t-att-src="image_url" alt="Post Image" />
|
|
</a>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
<a t-if="link_preview" class="o_social_linkedin_preview_article w-100 py-3 px-4 d-block text-dark"
|
|
t-att-href="link_preview.get('url')" target="_blank">
|
|
<div t-if="link_preview.get('title')" class="fw-bold" t-out="link_preview['title']"/>
|
|
<small t-if="link_preview.get('url')" t-out="link_preview['url']"/>
|
|
</a>
|
|
</div>
|
|
</template>
|
|
</data>
|
|
</odoo>
|