@extends('partials.master')

@section('title')
{{ Contest::title($band->name) }}
@stop

@section('open-graph')
 <meta name="twitter:card" content="summary">
<meta name="description" content="{{ $bio }}">
<meta property="og:title" content="{{ $band->name }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ $band->permalink }}" />
<meta property="og:description" content="{{ $bio }}" />
<meta property="og:image" content="{{ $band->real_image_url }}" />



@stop

@section('after-head')
@include('partials.vote-modal')
@stop

@section('master')
<section id="detalhe_banda">
    <div class="main">

        <div class="billhead">
            <h2 class="banda_nome">{{{ $band->name }}}</h2>
            <h3 class="banda_musica_nome">{{{ $band->song }}}</h3>
        </div>

        <div class="video-wrapper clearfix">
            <iframe src="//www.youtube.com/embed/{{ $band->main_youtube_id }}?rel=0" frameborder="0" allowfullscreen="true"></iframe>
        </div>

        <div class="mini-video-wrapper {{ !$band->second_youtube_id && !$band->interview_youtube_id ? 'empty' : '' }}">

            @if ($band->second_youtube_id)
                <div class="mini-video">
                    <iframe src="//www.youtube.com/embed/{{ $band->youtube_id }}?rel=0" frameborder="0" allowfullscreen="true"></iframe>
                </div>
            @endif

            @if ($band->interview_youtube_id)
                <div class="mini-video">
                    <iframe src="//www.youtube.com/embed/{{ $band->interview_youtube_id }}?rel=0" frameborder="0" allowfullscreen="true"></iframe>
                </div>
            @endif

        </div>

        <div class="descricao">
            <p class="banda_descritivo">{{ $band->bio }}</p>
            <p class="banda_element">
                @foreach($band->elements as $member)
                <span>{{ $member->name }} - {{ $member->function }}</span>
                @endforeach
            </p>
            <a class="btn_login" {{ BandAuth::check() ? 'onclick="window.location.href= \''.route('reserved').'\'"' : 'data-reveal="Yes"' }}>{{ trans('frontend.menu.backstage') }} ></a>
            <small>(Acesso exclusivo a bandas)</small>
        </div>

        <div class="rodape">
<!--        <div class="area-partilha">
                <span>@lang('frontend.share-band'): </span>
                <div class="add_this">
                    <div class="addthis_toolbox">
                        <a class="addthis_button_facebook">
                            <img class="normal" src="{{ url('/assets/img/addthis/icon-facebook.png') }}" width="31" height="31" border="0"/>
                            <img class="hover" src="{{ url('/assets/img/addthis/icon-facebook-hover.png') }}" width="31" height="31" border="0"/>
                        </a>
                        <a class="addthis_button_twitter">
                            <img class="normal" src="{{ url('/assets/img/addthis/icon-twitter.png') }}" width="31" height="31" border="0"/>
                            <img class="hover" src="{{ url('/assets/img/addthis/icon-twitter-hover.png') }}" width="31" height="31" border="0"/>
                        </a>
                        <a class="addthis_button_google">
                            <img class="normal" src="{{ url('/assets/img/addthis/icon-google.png') }}" width="31" height="31" border="0"/>
                            <img class="hover" src="{{ url('/assets/img/addthis/icon-google-hover.png') }}" width="31" height="31" border="0"/>
                        </a>
                        <a class="addthis_button_email">
                            <img class="normal" src="{{ url('/assets/img/addthis/icon-mail.png') }}" width="31" height="31" border="0"/>
                            <img class="hover" src="{{ url('/assets/img/addthis/icon-mail-hover.png') }}" width="31" height="31" border="0"/>
                        </a>
                        <a class="addthis_button_compact">
                            <img class="normal" src="{{ url('/assets/img/addthis/icon-more.png') }}" width="31" height="31" border="0"/>
                            <img class="hover" src="{{ url('/assets/img/addthis/icon-more-hover.png') }}" width="31" height="31" border="0"/>
                        </a>
                    </div>
                </div>
            </div>
-->
            <div class="area-votar" style="width:100%">
                @if (in_array($status, array('participate', 'vote')) || ($status === 'semi-final' && $band->shortlist))
                    @if (!Auth::check())
                        <div align="right" class="btn_votar" data-reveal-id="myModal">
                            <p class="votar">@lang('frontend.login-and-vote') ></p>
                            <p class="band_vote">
                                <span>{{ $band->phase_votes_count }}</span>
                                <small class="s1">votar</small>
                            </p>
                        </div>
                    @else
                        <div class="vote_button_wrapper {{ in_array(Auth::user()->id, $votes) ? 'voted' : ''}}">
                            <div class="btn_votar">
                                <p class="votar">@lang('frontend.vote-this-band') ></p>
                                <p class="band_vote">
                                    <span id="inicial_band_votes">{{ $band->phase_votes_count }}</span>
                                    <small class="s1">votar</small>
                                </p>
                            </div>

                            {{ Form::open(array('url' => route('post-vote'), 'class' => 'formVote', 'id' => 'vote-form')) }}
                            <!--
                            {{ Form::hidden('voter_id', Auth::user()->id) }}

                            {{ Form::hidden('band_id', $band->id) }}
                            -->
                            {{ Form::close() }}

                            <div class="btn_ja_votastes">
                                <p class="ja_votaste">@lang('frontend.already-voted')</p>
                                <p class="band_vote">
                                    <span id="band_votes_total">{{ $band->phase_votes_count }}</span>
                                    <small class="s1">{{ trans('frontend.thankyou') }}</small>
                                </p>
                                <a class="shareVote" title="{{ trans('frontend.share-vote') }}" data-name="{{ $band->name }}" data-link="{{ $band->permalink }}" data-picture="{{ url("assets/img/fbshare-{$edition}.jpg?v=1") }}"></a>
                            </div>

                        </div>
                    @endif
                @else
                {{--
                <div class="vote_button_wrapper">
                                 <div cl                            ass="btn_votar">
                                <div class="votar">
                                    <p>{{ @lang('frontend.total-votes')</p>
						</div>
                                <p class="votos">{{ $band->phase_votes_count }}</p>
                            </div>
                        </div>
                        --}}
                        @endif
                    </div>
                </div>

                <a class="btn btn_ver_todas_bandas" href="{{ route('vote') }}">@lang('frontend.vote-cta')</a>

            </div>


            <!--@include('partials.top-bands', array('bands' => $top_bands, 'class' => 'detalhe'))-->

            @include("editions.{$edition}.partners", array('class' => 'detalhe'))

            </section>
            @stop
