<?php echo $__env->make('clumsy::templates.head', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<div class="master">
    <div class="filters">
        <a href="<?php echo route('admin.jury-vote.jury-votes'); ?>" class="btn btn-lg <?php echo $selection ? 'btn-default' : 'btn-info'; ?>">Todos</a>

        <?php
                if (Contest::showShortPreSelectionButtonInJuriAdmin()){?>
                    <a href="<?php echo route('admin.jury-vote.jury-votes', ['selection' => true]); ?>" class="btn btn-lg <?php echo !$selection ? 'btn-default' : 'btn-info'; ?>">Pré-selecção</a>
                <?php }

                ?>




    </div>

    <?php foreach($bands as $band): ?>
        <table border="0" cellpadding="0" cellspacing="0" align="center" width="96%" height="0" class="bandaforjuri">
            <tr align="left" valign="top">
                <td colspan="3">
                    <h2><b><?php echo $band->name; ?></b></h2>
                </td>
            </tr>
            <tr align="left" valign="top">
                <td width="33.33%">
                    <span>Primeira música</span>
                </td>
                <td width="33.33%">
                    <span>Segunda música</span>
                </td>
                <td width="33.33%">
                    <span>ID</span>
                </td>
            </tr>
            <tr align="left" valign="top">
                <td width="33.33%">
                    <iframe src="//www.youtube.com/embed/<?php echo $band->youtube_id; ?>?rel=0" width="310" height="200" frameborder="0" allowfullscreen="true"></iframe>
                </td>
                <td width="33.33%">
                    <?php if($band->second_youtube_id !== ''): ?>
                    <iframe src="//www.youtube.com/embed/<?php echo $band->second_youtube_id; ?>?rel=0" width="310" height="200" frameborder="0" allowfullscreen="true"></iframe>
                    <?php else: ?>
                    Não há segundo video
                    <?php endif; ?>
                </td>
                <td width="33.33%">
                    <?php if($band->interview_youtube_id !== ''): ?>
                    <iframe src="//www.youtube.com/embed/<?php echo $band->interview_youtube_id; ?>?rel=0" width="310" height="200" frameborder="0" allowfullscreen="true"></iframe>
                    <?php else: ?>
                    Não há entrevista
                    <?php endif; ?>
                </td>
            </tr>
            <tr align="left" valign="top">
                <td>
                    <h3>Bio</h3>
                    <p><?php echo $band->bio; ?></p>
                </td>
                <td>
                    <h3>Elementos</h3>
                    <?php foreach($band->elements as $elem): ?>
                        <span><b><?php echo $elem->name; ?></b> - <?php echo $elem->function; ?> </span>
                    <?php endforeach; ?>
                </td>
                <td align="center">
                    <h3>Votar</h3>
                    <select class="rating" name="rating-<?php echo $band->id; ?>">
                        <?php foreach($ratings as $rating): ?>
                        <option <?php echo $band->hasJurorRating($user->id) === $rating ? 'selected' : ''; ?> value="<?php echo route('admin.vote.post-jury-votes', $band->id); ?>"><?php echo $rating; ?></option>
                        <?php endforeach; ?>
                    </select>
                </td>
            </tr>
        </table>
    <?php endforeach; ?>
    <?php echo $bands->links(); ?>

</div>

<?php echo $__env->make('clumsy::templates.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
