<commit_before><?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <!--
            Integrate Livechat in Common Frontend for Website
            Template registering all the assets required to execute the Livechat from a page containing Odoo
        -->
        <template id="assets_frontend" name="im_livechat assets frontend" inherit_id="website.assets_frontend">
            <xpath expr="." position="inside">
                <script type="text/javascript" src="/bus/static/src/js/bus.js"></script>
                <script type="text/javascript" src="/mail/static/src/js/chat_window.js"></script>
                <script type="text/javascript" src="/mail/static/src/js/thread.js"></script>
                <script type="text/javascript" src="/im_livechat/static/src/js/im_livechat.js"></script>
                <link rel="stylesheet" href="/mail/static/src/less/chat_window.less"></link>
                <link rel="stylesheet" href="/mail/static/src/less/thread.less"></link>
                <link rel="stylesheet" href="/im_livechat/static/src/less/im_livechat.less"/>
            </xpath>
        </template>
        <template id="loader" inherit_id="website.layout" name="Livechat : include loader on Website">
            <xpath expr="//div[@id='wrapwrap']" position="after">
                <t t-if="website and website.channel_id">
                    <script>
                        <t t-call="im_livechat.loader">
                            <t t-set="channel" t-value="website.channel_id.id"/>
                        </t>
                    </script>
                </t>
            </xpath>
        </template>

        <!-- Layout add footer -->
        <template id="header_footer_custom" inherit_id="website.footer_default" name="Footer Rating Livechat Link">
            <xpath expr="//ul[@id='products']" position="inside">
                <li><a href="/livechat/">Livechat Support</a></li>
            </xpath>
        </template>

        <!-- Page Layout -->
        <template id="channel_page" name="Livechat Channel Satisfaction Page" page="True">
            <t t-call="website.layout">
              <div id="wrap">
                <div class="container">
                    <!-- published button -->
                    <t t-call="website.publish_management">
                        <t t-set="object" t-value="channel"/>
                        <t t-set="publish_edit" t-value="True"/>
                    </t>

                    <h1><span>Livechat Channel</span>  <small t-field="channel.name" /></h1>
                    <div t-field="channel.website_description" class="oe_structure mt16" />
                    <div class="row mt32">
                        <div class="col-md-8">
                            <t t-if="len(ratings) &gt; 0">
                                <div class="row">
                                    <h3>Statistics</h3>
                                    <div class="row">
                                        <div class="col-md-3">
                                            <div class="panel panel-warming">
                                                <div class="panel-body text-center bg-warning">
                                                    <img src="/rating/static/src/img/rating_5.png" style="height:50px"/>
                                                </div>
                                                <div class="panel-body text-center bg-warning">
                                                    <h2 style="margin: 0">
                                                        <b style="font-size: 50px">
                                                            <t t-esc="percentage['okay']" />
                                                        </b>
                                                        <small>%</small>
                                                    </h2>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="panel panel-success">
                                                <div class="panel-body text-center bg-success">
                                                    <img src="/rating/static/src/img/rating_10.png" style="height:60px"/>
                                                </div>
                                                <div class="panel-body text-center bg-success">
                                                    <h2 style="margin: 0">
                                                        <b style="font-size: 60px">
                                                            <t t-esc="percentage['great']" />
                                                        </b>
                                                        <small>%</small>
                                                    </h2>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="panel panel-danger">
                                                <div class="panel-body text-center bg-danger">
                                                    <img src="/rating/static/src/img/rating_1.png" style="height:40px"/>
                                                </div>
                                                <div class="panel-body text-center bg-danger">
                                                    <h2 style="margin: 0">
                                                        <b style="font-size: 40px">
                                                            <t t-esc="percentage['bad']" />
                                                        </b>
                                                        <small>%</small>
                                                    </h2>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12 mb32">
                                        <h3>The <t t-esc="len(ratings)"/> last feedbacks</h3>
                                        <div style="text-align:center">
                                            <t t-foreach="ratings" t-as="rating" class="media">
                                                <img t-attf-src='/rating/static/src/img/rating_#{int(rating.rating)}.png' t-att-alt="rating.res_name"/>
                                                <t t-if="(rating_index+1) % 10 == 0">
                                                    <br/>
                                                </t>
                                            </t>
                                        </div>
                                    </div>
                                </div>
                            </t>
                            <t t-if="len(ratings) == 0">
                                <h4 style="text-align:center">This is no rating for this channel for now.</h4>
                            </t>
                        </div>
                        <div class="col-md-4 mb32">
                            <h3>The Team</h3>
                            <t t-foreach="team" t-as="user" class="media">
                                <div class="media">
                                    <div class="pull-left">
                                        <img t-att-src="'data:image/png;base64,' + user.image_small" class="img-rounded" t-att-alt="user.name"/>
                                    </div>
                                    <div class="media-body">
                                        <h5><t t-esc="user.name"/></h5><commit_msg>[FIX] website_livechat: verify if image_small is set<commit_after><?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <!--
            Integrate Livechat in Common Frontend for Website
            Template registering all the assets required to execute the Livechat from a page containing Odoo
        -->
        <template id="assets_frontend" name="im_livechat assets frontend" inherit_id="website.assets_frontend">
            <xpath expr="." position="inside">
                <script type="text/javascript" src="/bus/static/src/js/bus.js"></script>
                <script type="text/javascript" src="/mail/static/src/js/chat_window.js"></script>
                <script type="text/javascript" src="/mail/static/src/js/thread.js"></script>
                <script type="text/javascript" src="/im_livechat/static/src/js/im_livechat.js"></script>
                <link rel="stylesheet" href="/mail/static/src/less/chat_window.less"></link>
                <link rel="stylesheet" href="/mail/static/src/less/thread.less"></link>
                <link rel="stylesheet" href="/im_livechat/static/src/less/im_livechat.less"/>
            </xpath>
        </template>
        <template id="loader" inherit_id="website.layout" name="Livechat : include loader on Website">
            <xpath expr="//div[@id='wrapwrap']" position="after">
                <t t-if="website and website.channel_id">
                    <script>
                        <t t-call="im_livechat.loader">
                            <t t-set="channel" t-value="website.channel_id.id"/>
                        </t>
                    </script>
                </t>
            </xpath>
        </template>

        <!-- Layout add footer -->
        <template id="header_footer_custom" inherit_id="website.footer_default" name="Footer Rating Livechat Link">
            <xpath expr="//ul[@id='products']" position="inside">
                <li><a href="/livechat/">Livechat Support</a></li>
            </xpath>
        </template>

        <!-- Page Layout -->
        <template id="channel_page" name="Livechat Channel Satisfaction Page" page="True">
            <t t-call="website.layout">
              <div id="wrap">
                <div class="container">
                    <!-- published button -->
                    <t t-call="website.publish_management">
                        <t t-set="object" t-value="channel"/>
                        <t t-set="publish_edit" t-value="True"/>
                    </t>

                    <h1><span>Livechat Channel</span>  <small t-field="channel.name" /></h1>
                    <div t-field="channel.website_description" class="oe_structure mt16" />
                    <div class="row mt32">
                        <div class="col-md-8">
                            <t t-if="len(ratings) &gt; 0">
                                <div class="row">
                                    <h3>Statistics</h3>
                                    <div class="row">
                                        <div class="col-md-3">
                                            <div class="panel panel-warming">
                                                <div class="panel-body text-center bg-warning">
                                                    <img src="/rating/static/src/img/rating_5.png" style="height:50px"/>
                                                </div>
                                                <div class="panel-body text-center bg-warning">
                                                    <h2 style="margin: 0">
                                                        <b style="font-size: 50px">
                                                            <t t-esc="percentage['okay']" />
                                                        </b>
                                                        <small>%</small>
                                                    </h2>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <div class="panel panel-success">
                                                <div class="panel-body text-center bg-success">
                                                    <img src="/rating/static/src/img/rating_10.png" style="height:60px"/>
                                                </div>
                                                <div class="panel-body text-center bg-success">
                                                    <h2 style="margin: 0">
                                                        <b style="font-size: 60px">
                                                            <t t-esc="percentage['great']" />
                                                        </b>
                                                        <small>%</small>
                                                    </h2>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <div class="panel panel-danger">
                                                <div class="panel-body text-center bg-danger">
                                                    <img src="/rating/static/src/img/rating_1.png" style="height:40px"/>
                                                </div>
                                                <div class="panel-body text-center bg-danger">
                                                    <h2 style="margin: 0">
                                                        <b style="font-size: 40px">
                                                            <t t-esc="percentage['bad']" />
                                                        </b>
                                                        <small>%</small>
                                                    </h2>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-md-12 mb32">
                                        <h3>The <t t-esc="len(ratings)"/> last feedbacks</h3>
                                        <div style="text-align:center">
                                            <t t-foreach="ratings" t-as="rating" class="media">
                                                <img t-attf-src='/rating/static/src/img/rating_#{int(rating.rating)}.png' t-att-alt="rating.res_name"/>
                                                <t t-if="(rating_index+1) % 10 == 0">
                                                    <br/>
                                                </t>
                                            </t>
                                        </div>
                                    </div>
                                </div>
                            </t>
                            <t t-if="len(ratings) == 0">
                                <h4 style="text-align:center">This is no rating for this channel for now.</h4>
                            </t>
                        </div>
                        <div class="col-md-4 mb32">
                            <h3>The Team</h3>
                            <t t-foreach="team" t-as="user" class="media">
                                <div class="media">
                                    <div class="pull-left">
                                        <img t-att-src="user.image_small and ('data:image/png;base64,' + user.image_small) or '/web/static/src/img/placeholder.png'"
                                            class="img-rounded" t-att-alt="user.name"/>
                                    </div>
                                    <div class="media-body">
                                        <h5><t t-esc="user.name"/></h5>
{'fraction_non_alphanumeric': 0.11582729431825102, 'fraction_numerical': 0.007673101516351014, 'mean_word_length': 0.7333755541481951, 'pattern_counts': {'":': 0, '<': 297, '<?xml version=': 2, '>': 297, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 240, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4434913', 'n_tokens_mistral': 3407, 'n_tokens_neox': 3236, 'n_words': 639}