{% extends "AppBundle::layout.html.twig" %}
{% block body%}
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<div class="row">
					<div class="col-md-3">
						<a href="{{path("app_serie_index")}}" class="btn  btn-lg btn-warning  btn-block"><i class="material-icons" style="font-size: 30px;">refresh</i> Refresh</a>
					</div>
					<div class="col-md-3">
						<a class="btn btn btn-lg btn-yellow  btn-block"><i class="material-icons" style="font-size: 30px;">tv</i> {{series_count}} TV Shows</a>
					</div>
					<div class="col-md-3">
						<a href="{{path("app_serie_add")}}" class="btn btn-rose btn-lg pull-right add-button btn-block" title=""><i class="material-icons" style="font-size: 30px;">add_box</i> NEW TV SHOW</a>
					</div>
					<div class="col-md-3">
						<a href="{{path("app_serie_import")}}" class="btn btn-success btn-lg pull-right add-button btn-block" title=""><i class="material-icons" style="font-size: 30px;">get_app</i> IMPORT TV SHOW </a>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12">
						<form>
							<input name="q" value="{{app.request.query.get("q")}}" type="text" class="search-input">
							<button class="btn btn-sm search-btn"><i class="material-icons" style="font-size: 30px;">search</i></button>
						</form>
					</div>
				</div>
				<div class="row">
					{% for serie in series %}
						<div class="col-md-4 col-sm-6 col-lg-3 col-xl-2">
							<div class="card">
								<div class="card-content" style="text-align: center;   padding: 0px;">
									<img src="{{asset(serie.poster.link)|imagine_filter('poster_thumb')}}"  >
									<br>
									<span class="label-lang">{{serie.title}}</span>
								</div>
								<div class="card-footer" style="    text-align: center;">
									<a href="{{path("app_serie_edit",{"id":serie.id})}}" rel="tooltip" data-placement="left" class=" btn btn-success btn-xs btn-round" data-original-title="Edit">
										<i class="material-icons">edit</i>
									</a>
									{% if serie.cover != null  %}
										<a href="{{path("app_home_notif_poster",{title:serie.title,id:serie.id,image:asset(serie.cover.link)|imagine_filter("cover_thumb"),icon:asset(serie.poster.link)|imagine_filter("poster_thumb")})}}" rel="tooltip" data-placement="left" class=" btn btn-primary btn-xs btn-round" data-original-title="Noitifcation">
											<i class="material-icons">notifications</i>
										</a>
									{% else %}
										<a href="{{path("app_home_notif_poster",{title:serie.title,id:serie.id,image:asset(serie.poster.link)|imagine_filter("cover_thumb"),icon:asset(serie.poster.link)|imagine_filter("poster_thumb")})}}" rel="tooltip" data-placement="left" class=" btn btn-primary btn-xs btn-round" data-original-title="Noitifcation">
											<i class="material-icons">notifications</i>
										</a>						
									{% endif %}
									<a href="{{path("app_serie_delete",{"id":serie.id})}}" rel="tooltip" data-placement="left" class=" btn btn-danger btn-xs btn-round" data-original-title="Delete">
										<i class="material-icons">delete</i>
									</a>
								</div>
							</div>
						</div>
					{% else %}
						<div class="col-md-12">
							<div class="card">
								<div class="card-content">
									<br>
									<br>
									<center><img src="{{asset("img/bg_empty.png")}}"  style="width: auto !important;" =""></center>
									<br>
									<br>
								</div>
							</div>
						</div>
					{% endfor %}
				</div>
				<div class=" pull-right">
					{{ knp_pagination_render(series) }}
				</div>
			</div>
		</div>
		
	{% endblock%}