Files
enterprise-addons/social_linkedin/views/social_linkedin_preview.xml
T

43 lines
2.4 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 bg-white border rounded overflow-hidden">
<div class="o_social_preview_header d-flex align-content-between m-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 pb-3 mx-3" t-out="message"/>
<a t-att-href="link_preview.get('url')" target="_blank">
<div t-attf-class="o_social_stream_post_image d-flex overflow-hidden
{{link_preview.get('url') and 'o_social_stream_post_image_clickable'}}">
<t t-foreach="image_urls" t-as="image_url">
<div 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 pe-none" style="user-select: none;">
+<t t-esc="len(image_urls) - 2"/>
</div>
</div>
<div t-elif="image_url_index &lt; 2" class="w-100">
<img t-att-src="image_url" alt="Post Image" />
</div>
</t>
</div>
<div t-if="link_preview"
class="o_social_linkedin_preview_article w-100 px-3 py-2 d-block text-dark">
<div t-if="link_preview.get('title')" class="fw-bold" t-out="link_preview['title']"/>
<small t-out="link_preview['domain']"/>
</div>
</a>
</div>
</template>
</data>
</odoo>