<commit_before>@using CompetitionPlatform.Helpers
@model CompetitionPlatform.Models.ProjectViewModels.ResultsPartialViewModel

@{
    var containsFirstPlaceWinner = true;
    if (Model.Winners != null)
    {
        containsFirstPlaceWinner = Model.Winners.Any(x => x.Place == 1);
    }
}

@if (Model.Status == Status.Archive)
{
    var prizeFund = Model.Winners.Where(winner => winner.Budget != null).Sum(winner => (double)winner.Budget);
    var placeCounter = 0;
    var secondPlaceWinnerStyle = "col-xs-6 col-sm-3";
    <div>
        @if (!containsFirstPlaceWinner)
        {
            <p>
                For this project, none of the submitted results matched our experts expectations, so we decided not to award the first prize.
            </p>
        }
    </div>

    <div class="winners_list">
        <div class="row">
            @foreach (var winner in Model.Winners)
            {
                placeCounter = placeCounter + 1;
                var voteVotes = winner.Votes == 1 ? "vote" : "votes";
                var winnerAvatar = Model.Avatars[winner.WinnerIdentifier];
                if (winner.Place == 1)
                {
                    <div class="col-xs-6 col-sm-3">
                        <div class="winners_item winners_item--first">
                            <div class="winners_item__user">
                                <div class="winners_item__img">
                                    <a href="/userprofile/@winner.WinnerIdentifier">
                                        <img src="@ViewHelper.GetAvatarOrDefault(winnerAvatar)" alt="@winner.FullName">
                                    </a>
                                </div>
                                <span class="winners_item__label">1</span>
                            </div>
                            <div class="winners_item__title">
                                <a href="/userprofile/@winner.WinnerIdentifier">@winner.FullName</a>
                            </div>
                            <div class="prize__value">$@winner.Budget</div>
                        </div>
                    </div>
                }
                else
                {
                    if (placeCounter == 5)
                    {
                        secondPlaceWinnerStyle = "col-xs-12 col-sm-12";
                    }
                    <div class="@secondPlaceWinnerStyle">
                        <div class="winners_item">
                            <div class="winners_item__user">
                                <div class="winners_item__img">
                                    <a href="/userprofile/@winner.WinnerIdentifier">
                                        <img src="@ViewHelper.GetAvatarOrDefault(winnerAvatar)" alt="@winner.FullName">
                                    </a>
                                </div>
                                <span class="winners_item__label">2</span>
                            </div>
                            <div class="winners_item__title">
                                <a href="/userprofile/@winner.WinnerIdentifier">@winner.FullName</a>
                            </div>
                            <div class="prize__value">$@winner.Budget</div>
                        </div>
                    </div>

                }
            }
        </div>
    </div>

    <div class="banner banner--results">
        <div class="banner__content">
            <div class="table-responsive">
                <table class="table">
                    <tr>
                        <td>
                            <div class="prize__value">$@prizeFund</div>
                            <span>Prize fund</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.ParticipantCount</div>
                            <span>Participants</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.DaysOfContest</div>
                            <span>Days of the contest</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.Results.Count()</div>
                            <span>Results</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.Winners.Count()</div>
                            <span>Winners</span>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
}
<commit_msg>In the winners tab, hide winning sum if it equals 0.<commit_after>@using CompetitionPlatform.Helpers
@model CompetitionPlatform.Models.ProjectViewModels.ResultsPartialViewModel

@{
    var containsFirstPlaceWinner = true;
    if (Model.Winners != null)
    {
        containsFirstPlaceWinner = Model.Winners.Any(x => x.Place == 1);
    }
}

@if (Model.Status == Status.Archive)
{
    var prizeFund = Model.Winners.Where(winner => winner.Budget != null).Sum(winner => (double)winner.Budget);
    var placeCounter = 0;
    var secondPlaceWinnerStyle = "col-xs-6 col-sm-3";
    <div>
        @if (!containsFirstPlaceWinner)
        {
            <p>
                For this project, none of the submitted results matched our experts expectations, so we decided not to award the first prize.
            </p>
        }
    </div>

    <div class="winners_list">
        <div class="row">
            @foreach (var winner in Model.Winners)
            {
                placeCounter = placeCounter + 1;
                var voteVotes = winner.Votes == 1 ? "vote" : "votes";
                var winnerAvatar = Model.Avatars[winner.WinnerIdentifier];
                if (winner.Place == 1)
                {
                    <div class="col-xs-6 col-sm-3">
                        <div class="winners_item winners_item--first">
                            <div class="winners_item__user">
                                <div class="winners_item__img">
                                    <a href="/userprofile/@winner.WinnerIdentifier">
                                        <img src="@ViewHelper.GetAvatarOrDefault(winnerAvatar)" alt="@winner.FullName">
                                    </a>
                                </div>
                                <span class="winners_item__label">1</span>
                            </div>
                            <div class="winners_item__title">
                                <a href="/userprofile/@winner.WinnerIdentifier">@winner.FullName</a>
                            </div>
                            @if (winner.Budget != null && winner.Budget > 0)
                            {
                                <div class="prize__value">$@winner.Budget</div>
                            }
                        </div>
                    </div>
                }
                else
                {
                    if (placeCounter == 5)
                    {
                        secondPlaceWinnerStyle = "col-xs-12 col-sm-12";
                    }
                    <div class="@secondPlaceWinnerStyle">
                        <div class="winners_item">
                            <div class="winners_item__user">
                                <div class="winners_item__img">
                                    <a href="/userprofile/@winner.WinnerIdentifier">
                                        <img src="@ViewHelper.GetAvatarOrDefault(winnerAvatar)" alt="@winner.FullName">
                                    </a>
                                </div>
                                <span class="winners_item__label">2</span>
                            </div>
                            <div class="winners_item__title">
                                <a href="/userprofile/@winner.WinnerIdentifier">@winner.FullName</a>
                            </div>
                            @if (winner.Budget != null && winner.Budget > 0)
                            {
                                <div class="prize__value">$@winner.Budget</div>
                            }

                        </div>
                    </div>

                }
            }
        </div>
    </div>

    <div class="banner banner--results">
        <div class="banner__content">
            <div class="table-responsive">
                <table class="table">
                    <tr>
                        <td>
                            <div class="prize__value">$@prizeFund</div>
                            <span>Prize fund</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.ParticipantCount</div>
                            <span>Participants</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.DaysOfContest</div>
                            <span>Days of the contest</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.Results.Count()</div>
                            <span>Results</span>
                        </td>
                        <td>
                            <div class="prize__value">@Model.Winners.Count()</div>
                            <span>Winners</span>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
}

{'fraction_non_alphanumeric': 0.10834553440702782, 'fraction_numerical': 0.0036603221083455345, 'mean_word_length': 0.9778697001034126, 'pattern_counts': {'":': 0, '<': 175, '<?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': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4330874', 'n_tokens_mistral': 2478, 'n_tokens_neox': 2281, 'n_words': 400}