{% 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-6">
					<a href="{{path("app_comment_index")}}" class="btn  btn-lg btn-warning col-md-12"><i class="material-icons" style="font-size: 30px;">refresh</i> Refresh</a>
				</div>
				<div class="col-md-6">
					<a class="btn btn btn-lg btn-yellow col-md-12"><i class="material-icons" style="font-size: 30px;">message</i> {{comments|length}} Comments</a>
				</div>
			</div>
			
			   
			<div class="row">
                {% for comment in pagination %}
				<div class="col-md-6">
                    <ul class="timeline timeline-simple">
                        <li class="timeline-inverted">
                            <div class="timeline-badge danger">
                                <img src="{{comment.user.image}}"  class="img-profile">
                            </div>
                            <div class="timeline-panel">
                                <div class="timeline-heading">
                               		<a href="{{path("user_user_edit",{id:comment.user.id})}}" title="">
                                    	<span class="label label-danger">{{comment.user.name}}</span>
                                	</a>
                                	<span class="pull-right" >
				                        <a href="{{path("app_comment_delete",{id:comment.id,"comment":"true"})}}"  rel="tooltip" data-placement="bottom" title="" data-original-title="Delete">
				                            <i class="material-icons" style="color:red">delete</i>
				                        </a>
				                        {% if comment.enabled %}
					                        <a href="{{path("app_comment_hide",{id:comment.id})}}"  rel="tooltip" data-placement="bottom" title="" data-original-title="Hide">
					                             <i class="material-icons">visibility_off</i>
					                        </a>
				                        {% else %}				                        
					                        <a href="{{path("app_comment_hide",{id:comment.id})}}"  rel="tooltip" data-placement="bottom" title="" data-original-title="Show">
					                             <i class="material-icons">remove_red_eye</i>
					                        </a>
				                        {% endif %}
				                    </span>
                                </div>
                                <div class="timeline-body">
                                    <p>{{comment.contentclear}}</p>
                                </div>
                                <hr>
	                                <a href="{{path("app_video_view",{id:comment.video.id})}}" title="">
	                                <small class="label label-rose">
	                                     <span>{{comment.video}}</span>
	                                </small>
	                                </a> 	

                                <small class="pull-right label label-rose">
                                     <span>{{comment.created|ago}}</span>
                                </small>
                            </div>
                        </li>
                       
                    </ul>
                </div>
                {% else %}
				<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>
				{% endfor %}
	    		</div>
			<div class=" pull-right">
				{{ knp_pagination_render(pagination) }}
			</div>
	    	</div>
	    </div>
	</div>
                            
{% endblock%}


