{% extends 'base_frontend.html.twig' %}

{% block title %} Détail Annonce  {% endblock %}

{% block content %}
<!-- ============================================== HEADER : END ============================================== -->
<div class="breadcrumb">
    <div class="breadcrumb-inner">
        <ul class="list-inline list-unstyled">
            <li><a href="{{ path('frontend_home_index') }}">Accueil</a></li>
            <li><a href="{{ path('frontend_annonce_index') }}">Annonce</a></li>
            <li class='active'>Détail Annonce</li>
        </ul>
    </div>
</div>

<!-- /.breadcrumb -->
<div class="body-content outer-bottom-xs">
    <div class='row single-product'>
        <!-- ============================================== Testimonials: END ============================================== -->
        <!-- /.sidebar -->
        
        <div class="detail-block">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 gallery-holder">
                    <div class="product-item-holder size-big single-product-gallery small-gallery">
                        <div id="owl-single-product">
                            <!-- /.single-product-gallery-item -->
                            {% for key,image in annonce.getAllImage() %}
                                <div class="single-product-gallery-item" id="slide{{key}}">
                                    <a data-lightbox="image-{{key}}" data-title="Gallery" href="{{ asset('uploads/images/annonces/' ~ image ) }}">
                                    <img class="img-responsive" alt="" src="{{ asset('uploads/images/annonces/' ~ image) }}" data-echo="{{ asset('uploads/images/annonces/' ~ image ) }}" />
                                    </a>
                                </div>
                            {% endfor %}
                            <!-- /.single-product-gallery-item -->
                        </div>
                        <!-- /.single-product-slider -->
                        <div class="single-product-gallery-thumbs gallery-thumbs">
                            <div id="owl-single-product-thumbnails">
                                {% for key,image in annonce.getAllImage() %}
                                <div class="item">
                                    <a class="horizontal-thumb" data-target="#owl-single-product" data-slide="{{ key }}" href="#slide{{ key }}">
                                    <img class="img-responsive" alt="" src="{{ asset('uploads/images/annonces/' ~ image) }}" data-echo="{{ asset('uploads/images/annonces/' ~ image) }}" />
                                    </a>
                                </div>
                                {% endfor %}
                            </div>
                            <!-- /#owl-single-product-thumbnails -->
                        </div>
                        <!-- /.gallery-thumbs -->
                    </div>
                    <!-- /.single-product-gallery -->
                </div>
                <!-- /.gallery-holder -->   
                <div class='col-sm-12 col-md-8 col-lg-8 product-info-block'>
                    <div class="product-info">
                        <h1 class="name">{{ annonce.getTitre() }}</h1>
                        <div class="rating-reviews m-t-20">
                            <div class="row">
                                <div class="col-lg-12">
                                    <div class="pull-left">
                                        <div class="rating rateit-small"></div>
                                    </div>
                                    <div class="pull-left">
                                        <div class="reviews">
                                            <a href="#" class="lnk">(13 Reviews)</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!-- /.row -->		
                        </div>
                        <!-- /.stock-container -->
                        <div class="price-container info-container m-t-30">
                            <div class="row">
                                <div class="col-sm-6 col-xs-6">
                                    <div class="price-box">
                                        <span class="price">{{ annonce.getPrixPromo() }} DT</span>
                                        <span class="price-strike">{{ annonce.getPrixMarche() }} DT</span>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-xs-6">
                                    <div class="favorite-button m-t-5">
                                        <a class="btn btn-primary" data-toggle="tooltip" data-placement="right" title="Wishlist" href="#">
                                        <i class="fa fa-heart"></i>
                                        </a>
                                        <a class="btn btn-primary" data-toggle="tooltip" data-placement="right" title="E-mail" href="#">
                                        <i class="fa fa-envelope"></i>
                                        </a>
                                    </div>
                                </div>
                            </div>
                            <!-- /.row -->
                        </div>
                        
                        <!-- /.quantity-container -->
                    </div>
                    <!-- /.product-info -->
                </div>
                <!-- /.col-sm-7 -->
            </div>
            <!-- /.row -->
            <div class="description-container m-t-20">
                {{ annonce.getDescription()|raw }}
            </div>
            <!-- /.description-container -->
        </div>
        
    </div>
    
    <!-- /.row -->
</div>
<!-- /.body-content -->


{% set comments = annonce.getCommentAnnonces() %}
{% include 'frontend/comment/comments.html.twig' %}

{{ render(controller(
        'App\\Controller\\Frontend\\CommentController::annonce_add',
        { 'id': annonce.getId() }
    )) }}


{% endblock %}
