<commit_before>{% load i18n bb_ember static %}

{% tplhandlebars "project" %}
<div id="project-detail">
    <div id="project-detail-header" {{bindAttr class=":campaign-detail amount_asked::without"}}>
        <div class="project-background">
            <div class="project-background-image" {{bindAttr style=backgroundStyle}}></div>
        </div>
        <section class="project-header l-wrapper">
            <article class="project-info">
                <div class="project-meta">
                    <span class="project-location">{{country.name}}</span>
                    <span class="project-category">{{theme.name}}</span>
                </div>
                <h1 class="project-title">{{title}}</h1>
                <p class="project-description">{{pitch}} <a {{action openInFullScreenBox "projectPlan" this}} class="project-more">{% trans "Read full project plan" %}</a></p>
            </article>
            <aside class="project-media">
                <div class="project-share">
                    {{view App.SocialShareView}}
                </div>
                {{#if video_html}}
                    <figure class="project-image">
                        <span {{bindAttr class="partner.id:"}}></span>
                        {{{ video_html }}}
                    </figure>
                {{else}}
                    <figure class="project-image">
                        <span {{bindAttr class="partner.id:"}}></span>
                        <img {{bindAttr src="image.large"}} width="100%" alt="Photo" />
                    </figure>
                {{/if}}
            </aside>
        </section>
        {{partial '_project_actions'}}
    </div>

    <div id="wall">
        <div class="l-wrapper">

            <section id="wallposts">
                {{partial 'wallposts'}}
            </section>

            <section id="sidebar">

                {{#if amount_asked}}
                    <div id="fundraiser-list">
                        {{render 'projectFundraiserList'}}
                    </div>
                {{/if}}

                {{#if tasks}}
                    <div id="task-list">
                        <div class="activity">
                            <header class="activity-header">
                                <h2 class="activity-title">{% trans "Tasks" %}</h2>
                            </header>

                            <ul class="activity-list">

                                {{#if availableTasks}}
                                    {{#each availableTasks}}
                                        {{view App.TaskSummaryView contentBinding='this'}}
                                    {{/each}}
                                {{/if}}

                                {{#if unavailableTasks}}
                                    {{#each unavailableTasks}}
                                        {{view App.TaskSummaryView contentBinding='this'}}
                                    {{/each}}
                                {{/if}}

                            </ul>

                            {{#if isProjectOwner}}
                                <footer class="activity-footer">
                                    {{#linkTo 'taskNew' id class='activity-action' }}
                                        <strong>{% trans "Create a task" %} &raquo;</strong><br />
                                        {% trans "Why not ask your community to help out?" %}
                                    {{/linkTo}}
                                </footer>
                            {{/if}}

                        </div>
                    </div>
                {{else}}
                    {{#if isProjectOwner}}
                        {{#if isStatusCampaign}}
                            <div id="task-list">
                                <div class="activity">
                                    <header class="activity-header">
                                        <h2 class="activity-title">{% trans "Tasks" %}</h2>
                                    </header>

                                    <footer class="activity-footer">
                                        {{#linkTo 'taskNew' id class='activity-action' }}
                                            <strong>{% trans "Create a task" %} &raquo;</strong><br />
                                            {% trans "Why not ask your community to help out?" %}
                                        {{/linkTo}}
                                    </footer>
                                </div>
                            </div>
                        {{/if}}
                    {{/if}}

                {{/if}}

                {{!-- Todo: only show block when there are supporters --}}
                <div id="supporter-list">
                    <div class="activity">

                        <header class="activity-header">
                            <h2 class="activity-title">{% trans "Supporters" %}</h2>
                        </header>

                        {{project-donations class="project-supporters" donations=projectDonations limit=10 showProfile="showProfile"}}

                        <footer class="activity-footer">
                            <a {{action 'addDonation' controllers.project}}  class="activity-action">
                                <strong>{% trans "Support this campaign" %} &raquo;</strong><br />
                                {% trans "And get your name on the wall!" %}
                            </a>
                        </footer>

                    </div>
                </div>

            </section>
            
        </div>
    </div>
</div>

{% endtplhandlebars %}

<commit_msg>Hide support action in list when deadline passed<commit_after>{% load i18n bb_ember static %}

{% tplhandlebars "project" %}
<div id="project-detail">
    <div id="project-detail-header" {{bindAttr class=":campaign-detail amount_asked::without"}}>
        <div class="project-background">
            <div class="project-background-image" {{bindAttr style=backgroundStyle}}></div>
        </div>
        <section class="project-header l-wrapper">
            <article class="project-info">
                <div class="project-meta">
                    <span class="project-location">{{country.name}}</span>
                    <span class="project-category">{{theme.name}}</span>
                </div>
                <h1 class="project-title">{{title}}</h1>
                <p class="project-description">{{pitch}} <a {{action openInFullScreenBox "projectPlan" this}} class="project-more">{% trans "Read full project plan" %}</a></p>
            </article>
            <aside class="project-media">
                <div class="project-share">
                    {{view App.SocialShareView}}
                </div>
                {{#if video_html}}
                    <figure class="project-image">
                        <span {{bindAttr class="partner.id:"}}></span>
                        {{{ video_html }}}
                    </figure>
                {{else}}
                    <figure class="project-image">
                        <span {{bindAttr class="partner.id:"}}></span>
                        <img {{bindAttr src="image.large"}} width="100%" alt="Photo" />
                    </figure>
                {{/if}}
            </aside>
        </section>
        {{partial '_project_actions'}}
    </div>

    <div id="wall">
        <div class="l-wrapper">

            <section id="wallposts">
                {{partial 'wallposts'}}
            </section>

            <section id="sidebar">

                {{#if amount_asked}}
                    <div id="fundraiser-list">
                        {{render 'projectFundraiserList'}}
                    </div>
                {{/if}}

                {{#if tasks}}
                    <div id="task-list">
                        <div class="activity">
                            <header class="activity-header">
                                <h2 class="activity-title">{% trans "Tasks" %}</h2>
                            </header>

                            <ul class="activity-list">

                                {{#if availableTasks}}
                                    {{#each availableTasks}}
                                        {{view App.TaskSummaryView contentBinding='this'}}
                                    {{/each}}
                                {{/if}}

                                {{#if unavailableTasks}}
                                    {{#each unavailableTasks}}
                                        {{view App.TaskSummaryView contentBinding='this'}}
                                    {{/each}}
                                {{/if}}

                            </ul>

                            {{#if isProjectOwner}}
                                <footer class="activity-footer">
                                    {{#linkTo 'taskNew' id class='activity-action' }}
                                        <strong>{% trans "Create a task" %} &raquo;</strong><br />
                                        {% trans "Why not ask your community to help out?" %}
                                    {{/linkTo}}
                                </footer>
                            {{/if}}

                        </div>
                    </div>
                {{else}}
                    {{#if isProjectOwner}}
                        {{#if isStatusCampaign}}
                            <div id="task-list">
                                <div class="activity">
                                    <header class="activity-header">
                                        <h2 class="activity-title">{% trans "Tasks" %}</h2>
                                    </header>

                                    <footer class="activity-footer">
                                        {{#linkTo 'taskNew' id class='activity-action' }}
                                            <strong>{% trans "Create a task" %} &raquo;</strong><br />
                                            {% trans "Why not ask your community to help out?" %}
                                        {{/linkTo}}
                                    </footer>
                                </div>
                            </div>
                        {{/if}}
                    {{/if}}

                {{/if}}

                {{!-- Todo: only show block when there are supporters --}}
                <div id="supporter-list">
                    <div class="activity">

                        <header class="activity-header">
                            <h2 class="activity-title">{% trans "Supporters" %}</h2>
                        </header>

                        {{project-donations class="project-supporters" donations=projectDonations limit=10 showProfile="showProfile"}}
                        
                        {{#unless overDeadline}}
                        <footer class="activity-footer">
                            <a {{action 'addDonation' controllers.project}}  class="activity-action">
                                <strong>{% trans "Support this campaign" %} &raquo;</strong><br />
                                {% trans "And get your name on the wall!" %}
                            </a>
                        </footer>
                        {{/unless}}

                    </div>
                </div>

            </section>
            
        </div>
    </div>
</div>

{% endtplhandlebars %}


{'fraction_non_alphanumeric': 0.13070539419087138, 'fraction_numerical': 0.0025933609958506223, 'mean_word_length': 0.9463324360699865, 'pattern_counts': {'":': 2, '<': 183, '<?xml version=': 0, '>': 183, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 50, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5655825', 'n_tokens_mistral': 2697, 'n_tokens_neox': 2435, 'n_words': 542}