<commit_before>@(proposal: models.Proposal, score: Int, totalVotesCast: Long, totalVotes: Long, allVotes: List[(String, Double)], nextToBeReviewer:Option[Proposal])(implicit flash: Flash, lang: Lang, uuid: String, req:RequestHeader)

@main("Votes for " + proposal.id + "/" + proposal.title) {
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3><i class="icon-stackexchange"></i> Proposal @proposal.title</h3>
                </div>

                @if(flash.get("error").isDefined) {
                    <div class="alert alert-danger alert-dismissable col-md-12">
                        <strong>Error :</strong>
                        @flash.get("error").get
                    </div>
                }
                @if(flash.get("success").isDefined) {
                    <div class="alert alert-success alert-dismissable col-md-12">
                    @flash.get("success").get
                    </div>
                }
            </div>
        </div>

        <div class="col-md-4">
            <div class="panel-body">
                <h3>Current score</h3>
                <p>Total score : @score</p>
                @if(totalVotesCast>0){
                    <p>Average score : @library.Stats.average(allVotes.map(_._2))</p>
                }
                <p>Total votes cast : @totalVotesCast</p>
                <p>Total votes : @totalVotes</p>
                <p>Standard deviation : @library.Stats.standardDeviation(allVotes.map(_._2))</p>
            </div>
        </div>

        <div class="col-md-8">
            <div class="panel-body">
                <h3>All votes</h3>
                <div class="media">
                  @allVotes.sortBy(_._2).map { case (author, vote) =>
                    <div class="media-body">
                        <span class="pull-left">@tags.renderGravatar(author, showName = false)</span>&nbsp;voted @tags.renderVote(vote.toInt)
                    </div>
                }
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-body">
                    <a class="btn btn-warning" accesskey="r" href="@routes.CFPAdmin.openForReview(proposal.id)"><i class="icon-backward"></i>
                        Review or change your vote</a>
                    <a class="btn btn-primary" accesskey="h" href="@routes.CFPAdmin.index()"><i class="icon-home"></i> Go back to home</a>

                @nextToBeReviewer.map{nextProposal=>
                    <a class="btn btn-success" accesskey="n" href="@routes.CFPAdmin.openForReview(nextProposal.id)"><i class="icon-forward"></i> Continue and evaluate next talk</a>

                }.getOrElse{
                    <a class="btn btn-default" href="@routes.CFPAdmin.index()">No more proposal to be reviewed</a>
                }
                </div>
            </div>
        </div>
    </div>
}<commit_msg>Hide votes for your talk<commit_after>@(proposal: models.Proposal, score: Int, totalVotesCast: Long, totalVotes: Long, allVotes: List[(String, Double)], nextToBeReviewer:Option[Proposal])(implicit flash: Flash, lang: Lang, uuid: String, req:RequestHeader)

@main("Votes for " + proposal.id + "/" + proposal.title) {
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3><i class="icon-stackexchange"></i> Proposal @proposal.title</h3>
                </div>

                @if(flash.get("error").isDefined) {
                    <div class="alert alert-danger alert-dismissable col-md-12">
                        <strong>Error :</strong>
                        @flash.get("error").get
                    </div>
                }
                @if(flash.get("success").isDefined) {
                    <div class="alert alert-success alert-dismissable col-md-12">
                    @flash.get("success").get
                    </div>
                }
            </div>
        </div>

        <div class="col-md-4">
            <div class="panel-body">
                <h3>Current score</h3>
                <p>Total score : @score</p>
                @if(totalVotesCast>0){
                    <p>Average score : @library.Stats.average(allVotes.map(_._2))</p>
                }
                <p>Total votes cast : @totalVotesCast</p>
                <p>Total votes : @totalVotes</p>
                <p>Standard deviation : @library.Stats.standardDeviation(allVotes.map(_._2))</p>
            </div>
        </div>

        <div class="col-md-8">
            <div class="panel-body">
                <h3>All votes</h3>
                @if(proposal.mainSpeaker==uuid){
                    <em>Sorry, we do not display votes for your talk</em>
                }else{
                    <div class="media">
                      @allVotes.sortBy(_._2).map { case (author, vote) =>
                        <div class="media-body">
                            <span class="pull-left">@tags.renderGravatar(author, showName = false)</span>&nbsp;voted @tags.renderVote(vote.toInt)
                        </div>
                    }
                    </div>
                }
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-body">
                    <a class="btn btn-warning" accesskey="r" href="@routes.CFPAdmin.openForReview(proposal.id)"><i class="icon-backward"></i>
                        Review or change your vote</a>
                    <a class="btn btn-primary" accesskey="h" href="@routes.CFPAdmin.index()"><i class="icon-home"></i> Go back to home</a>

                @nextToBeReviewer.map{nextProposal=>
                    <a class="btn btn-success" accesskey="n" href="@routes.CFPAdmin.openForReview(nextProposal.id)"><i class="icon-forward"></i> Continue and evaluate next talk</a>

                }.getOrElse{
                    <a class="btn btn-default" href="@routes.CFPAdmin.index()">No more proposal to be reviewed</a>
                }
                </div>
            </div>
        </div>
    </div>
}
{'fraction_non_alphanumeric': 0.1515769653224541, 'fraction_numerical': 0.006276478895339714, 'mean_word_length': 1.5424810530514559, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 147, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6882501', 'n_tokens_mistral': 1923, 'n_tokens_neox': 1796, 'n_words': 339}