<div class="row">
    <div class="col-sm-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                {{'Matches' | translate}}
            </div>
            <div class="panel-body">
                <table class="table table-condensed">
                    <thead>
                        <tr>
                            <th class="hidetd">{{'Date' | translate}}</th>
                            <th>{{'Teams' | translate}}</th>
                            <th class="hidetd">{{'Result' | translate}}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-hide="tournament.games.length">
                            <td></td>
                            <td>{{'There are no games in this tournament' | translate}}</td>
                        </tr>
                        <tr ng-repeat="game in tournament.games | orderBy: 'startDate':true | pagination: currentPageResultGame * numPerPage | limitTo: numPerPage">
                            <td class="hidetd">{{game.startDate | wizdom365GfFormatDate | date:'HH:mm dd/MM'}}</td>
                            <td>
                                <div class="row showHandSmall" wizdom365-faq-slide-toggle="#row_result_{{game.id}}">
                                    <div class="col-xs-5">
                                        <img height="11" width="16" ng-src="{{game.teamOneObj.flag}}" ng-if="game.teamOneObj.flag" /> {{game.teamOne}}
                                    </div>
                                    <div class="col-xs-2">
                                        vs.
                                    </div>
                                    <div class="col-xs-5">
                                        <img height="11" width="16" ng-src="{{game.teamTwoObj.flag}}" ng-if="game.teamTwoObj.flag" /> {{game.teamTwo}}
                                    </div>
                                </div>
                                <div class="showtd">
                                    <div id="row_result_{{game.id}}" class="wizdom365-faq-slideable" duration="0.5s">
                                        <b>{{'Date' | translate}}</b> : {{game.startDate | wizdom365GfFormatDate | date:'HH:mm dd/MM'}}<br />
                                        <b>{{'Result' | translate}}</b>:
                                        <span ng-show="checkDate(game.startDate)">
                                            <span ng-show="game.finished">{{game.goalsTeamOne}} - {{game.goalsTeamTwo}}</span>
                                            <span ng-hide="game.finished">{{'Started' | translate}} <span ng-show="tournament.isAdmin"><a href="" ng-click="showModalMatch(game)">({{'Enter result' | translate}})</a></span></span>
                                        </span>
                                        <span ng-hide="checkDate(game.startDate)">
                                            {{'Not started' | translate}}
                                        </span>
                                    </div>
                                </div>
                            </td>
                            <td class="hidetd">
                                <div ng-show="checkDate(game.startDate)">
                                    <div ng-show="game.finished">{{game.goalsTeamOne}} - {{game.goalsTeamTwo}}</div>
                                    <div ng-hide="game.finished">{{'Started' | translate}} <span ng-show="tournament.isAdmin"><a href="" ng-click="showModalMatch(game)">({{'Enter result' | translate}})</a></span></div>
                                </div>
                                <div ng-hide="checkDate(game.startDate)">
                                    {{'Not started' | translate}}
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <br />
                <wizdom365-gf-pagination ng-hide="tournament.games.length <= numPerPage" items="tournament.games" current-page="currentPageResultGame" num-per-page="numPerPage"></wizdom365-gf-pagination>
            </div>
        </div>
    </div>
</div>
<div class=" row" ng-show="tournament.specialGames.length">
    <div class="col-sm-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                {{'Special games' | translate}}
            </div>
            <div class="panel-body">
                <table class="table table-condensed">
                    <thead>
                        <tr>
                            <th class="hidetd">{{'Date' | translate}}</th>
                            <th>{{'Question' | translate}}</th>
                            <th class="hidetd">{{'Result' | translate}}</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in tournament.specialGames | orderBy: 'startDate':true | pagination: currentPageResultSpecialGame * numPerPage | limitTo: numPerPage">
                            <td class="hidetd">{{item.startDate | wizdom365GfFormatDate | date:'HH:mm dd/MM'}}</td>
                            <td>
                                <span class="showHand" wizdom365-faq-slide-toggle="#row_result_special_{{item.id}}">
                                    {{item.title}}
                                </span>
                                <div id="row_result_special_{{item.id}}" class="wizdom365-faq-slideable" duration="0.5s">
                                    <div class="showtd">
                                        <b>{{'Date' | translate}}</b>:{{item.startDate | wizdom365GfFormatDate | date:'HH:mm dd/MM'}}<br />
                                        <b>{{'Result' | translate}}</b>:
                                        <span ng-show="checkDate(item.startDate)">
                                            <span ng-show="item.finished">{{'Winner' | translate}}: {{getAnswer(item,item.correctId)}}</span>
                                            <span ng-hide="item.finished">
                                                {{'Started' | translate}} <span ng-show="tournament.isAdmin"><a href="" ng-click="showModalCustom(item)">({{'Enter result' | translate}})</a></span>
                                            </span>
                                        </span>
                                        <span ng-hide="checkDate(item.startDate)">
                                            {{'Not started' | translate}}
                                        </span>
                                    </div>
                                    <b>{{'Possible answers' | translate}}</b>:
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <ul>
                                                <li ng-repeat="option in item.bettingOptions">
                                                    <span>{{option.title}} <b>({{(option.odds).toFixed(2)}})</b></span>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </td>
                            <td class="hidetd">
                                <div ng-show="checkDate(item.startDate)">
                                    <div ng-show="item.finished">{{'Winner' | translate}}: {{getAnswer(item,item.correctId)}}</div>
                                    <div ng-hide="item.finished">
                                        {{'Started' | translate}} <span ng-show="tournament.isAdmin"><a href="" ng-click="showModalCustom(item)">({{'Enter result' | translate}})</a></span>
                                    </div>
                                </div>
                                <div ng-hide="checkDate(item.startDate)">
                                    {{'Not started' | translate}}
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>

                <br />
                <wizdom365-gf-pagination ng-hide="tournament.specialGames.length <= numPerPage" items="tournament.specialGames" current-page="currentPageResultSpecialGame" num-per-page="numPerPage"></wizdom365-gf-pagination>
            </div>
        </div>
    </div>
</div>