<div class="row">

	<div class="col-md-8">
		{{ Form::field('name', 'Nome do Fadista') }}
		{{ Form::field('city', 'Cidade') }}
		{{ Form::field('song', 'Música') }}
		{{ Form::field('bio', 'Biografia', 'textarea') }}

		<label for="members">Membros</label>
		<ul name="members">
			@foreach ($item->elements as $member)
			<li>{{ $member->name.' - '.$member->function }}</li>
			@endforeach
		</ul>

		@if(Contest::getEdition() === 'pt-BR')
			<label for="discover">Como descobriram o passatempo:</label>
			<span name='descover'>
				{{ is_null($item->contest_discover_method) ? 'Não respondeu' : $item->contest_discover_method }}
			</span>
		@endif

		<hr>

		{{ Form::field('email', 'Email') }}
		{{ Form::field('phone', 'Telefone') }}
		{{ Form::field('alternative_name', 'Nome de contacto alternativo') }}
		{{ Form::field('alternative_email', 'Email alternativo') }}
		{{ Form::field('alternative_phone', 'Telefone alternativo') }}
		{{ Form::field('nationality', 'Nacionalidade') }}
	</div>

	<div class="col-md-4">
		{{ Form::media($media['image']) }}
	</div>

</div>

<hr>

<div class="row">

	<div class="col-md-4">
		{{ Form::youtube('video_url', 'URL da 1ª música') }}
	</div>

	<div class="col-md-4">
		{{ Form::youtube('second_video_url', 'URL da 2ª música') }}
	</div>

	<div class="col-md-4">
		{{ Form::youtube('interview_url', 'URL da entrevista') }}
	</div>

</div>

<hr>

<div class="row">

	<div class="col-md-6">
		{{ Form::boolean('rejected', 'Rejeitado', array('field' => array('class' => 'approval'))) }}
		<button type="button" id="reject-and-notify" data-band="{{ $item->id }}" class="btn btn-lg btn-danger">Rejeitar e notificar</button>
		<hr>
		{{ Form::field('rejection_reasons', 'Motivo de rejeição (opcional)', 'textarea') }}
	</div>
	<div class="col-md-6">
		{{ Form::boolean('approved', 'Aprovado', array('field' => array('class' => 'approval'))) }}
		<button type="button" id="approve-and-notify" data-band="{{ $item->id }}" class="btn btn-lg btn-primary">Aprovar e notificar</button>
	</div>

</div>
<hr>
<div class="row">

	<div class="col-md-6">
		<button type="button" id="resend-access" data-band="{{ $item->id }}" class="btn btn-lg btn-primary">Reset de password e reenvio de dados de acesso para email primário do fadista</button>
	</div>


</div>

<hr>

<div class="row">

	<div class="col-md-4">
		{{ Form::boolean('shortlist', 'Semi-final') }}
	</div>
	<div class="col-md-4">
		{{ Form::boolean('final', 'Final') }}
	</div>
	<div class="col-md-4">
		{{ Form::boolean('winner', 'Vencedor') }}
	</div>

	<div class="col-md-4">
		{{ Form::boolean('selected', 'Selecionado') }}
	</div>

</div>

<hr>



<h1 class="page-header">Votos</h1>

<div class="panel panel-default votes-panel">

	@if (count($item->votes))

	    <div class="table-responsive">

	        <table class="table {{ $resource }}-table">
	            <thead>
	                <th>Registo</th>
	                <th>Timestamp</th>
	                <th>IP</th>
	                <th>Etapa</th>
	            </thead>

	            <tbody>
	            @foreach ($item->votes as $vote)
	                <tr>
						<td>{{{ $vote->voter_identifier }}}</td>
						<td>{{{ $vote->display_created_at }}}</td>
						<td>{{{ $vote->ip }}}</td>
						<td>{{{ $vote->display_phase }}}</td>
	                </tr>
	            @endforeach
	            </tbody>
	        </table>
	    </div>

	@else

	    <div class="panel-body">
	        <h5>
	            Não há votos para este fadista
	        </h5>
	    </div>

	@endif

</div>


