<?xml version="1.0"?>
<t t-name="digest.digest_mail_main">
<div id="header_background">
    <div class="global_layout" id="header">
        <div style="overflow: auto;">
            <p t-field="company.name" class="company_name"/>
            <a t-att-href="top_button_url" target="_blank"><span t-esc="top_button_label" class="button" id="button_connect"/></a>
        </div>
        <div class="title_subtitle">
            <p t-esc="title"/>
            <p t-if="sub_title" t-esc="sub_title"/>
        </div>
        <div t-esc="formatted_date" class="date"/>
    </div>
</div>

<div style="background-color: #eeeeee;">
<div t-foreach="tips" t-as="tip" t-out="tip" class="global_layout"/>

<div t-if="kpi_data" class="global_layout" style="padding-bottom: 0;">
    <t t-set="kpi_color" t-value="'kpi_border_col'"/>
    <div t-foreach="kpi_data" t-as="kpi_info" class="kpi_row_footer">
        <div t-if="kpi_info.get('kpi_col1') or kpi_info.get('kpi_col2') or kpi_info.get('kpi_col3')" t-att-data-field="kpi_info['kpi_name']">
            <div class="kpi_header">
                <span t-esc="kpi_info['kpi_fullname']" style="vertical-align: middle;"/>
                <a t-if="kpi_info['kpi_action']" t-att-href="'/web#action=%s' % kpi_info['kpi_action']"><span class="button" id="button_open_report">Open Report</span></a>
            </div>
            <div t-if="kpi_info.get('kpi_col1')" class="kpi_cell kpi_cell_border">
                <div t-call="digest.digest_tool_kpi">
                    <t t-set="kpi_value" t-value="kpi_info['kpi_col1']['value']"/>
                    <t t-set="kpi_margin" t-value="kpi_info['kpi_col1'].get('margin')"/>
                    <t t-set="kpi_subtitle" t-value="kpi_info['kpi_col1']['col_subtitle']"/>
                </div>
            </div>
            <div t-if="kpi_info.get('kpi_col2')" class="kpi_cell kpi_cell_center">
                <div t-call="digest.digest_tool_kpi">
                    <t t-set="kpi_value" t-value="kpi_info['kpi_col2']['value']"/>
                    <t t-set="kpi_margin" t-value="kpi_info['kpi_col2'].get('margin')"/>
                    <t t-set="kpi_subtitle" t-value="kpi_info['kpi_col2']['col_subtitle']"/>
                </div>
            </div>
            <div t-if="kpi_info.get('kpi_col3')" class="kpi_cell kpi_cell_border">
                <div t-call="digest.digest_tool_kpi">
                    <t t-set="kpi_value" t-value="kpi_info['kpi_col3']['value']"/>
                    <t t-set="kpi_margin" t-value="kpi_info['kpi_col3'].get('margin')"/>
                    <t t-set="kpi_subtitle" t-value="kpi_info['kpi_col3']['col_subtitle']"/>
                </div>
            </div>
            <div class="kpi_trick"/>
        </div>
    </div>
</div>

<t t-if="body" t-out="body"/>

<div>
    <div class="global_layout">
        <div class="preference_div">
            <div t-if="preferences" t-foreach="preferences" t-as="preference" class="preference">
                <t t-out="preference"/>
            </div>
            <div class="by_odoo">
                Sent by <a href="https://www.odoo.com" target="_blank" class="odoo_link"><span class="odoo_link_text">Odoo</span></a>
                <t t-if="unsubscribe_token">
                    –
                    <a t-attf-href="/digest/#{object.id}/unsubscribe?token=#{unsubscribe_token}&amp;user_id=#{user.id}" target="_blank" style="text-decoration: none;">
                        <span style="color: #8f8f8f;">Unsubscribe</span>
                    </a>
                </t>
                <t t-elif="object and object._name == 'digest.digest'">
                    –
                    <a t-att-href="'/web#view_type=form&amp;model=digest.digest&amp;id=%s' % object.id" target="_blank" style="text-decoration: none;">
                        <span style="color: #8f8f8f;">Unsubscribe</span>
                    </a>
                </t>
            </div>
        </div>
    </div>
</div>

<div t-if="display_mobile_banner" t-call="digest.digest_section_mobile"/>

<div class="global_layout" id="footer">
    <p style="font-weight: bold;" t-esc="company.name"/>
    <p class="by_odoo" id="powered">
        Powered by <a href="https://www.odoo.com" target="_blank" class="odoo_link"><span class="odoo_link_text">Odoo</span></a>
    </p>
</div>
</div>
    </t>


    