<commit_before><?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <data>
        <!-- === Project Page === -->
        <!-- The corresponding [crowdfunding.project] or [crowdfunding.participant] is passed to this template
         as context in variable [project] or [participant] -->
        <template id="presentation_page">
            <t t-set="title"><t t-esc="project.name"/> | TOGETHER - Compassion Switzerland Fundraising</t>
            <t t-call="crowdfunding_compassion.layout">

                <!-- Hero -->
                <section class="project-hero mb-5">
                    <div class="container">
                        <h1 class="hero-title">
                            <t t-esc="project.name"/>
                        </h1>
                        <div class="row">
                            <div class="col-12 col-lg-8 mb-4 mb-lg-0">
                                <img alt="Project image" t-attf-src="data:image/png;base64, #{ project.cover_photo }"
                                     class="project-hero__image"/>
                            </div>
                            <div class="col-12 col-lg-4">
                                <div class="card project-hero__card">
                                    <t t-if="model == 'participant'">
                                        <h3 class="blue my-3 text-center">
                                                <t t-esc="'Support ' + participant.name"/>
                                            </h3>
                                            <div class="project-hero__card-content">
                                                <!-- Setup data and display the sponsorship progress -->
                                                <t t-if="participant.number_sponsorships_reached > 1">
                                                    <t t-set="goal_name">sponsored children</t>
                                                </t>
                                                <t t-else="">
                                                    <t t-set="goal_name">sponsored child</t>
                                                </t>
                                                <t t-set="goal_reached" t-value="participant.number_sponsorships_reached"/>
                                                <t t-set="goal_objective" t-value="participant.number_sponsorships_goal"/>
                                                <t t-set="goal_image" t-value="'/crowdfunding_compassion/static/src/img/icn_children.png'"/>
                                                <t t-call="crowdfunding_compassion.goal_progress" t-if="goal_objective"/>

                                                <!-- Setup data and display the fund progress -->
                                                <t t-if="project.product_number_reached > 1">
                                                    <t t-set="goal_name" t-value="project.product_id.crowdfunding_impact_text_passive_plural"/>
                                                </t>
                                                <t t-else="">
                                                    <t t-set="goal_name" t-value="project.product_id.crowdfunding_impact_text_passive_singular"/>
                                                </t>
                                                <t t-set="goal_reached" t-value="participant.product_number_reached"/>
                                                <t t-set="goal_objective" t-value="participant.product_number_goal"/>
                                                <t t-set="goal_image"
                                                   t-value="participant.project_id.product_id.image_medium or '/crowdfunding_compassion/static/src/img/icn_children.png'"/>
                                                <t t-call="crowdfunding_compassion.goal_progress" t-if="goal_objective"/>
                                            </div>
                                            <div class="project-hero__card-cta">
                                                <a t-attf-href="/project/#{ project.id }/donation/?participant=#{ participant.id }">
                                                    <button type="button" class="btn btn-primary btn-lg btn-block mb-2">
                                                        Donate now
                                                    </button>
                                                </a>
                                            </div>
                                    </t>
                                    <t t-else="">
                                        <h3 class="blue my-3 text-center">Support the project</h3>
                                        <div class="project-hero__card-content">
                                            <t t-call="crowdfunding_compassion.project_progress"/>
                                        </div>
                                        <div class="project-hero__card-cta">
                                            <t t-if="project.deadline >= datetime.date.today()">
                                                <a t-attf-href="/project/#{ project.id }/donation">
                                                    <button type="button" class="btn btn-primary btn-lg btn-block mb-2">Donate now</button>
                                                </a>
                                                <a t-if="project.type == 'collective'" t-attf-href="/projects/join/#{project.id}">
                                                    <button type="button" class="btn btn-white btn-lg btn-block mb-2">Join the project</button>
                                                </a>
                                            </t>
                                            <div class="row">
                                                <div class="col project-hero__card-share-text align-self-center">Share with your friends</div>
                                                <div class="col align-self-center">
                                                    <div class="row project-hero__card-share-icons mx-auto">
                                                        <t t-set="compassion_project_base_url" t-value="base_url + '/project'"/>
                                                        <a t-attf-href="https://www.facebook.com/sharer.php?u=#{ compassion_project_base_url }/#{ project.id }" target="_blank">
                                                            <i class="fa fa-facebook-official"/>
                                                        </a>
                                                        <a t-attf-href="https://twitter.com/intent/tweet?url=#{ compassion_project_base_url }/#{ project.id }" target="_blank">
                                                            <i class="fa fa-twitter-square"/>
                                                        </a>
                                                        <a t-attf-href="https://www.linkedin.com/sharing/share-offsite/?url=#{ compassion_project_base_url }/#{ project.id }" target="_blank">
                                                            <i class="fa fa-linkedin"/>
                                                        </a>
                                                        <a t-attf-href="mailto:?subject=I wanted you to see this project&amp;body=Check out this project #{ compassion_project_base_url }/#{ project.id }.">
                                                            <i class="fa fa-at"/>
                                                        </a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </t>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Content -->
                <section class="project-content">
                    <div class="container">
                        <div class="row">
                            <!-- Main content -->
                            <div class="col-12 col-lg-8 mb-5">
                                <div class="project-content__owner mb-4">
                                    <t t-if="model == 'project'">
                                        <img class="profile-pic" t-attf-src="data:image/png;base64, #{ project.owner_participant_id.profile_photo }" alt="Project owner"/>
                                        <h5>
                                            <t t-esc="project.project_owner_id.name" />
                                        </h5>
                                    </t>
                                    <t t-else="">
                                        <img class="profile-pic" t-attf-src="data:image/png;base64, #{ participant.profile_photo }" alt="Participant"/>
                                        <h5>
                                            <t t-esc="participant.partner_id.name" />
                                        </h5>
                                    </t>
                                </div>

                                <t t-if="model == 'project'">
                                    <!-- Project description and video -->
                                    <h3 class="blue my-4">About the project</h3>
                                    <p>
                                        <t t-esc="project.description"/>
                                    </p>
                                    <t t-if="project.presentation_video_embed">
                                        <iframe class="my-3" width="100%" height="400px" t-att-src="project.presentation_video_embed" frameborder="0"/>
                                    </t>
                                </t>


                                <!-- Project owner personal motivation and video -->
                                <h3 class="blue my-4">Why do I engage in this project</h3>
                                <p>
                                    <t t-if="model == 'project'">
                                        <t t-esc="project.personal_motivation"/>
                                        <t t-if="project.owner_participant_id.presentation_video">
                                            <iframe class="my-3" width="100%" height="400px" t-att-src="project.owner_participant_id.presentation_video" frameborder="0"/>
                                        </t>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="participant.personal_motivation"/>
                                        <t t-if="participant.presentation_video">
                                            <iframe class="my-3" width="100%" height="400px" t-att-src="participant.presentation_video" frameborder="0"/>
                                        </t>
                                    </t>
                                </p>

                                <t t-if="model == 'project'">
                                    <t t-if="project.facebook_url or project.instagram_url or project.twitter_url or project.personal_web_page_url">
                                        <h5 class="blue mt-4 uppercase">Follow my project on</h5>
                                    </t>

                                    <t t-if="project.facebook_url"><commit_msg>CO-3367 Line breaks are now reflected on project presentation page<commit_after><?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <data>
        <!-- === Project Page === -->
        <!-- The corresponding [crowdfunding.project] or [crowdfunding.participant] is passed to this template
         as context in variable [project] or [participant] -->
        <template id="presentation_page">
            <t t-set="title"><t t-esc="project.name"/> | TOGETHER - Compassion Switzerland Fundraising</t>
            <t t-call="crowdfunding_compassion.layout">

                <!-- Hero -->
                <section class="project-hero mb-5">
                    <div class="container">
                        <h1 class="hero-title">
                            <t t-esc="project.name"/>
                        </h1>
                        <div class="row">
                            <div class="col-12 col-lg-8 mb-4 mb-lg-0">
                                <img alt="Project image" t-attf-src="data:image/png;base64, #{ project.cover_photo }"
                                     class="project-hero__image"/>
                            </div>
                            <div class="col-12 col-lg-4">
                                <div class="card project-hero__card">
                                    <t t-if="model == 'participant'">
                                        <h3 class="blue my-3 text-center">
                                                <t t-esc="'Support ' + participant.name"/>
                                            </h3>
                                            <div class="project-hero__card-content">
                                                <!-- Setup data and display the sponsorship progress -->
                                                <t t-if="participant.number_sponsorships_reached > 1">
                                                    <t t-set="goal_name">sponsored children</t>
                                                </t>
                                                <t t-else="">
                                                    <t t-set="goal_name">sponsored child</t>
                                                </t>
                                                <t t-set="goal_reached" t-value="participant.number_sponsorships_reached"/>
                                                <t t-set="goal_objective" t-value="participant.number_sponsorships_goal"/>
                                                <t t-set="goal_image" t-value="'/crowdfunding_compassion/static/src/img/icn_children.png'"/>
                                                <t t-call="crowdfunding_compassion.goal_progress" t-if="goal_objective"/>

                                                <!-- Setup data and display the fund progress -->
                                                <t t-if="project.product_number_reached > 1">
                                                    <t t-set="goal_name" t-value="project.product_id.crowdfunding_impact_text_passive_plural"/>
                                                </t>
                                                <t t-else="">
                                                    <t t-set="goal_name" t-value="project.product_id.crowdfunding_impact_text_passive_singular"/>
                                                </t>
                                                <t t-set="goal_reached" t-value="participant.product_number_reached"/>
                                                <t t-set="goal_objective" t-value="participant.product_number_goal"/>
                                                <t t-set="goal_image"
                                                   t-value="participant.project_id.product_id.image_medium or '/crowdfunding_compassion/static/src/img/icn_children.png'"/>
                                                <t t-call="crowdfunding_compassion.goal_progress" t-if="goal_objective"/>
                                            </div>
                                            <div class="project-hero__card-cta">
                                                <a t-attf-href="/project/#{ project.id }/donation/?participant=#{ participant.id }">
                                                    <button type="button" class="btn btn-primary btn-lg btn-block mb-2">
                                                        Donate now
                                                    </button>
                                                </a>
                                            </div>
                                    </t>
                                    <t t-else="">
                                        <h3 class="blue my-3 text-center">Support the project</h3>
                                        <div class="project-hero__card-content">
                                            <t t-call="crowdfunding_compassion.project_progress"/>
                                        </div>
                                        <div class="project-hero__card-cta">
                                            <t t-if="project.deadline >= datetime.date.today()">
                                                <a t-attf-href="/project/#{ project.id }/donation">
                                                    <button type="button" class="btn btn-primary btn-lg btn-block mb-2">Donate now</button>
                                                </a>
                                                <a t-if="project.type == 'collective'" t-attf-href="/projects/join/#{project.id}">
                                                    <button type="button" class="btn btn-white btn-lg btn-block mb-2">Join the project</button>
                                                </a>
                                            </t>
                                            <div class="row">
                                                <div class="col project-hero__card-share-text align-self-center">Share with your friends</div>
                                                <div class="col align-self-center">
                                                    <div class="row project-hero__card-share-icons mx-auto">
                                                        <t t-set="compassion_project_base_url" t-value="base_url + '/project'"/>
                                                        <a t-attf-href="https://www.facebook.com/sharer.php?u=#{ compassion_project_base_url }/#{ project.id }" target="_blank">
                                                            <i class="fa fa-facebook-official"/>
                                                        </a>
                                                        <a t-attf-href="https://twitter.com/intent/tweet?url=#{ compassion_project_base_url }/#{ project.id }" target="_blank">
                                                            <i class="fa fa-twitter-square"/>
                                                        </a>
                                                        <a t-attf-href="https://www.linkedin.com/sharing/share-offsite/?url=#{ compassion_project_base_url }/#{ project.id }" target="_blank">
                                                            <i class="fa fa-linkedin"/>
                                                        </a>
                                                        <a t-attf-href="mailto:?subject=I wanted you to see this project&amp;body=Check out this project #{ compassion_project_base_url }/#{ project.id }.">
                                                            <i class="fa fa-at"/>
                                                        </a>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </t>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Content -->
                <section class="project-content">
                    <div class="container">
                        <div class="row">
                            <!-- Main content -->
                            <div class="col-12 col-lg-8 mb-5">
                                <div class="project-content__owner mb-4">
                                    <t t-if="model == 'project'">
                                        <img class="profile-pic" t-attf-src="data:image/png;base64, #{ project.owner_participant_id.profile_photo }" alt="Project owner"/>
                                        <h5>
                                            <t t-esc="project.project_owner_id.name" />
                                        </h5>
                                    </t>
                                    <t t-else="">
                                        <img class="profile-pic" t-attf-src="data:image/png;base64, #{ participant.profile_photo }" alt="Participant"/>
                                        <h5>
                                            <t t-esc="participant.partner_id.name" />
                                        </h5>
                                    </t>
                                </div>

                                <t t-if="model == 'project'">
                                    <!-- Project description and video -->
                                    <h3 class="blue my-4">About the project</h3>
                                    <p>
                                        <t t-set="description_lines" t-value="project.description.split('\n')" />
                                            <t t-foreach="description_lines" t-as="description_line">
                                                <span t-esc="description_line"/>
                                                <br />
                                            </t>
                                    </p>
                                    <t t-if="project.presentation_video_embed">
                                        <iframe class="my-3" width="100%" height="400px" t-att-src="project.presentation_video_embed" frameborder="0"/>
                                    </t>
                                </t>


                                <!-- Project owner personal motivation and video -->
                                <h3 class="blue my-4">Why do I engage in this project</h3>
                                <p>
                                    <t t-if="model == 'project'">
                                        <t t-esc="project.personal_motivation"/>
                                        <t t-if="project.owner_participant_id.presentation_video">
                                            <iframe class="my-3" width="100%" height="400px" t-att-src="project.owner_participant_id.presentation_video" frameborder="0"/>
                                        </t>
                                    </t>
                                    <t t-else="">
                                        <t t-esc="participant.personal_motivation"/>
                                        <t t-if="participant.presentation_video">
                                            <iframe class="my-3" width="100%" height="400px" t-att-src="participant.presentation_video" frameborder="0"/>
                                        </t>
                                    </t>
                                </p>

                                <t t-if="model == 'project'">
                                    <t t-if="project.facebook_url or project.instagram_url or project.twitter_url or project.personal_web_page_url">
                                        <h5 class="blue mt-4 uppercase">Follow my project on</h5>
                                    </t>

                                    <t t-if="project.facebook_url">
{'fraction_non_alphanumeric': 0.10404819074097477, 'fraction_numerical': 0.006318716036901302, 'mean_word_length': 0.7366495976591075, 'pattern_counts': {'":': 0, '<': 323, '<?xml version=': 2, '>': 329, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 394, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5447570', 'n_tokens_mistral': 4860, 'n_tokens_neox': 4534, 'n_words': 860}