<commit_before>@extends('app')

@section('head')
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script src="{{ URL::asset('js/votingChart.js') }}"></script>
@stop

@section('content')
    <h1>Προβολή ψηφοφορίας</h1>

    <div class="jumbotron">
        <h1>{{ $voting->title }}</h1>

        <p>
            Τύπος: {{ $type->title }}
        </p>
        <p>
            Αντικείμενο: {{ $objective->title }}
        </p>
        @if(count($memberVotes) > 0)
            <p>
                <a class="btn btn-primary btn-lg" href="/votings/{{ $voting->id }}/download" role="button"><span class="glyphicon glyphicon-cloud-download"></span> Κατέβασμα αποτελεσμάτων</a>
            </p>
        @endif
    </div>

    {{-- Google Chart --}}
    <div id="piechart" style="width: 900px; height: 500px; display: block; margin: 0 auto;"></div>

    {{-- Check if the voting has any votes, and show them --}}
    @if(count($memberVotes) > 0)
        <div class="panel panel-default">
            <div class="panel-heading">Αποτελέσματα</div>

            <div class="table-responsive">
                <table class="table">
                    <thead>
                        <th>Ονοματεπώνυμο</th>
                        <th>Ψήφος</th>
                    </thead>
                    <tbody>
                        @foreach($memberVotes as $mv)
                            <tr>
                                <td>
                                    {{ $mv['member'] }}
                                </td>
                                <td><commit_msg>Google Chart does not show if there are no votes<commit_after>@extends('app')

@section('head')
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script src="{{ URL::asset('js/votingChart.js') }}"></script>
@stop

@section('content')
    <h1>Προβολή ψηφοφορίας</h1>

    <div class="jumbotron">
        <h1>{{ $voting->title }}</h1>

        <p>
            Τύπος: {{ $type->title }}
        </p>
        <p>
            Αντικείμενο: {{ $objective->title }}
        </p>
        @if(count($memberVotes) > 0)
            <p>
                <a class="btn btn-primary btn-lg" href="/votings/{{ $voting->id }}/download" role="button"><span class="glyphicon glyphicon-cloud-download"></span> Κατέβασμα αποτελεσμάτων</a>
            </p>
        @endif
    </div>

    {{-- Check if the voting has any votes, and show them --}}
    @if(count($memberVotes) > 0)
        {{-- Google Chart --}}
        <div id="piechart" style="width: 900px; height: 500px; display: block; margin: 0 auto;"></div>

        {{-- Table with all the votes --}}
        <div class="panel panel-default">
            <div class="panel-heading">Αποτελέσματα</div>

            <div class="table-responsive">
                <table class="table">
                    <thead>
                        <th>Ονοματεπώνυμο</th>
                        <th>Ψήφος</th>
                    </thead>
                    <tbody>
                        @foreach($memberVotes as $mv)
                            <tr>
                                <td>
                                    {{ $mv['member'] }}
                                </td>
                                <td>
{'fraction_non_alphanumeric': 0.1653398652786283, 'fraction_numerical': 0.007960808328230252, 'mean_word_length': 1.439880507841673, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 91, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3209576', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1003, 'n_words': 195}