{% extends "AppBundle::layout.html.twig" %}
{% block body%}
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-3">
				<div class="card">
					<div class="tab-moivie">
						<a href="{{path("app_episode_edit",{"id":form.vars.value.id})}}" class="btn btn-tab-movie-active col-md-12"><i class="material-icons">edit</i> Edit</a>
						<a href="{{path("app_episode_sources",{"id":form.vars.value.id})}}" class="btn btn-tab-movie col-md-12"><i class="material-icons">folder</i> Sources</a>
						<a href="{{path("app_episode_subtitles",{"id":form.vars.value.id})}}" class="btn btn-tab-movie col-md-12"><i class="material-icons">subtitles</i> Subtitles</a>
						<a href="#" class="btn btn-tab-movie col-md-12"><i class="material-icons">remove_red_eye</i> {{form.vars.value.viewsnumber}} views</a>
						<a href="#" class="btn btn-tab-movie col-md-12"><i class="material-icons">cloud_download</i> {{form.vars.value.downloadsnumber}} downloads</a>
						<a href="{{path("app_serie_seasons",{"id":season.poster.id})}}" class="btn btn-tab-movie col-md-12"><i class="material-icons">arrow_back</i> back</a>
						
					</div>
				</div>
			</div>
			<div class="col-md-9">
				<div class="card">
					<div class="card-header card-header-icon" data-background-color="rose">
						<i class="material-icons">movie</i>
					</div>
					<div class="card-content">
						<h4 class="card-title">Edit "{{form.vars.value.title}}"</h4>
						<br>
						{{form_start(form)}}
						<div class="fileinput fileinput-new text-center"  data-provides="fileinput">
							<div class="fileinput-new thumbnail" >
								<a href="#" class="btn btn-rose btn-round btn-select-1"><i class="material-icons">image</i> Select image </a>
								{% if form.vars.value.media != null %}
									<img  id="img-preview-1" src="{{asset(form.vars.value.media.link)|imagine_filter('cover_thumb')}}"  width="100%">
								{% else %}
									<img  id="img-preview-1" src="{{asset("img/image_placeholder.jpg")|imagine_filter('cover_thumb')}}"  width="100%">
								{% endif %}
							</div>
							{{form_widget(form.file,{"attr":{"class":"file-hidden input-file-1 img-selector-1","style":"    display: none;"}})}}
							<span class="validate-input">{{form_errors(form.file)}}</span>
						</div>
						<div class="form-group label-floating is-empty">
							<label class="control-label">Episode title</label>
							{{form_widget(form.title,{"attr":{"class":"form-control"}})}}
							<span class="validate-input">{{form_errors(form.title)}}</span>
						</div>
						<div class="form-group label-floating is-empty">
							<label class="control-label">Episode description</label>
							{{form_widget(form.description,{"attr":{"class":"form-control","rows":8}})}}
							<span class="validate-input">{{form_errors(form.description)}}</span>
						</div>
						<div class="form-group label-floating is-empty">
							<label class="control-label">Episode duration</label>
							{{form_widget(form.duration,{"attr":{"class":"form-control"}})}}
							<span class="validate-input">{{form_errors(form.duration)}}</span>
						</div>
						<div class="form-group label-floating is-empty">
							<label class="control-label">Play Episode :  </label>
							{{form_widget(form.playas,{"attr":{"class":"form-control"}})}}
							<span class="validate-input">{{form_errors(form.playas)}}</span>
						</div>
						<div class="form-group label-floating is-empty">
							<label class="control-label">Download Episode :  </label>
							{{form_widget(form.downloadas,{"attr":{"class":"form-control"}})}}
							<span class="validate-input">{{form_errors(form.downloadas)}}</span>
						</div>
						<div class="">
							<label>
								{{form_widget(form.enabled)}}  Enabled
							</label>
						</div>
						<span class="pull-right"><a href="{{path("app_serie_seasons",{"id":season.poster.id})}}" class="btn btn-fill btn-yellow"><i class="material-icons">arrow_back</i> Cancel</a>{{form_widget(form.save,{attr:{"class":"btn btn-fill btn-rose"}})}}</span>
						{{form_end(form)}}
					</div>
				</div>
			</div>
		</div>
	</div>
{% endblock%}