{% extends 'base_front.html.twig' %}{% block title %}{{ "les projets"|trans }}{% endblock %}{% block stylesheets %} {{ parent() }} <link rel="stylesheet" type="text/css" href="{{ asset('front/css/components/bs-datatable.css') }}"> <link rel="stylesheet" type="text/css" href="{{ asset('app-assets/vendors/css/forms/select/select2.min.css') }}"> <link rel="stylesheet" type="text/css" href="{{ asset('app-assets/css/plugins/forms/form-wizard.css') }}">{% endblock %}{% block body %} <section id="page-title" style="background-color: #FFF; padding: 1rem 0;"> <div class="container clearfix"> <h2>{{ "les projets"|trans }}</h2> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="{{ path('app_front') }}">{{ "Accueil"|trans }}</a></li> <li class="breadcrumb-item active" aria-current="page">{{ "Projets"|trans }}</li> </ol> </div> </section> <div class="tabs advanced-real-estate-tabs clearfix"> <div class="container clearfix"> <ul class="tab-nav clearfix" style="padding: 0px;"> <li> <a href="#tab-properties" data-scrollto="#tab-properties" data-offset="133"> {{ "Recherche des projets"|trans }}</a> </li> </ul> </div> <div class="tab-container search-container"> <div class="container clearfix"> <div class="tab-content clearfix" id="tab-properties"> {{ form_start(search_form, {'attr': {'id': 'form_search_projet'}}) }} {{ form_errors(search_form) }} <div class="row"> <div class="col-lg-3 col-md-6 col-12 bottommargin-xs"> <label>{{ "partenaire"|trans }}</label> {{ form_widget(search_form.partenaire) }} </div> <div class="col-lg-3 col-md-6 col-12 bottommargin-xs"> <label>{{ "programme"|trans }}</label> {{ form_widget(search_form.programme) }} </div> <div class="col-lg-3 col-md-6 col-12 bottommargin-xs"> <label>{{ "gouvernorat"|trans }}</label> {{ form_widget(search_form.gouvernorat, {'attr': {'data-live-search': 'true'}}) }} </div> <div class="col-lg-3 col-md-6 col-12 bottommargin-xs"> <label>{{ "municipalite"|trans }}</label> {{ form_widget(search_form.communes, {'attr': {'data-live-search': 'true', 'multiple': 'multiple'}}) }} </div> <div class="w-100"></div> <div class="col-lg-3 col-md-3 bottommargin-xs"> <label>{{ "mode-execution"|trans }}</label> {{ form_widget(search_form.modExecution, {'attr': {'data-live-search': 'true'}}) }} </div> <div class="col-lg-3 col-md-3 bottommargin-xs"> <label>{{ "secteur-ntervention"|trans }}</label> {{ form_widget(search_form.envIntervention, {'attr': {'data-live-search': 'true'}}) }} </div> <div class="col-lg-2 col-md-2 bottommargin-xs"> <label>{{ "annee"|trans }}</label> {{ form_widget(search_form.date, {'attr': {'class': 'year-range-slider'}}) }} </div> <div class="col-lg-2 col-md-2 bottommargin-xs"> <label>{{ "budget"|trans }}</label> {{ form_widget(search_form.budget, {'attr': {'class': 'price-range-slider'}}) }} </div> <div class="col-lg-2 col-md-2 clearfix"> <button class="button button-3d button-rounded w-100 m-0" type="submit" value="1" name="submit" style="margin-top: 35px !important;">{{ "Recherche"|trans }} </button> </div> </div> {{ form_row(search_form._token) }} {{ form_end(search_form, {render_rest: false}) }} </div> </div> </div> </div> <br/> <div class="tabs advanced-real-estate-tabs clearfix"> <div class="container clearfix"> <div class="table-responsive"> <table class="table table-hover table-striped table-bordered" id="liste-projets"> <thead class="table-dark"> <tr> <th scope="col" class="text-nowrap">ID</th> <th scope="col" class="text-nowrap">{{ "Nom"|trans }}</th> <th scope="col" class="text-nowrap">{{ "Programme"|trans }}</th> <th scope="col" class="text-nowrap">{{ "Budget - TND"|trans }}</th> <th scope="col" class="text-nowrap">{{ "Date début/fin"|trans }}</th> <th scope="col" class="text-nowrap">{{ "Avancement %"|trans }}</th> <th scope="col" class="text-nowrap">{{ "Stauts"|trans }}</th> </tr> </thead> <tbody> {% for projet in projets %} <tr> <td scope="col" class="text-nowrap"> <a href="{{ path('detail_projet_front', {'id': projet.id}) }}">{{ projet.id }}</a> </td> <td scope="col" class="text-nowrap"> <a href="{{ path('detail_projet_front', {'id': projet.id}) }}"> {% if app.request.locale == 'ar' %} {{ projet.nom_ar }} {% else %} {{ projet.nom_fr }} {% endif %} </a> </td> <td scope="col" class="text-nowrap"> <a href="{{ path('detail_projet_front', {'id': projet.id}) }}"> {% if app.request.locale == 'ar' %} {{ projet.programme ? projet.programme_ar : '' }} {% else %} {{ projet.programme ? projet.programme : '' }} {% endif %} </a> </td> <td scope="col" class="text-nowrap"> <a href="{{ path('detail_projet_front', {'id': projet.id}) }}"> {% if app.request.locale == 'ar' %} {{ projet.budget_devise }} {{ projet.devise_ar }} - {{ projet.budget_tnd }} {{ "TND"|trans }} {% else %} {{ projet.budget_devise }} {{ projet.devise }} - {{ projet.budget_tnd }} {{ "TND"|trans }} {% endif %} </a> </td> <td scope="col" class="text-nowrap"> <a href="{{ path('detail_projet_front', {'id': projet.id}) }}">{{ projet.date_debut }} / {{ projet.date_fin }}</a> </td> <td scope="col" class="text-nowrap"> <a href="{{ path('detail_projet_front', {'id': projet.id}) }}">{{ projet.perc_avancement }} %</a> </td> <td scope="col" class="text-nowrap"> <a href="{{ path('detail_projet_front', {'id': projet.id}) }}"> {% if app.request.locale == 'ar' %} {{ projet.stat_ar }} {% else %} {{ projet.stat }} {% endif %} </a> </td> </tr> {% endfor %} </tbody> </table> </div> <br/><br/> </div> </div>{% endblock %}{% block javascripts %} {{ parent() }} <script src="{{ asset('front/js/components/bs-datatable.js') }}"></script> <script src="{{ asset('app-assets/vendors/js/forms/select/select2.full.min.js') }}"></script> <script src="{{ asset('app-assets/js/scripts/forms/form-wizard.js') }}"></script> <script> $(document).ready(function () { let lang = "{{ app.request.locale }}"; if (lang && (lang == 'fr')) { jQuery(".select2").select2({ placeholder: "Sélectionner un choix", allowClear: true }); var table = $('#liste-projets').DataTable({ responsive: true, "language": { "emptyTable": "Aucune donnée disponible dans le tableau", "loadingRecords": "Chargement...", "processing": "Traitement...", "aria": { "sortAscending": ": activer pour trier la colonne par ordre croissant", "sortDescending": ": activer pour trier la colonne par ordre décroissant" }, "select": { "rows": { "_": "%d lignes sélectionnées", "1": "1 ligne sélectionnée" }, "cells": { "1": "1 cellule sélectionnée", "_": "%d cellules sélectionnées" }, "columns": { "1": "1 colonne sélectionnée", "_": "%d colonnes sélectionnées" } }, "autoFill": { "cancel": "Annuler", "fill": "Remplir toutes les cellules avec <i>%d<\/i>", "fillHorizontal": "Remplir les cellules horizontalement", "fillVertical": "Remplir les cellules verticalement" }, "searchBuilder": { "conditions": { "date": { "after": "Après le", "before": "Avant le", "between": "Entre", "empty": "Vide", "not": "Différent de", "notBetween": "Pas entre", "notEmpty": "Non vide", "equals": "Égal à" }, "number": { "between": "Entre", "empty": "Vide", "gt": "Supérieur à", "gte": "Supérieur ou égal à", "lt": "Inférieur à", "lte": "Inférieur ou égal à", "not": "Différent de", "notBetween": "Pas entre", "notEmpty": "Non vide", "equals": "Égal à" }, "string": { "contains": "Contient", "empty": "Vide", "endsWith": "Se termine par", "not": "Différent de", "notEmpty": "Non vide", "startsWith": "Commence par", "equals": "Égal à", "notContains": "Ne contient pas", "notEnds": "Ne termine pas par", "notStarts": "Ne commence pas par" }, "array": { "empty": "Vide", "contains": "Contient", "not": "Différent de", "notEmpty": "Non vide", "without": "Sans", "equals": "Égal à" } }, "add": "Ajouter une condition", "button": { "0": "Recherche avancée", "_": "Recherche avancée (%d)" }, "clearAll": "Effacer tout", "condition": "Condition", "data": "Donnée", "deleteTitle": "Supprimer la règle de filtrage", "logicAnd": "Et", "logicOr": "Ou", "title": { "0": "Recherche avancée", "_": "Recherche avancée (%d)" }, "value": "Valeur" }, "searchPanes": { "clearMessage": "Effacer tout", "count": "{total}", "title": "Filtres actifs - %d", "collapse": { "0": "Volet de recherche", "_": "Volet de recherche (%d)" }, "countFiltered": "{shown} ({total})", "emptyPanes": "Pas de volet de recherche", "loadMessage": "Chargement du volet de recherche...", "collapseMessage": "Réduire tout", "showMessage": "Montrer tout" }, "buttons": { "collection": "Collection", "colvis": "Visibilité colonnes", "colvisRestore": "Rétablir visibilité", "copy": "Copier", "copySuccess": { "1": "1 ligne copiée dans le presse-papier", "_": "%ds lignes copiées dans le presse-papier" }, "copyTitle": "Copier dans le presse-papier", "csv": "CSV", "excel": "Excel", "pageLength": { "-1": "Afficher toutes les lignes", "_": "Afficher %d lignes" }, "pdf": "PDF", "print": "Imprimer", "copyKeys": "Appuyez sur ctrl ou u2318 + C pour copier les données du tableau dans votre presse-papier.", "createState": "Créer un état", "removeAllStates": "Supprimer tous les états", "removeState": "Supprimer", "renameState": "Renommer", "savedStates": "États sauvegardés", "stateRestore": "État %d", "updateState": "Mettre à jour" }, "decimal": ",", "search": "Rechercher:", "datetime": { "previous": "Précédent", "next": "Suivant", "hours": "Heures", "minutes": "Minutes", "seconds": "Secondes", "unknown": "-", "amPm": [ "am", "pm" ], "months": { "0": "Janvier", "2": "Mars", "3": "Avril", "4": "Mai", "5": "Juin", "6": "Juillet", "8": "Septembre", "9": "Octobre", "10": "Novembre", "1": "Février", "11": "Décembre", "7": "Août" }, "weekdays": [ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam" ] }, "editor": { "close": "Fermer", "create": { "title": "Créer une nouvelle entrée", "button": "Nouveau", "submit": "Créer" }, "edit": { "button": "Editer", "title": "Editer Entrée", "submit": "Mettre à jour" }, "remove": { "button": "Supprimer", "title": "Supprimer", "submit": "Supprimer", "confirm": { "_": "Êtes-vous sûr de vouloir supprimer %d lignes ?", "1": "Êtes-vous sûr de vouloir supprimer 1 ligne ?" } }, "multi": { "title": "Valeurs multiples", "info": "Les éléments sélectionnés contiennent différentes valeurs pour cette entrée. Pour modifier et définir tous les éléments de cette entrée à la même valeur, cliquez ou tapez ici, sinon ils conserveront leurs valeurs individuelles.", "restore": "Annuler les modifications", "noMulti": "Ce champ peut être modifié individuellement, mais ne fait pas partie d'un groupe. " }, "error": { "system": "Une erreur système s'est produite (<a target=\"\\\" rel=\"nofollow\" href=\"\\\">Plus d'information<\/a>)." } }, "stateRestore": { "removeSubmit": "Supprimer", "creationModal": { "button": "Créer", "order": "Tri", "paging": "Pagination", "scroller": "Position du défilement", "search": "Recherche", "select": "Sélection", "columns": { "search": "Recherche par colonne", "visible": "Visibilité des colonnes" }, "name": "Nom :", "searchBuilder": "Recherche avancée", "title": "Créer un nouvel état", "toggleLabel": "Inclus :" }, "renameButton": "Renommer", "duplicateError": "Il existe déjà un état avec ce nom.", "emptyError": "Le nom ne peut pas être vide.", "emptyStates": "Aucun état sauvegardé", "removeConfirm": "Voulez vous vraiment supprimer %s ?", "removeError": "Échec de la suppression de l'état.", "removeJoiner": "et", "removeTitle": "Supprimer l'état", "renameLabel": "Nouveau nom pour %s :", "renameTitle": "Renommer l'état" }, "info": "Affichage de _START_ à _END_ sur _TOTAL_ entrées", "infoEmpty": "Affichage de 0 à 0 sur 0 entrées", "infoFiltered": "(filtrées depuis un total de _MAX_ entrées)", "lengthMenu": "Afficher _MENU_ entrées", "paginate": { "first": "Première", "last": "Dernière", "next": "Suivante", "previous": "Précédente" }, "zeroRecords": "Aucune entrée correspondante trouvée", "thousands": " " } }); } else if (lang && (lang == 'ar')) { jQuery(".select2").select2({ placeholder: "اختر المجال", allowClear: true }); var table = $('#liste-projets').DataTable({ responsive: true, "language": { "loadingRecords": "جارٍ التحميل...", "lengthMenu": "أظهر _MENU_ مدخلات", "zeroRecords": "لم يعثر على أية سجلات", "info": "إظهار _START_ إلى _END_ من أصل _TOTAL_ مدخل", "search": "ابحث:", "paginate": { "first": "الأول", "previous": "السابق", "next": "التالي", "last": "الأخير" }, "aria": { "sortAscending": ": تفعيل لترتيب العمود تصاعدياً", "sortDescending": ": تفعيل لترتيب العمود تنازلياً" }, "select": { "rows": { "_": "%d قيمة محددة", "1": "1 قيمة محددة" }, "cells": { "1": "1 خلية محددة", "_": "%d خلايا محددة" }, "columns": { "1": "1 عمود محدد", "_": "%d أعمدة محددة" } }, "buttons": { "print": "طباعة", "copyKeys": "زر <i>ctrl<\/i> أو <i>⌘<\/i> + <i>C<\/i> من الجدول<br>ليتم نسخها إلى الحافظة<br><br>للإلغاء اضغط على الرسالة أو اضغط على زر الخروج.", "pageLength": { "-1": "اظهار الكل", "_": "إظهار %d أسطر" }, "collection": "مجموعة", "copy": "نسخ", "copyTitle": "نسخ إلى الحافظة", "csv": "CSV", "excel": "Excel", "pdf": "PDF", "colvis": "إظهار الأعمدة", "colvisRestore": "إستعادة العرض", "copySuccess": { "1": "تم نسخ سطر واحد الى الحافظة", "_": "تم نسخ %ds أسطر الى الحافظة" } }, "searchBuilder": { "add": "اضافة شرط", "clearAll": "ازالة الكل", "condition": "الشرط", "data": "المعلومة", "logicAnd": "و", "logicOr": "أو", "title": [ "منشئ البحث" ], "value": "القيمة", "conditions": { "date": { "after": "بعد", "before": "قبل", "between": "بين", "empty": "فارغ", "equals": "تساوي", "notBetween": "ليست بين", "notEmpty": "ليست فارغة", "not": "ليست " }, "number": { "between": "بين", "empty": "فارغة", "equals": "تساوي", "gt": "أكبر من", "lt": "أقل من", "not": "ليست", "notBetween": "ليست بين", "notEmpty": "ليست فارغة", "gte": "أكبر أو تساوي", "lte": "أقل أو تساوي" }, "string": { "not": "ليست", "notEmpty": "ليست فارغة", "startsWith": " تبدأ بـ ", "contains": "تحتوي", "empty": "فارغة", "endsWith": "تنتهي ب", "equals": "تساوي", "notContains": "لا تحتوي", "notStarts": "لا تبدأ بـ", "notEnds": "لا تنتهي بـ" }, "array": { "equals": "تساوي", "empty": "فارغة", "contains": "تحتوي", "not": "ليست", "notEmpty": "ليست فارغة", "without": "بدون" } }, "button": { "0": "فلاتر البحث", "_": "فلاتر البحث (%d)" }, "deleteTitle": "حذف فلاتر" }, "searchPanes": { "clearMessage": "ازالة الكل", "collapse": { "0": "بحث", "_": "بحث (%d)" }, "count": "عدد", "countFiltered": "عدد المفلتر", "loadMessage": "جارِ التحميل ...", "title": "الفلاتر النشطة", "showMessage": "إظهار الجميع", "collapseMessage": "إخفاء الجميع" }, "infoThousands": ",", "datetime": { "previous": "السابق", "next": "التالي", "hours": "الساعة", "minutes": "الدقيقة", "seconds": "الثانية", "unknown": "-", "amPm": [ "صباحا", "مساءا" ], "weekdays": [ "الأحد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت" ], "months": [ "يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر" ] }, "editor": { "close": "إغلاق", "create": { "button": "إضافة", "title": "إضافة جديدة", "submit": "إرسال" }, "edit": { "button": "تعديل", "title": "تعديل السجل", "submit": "تحديث" }, "remove": { "button": "حذف", "title": "حذف", "submit": "حذف", "confirm": { "_": "هل أنت متأكد من رغبتك في حذف السجلات %d المحددة؟", "1": "هل أنت متأكد من رغبتك في حذف السجل؟" } }, "error": { "system": "حدث خطأ ما" }, "multi": { "title": "قيم متعدية", "restore": "تراجع" } }, "processing": "جارٍ المعالجة...", "emptyTable": "لا يوجد بيانات متاحة في الجدول", "infoEmpty": "يعرض 0 إلى 0 من أصل 0 مُدخل", "thousands": ".", "stateRestore": { "creationModal": { "columns": { "search": "إمكانية البحث للعمود", "visible": "إظهار العمود" }, "toggleLabel": "تتضمن" } }, "autoFill": { "cancel": "إلغاء الامر", "fill": "املأ كل الخلايا بـ <i>%d<\/i>", "fillHorizontal": "تعبئة الخلايا أفقيًا", "fillVertical": "تعبئة الخلايا عموديا" }, "decimal": ",", "infoFiltered": "(مرشحة من مجموع _MAX_ مُدخل)" } }); } $('#liste-projets tbody').on('click', 'tr', function () { var data = table.row(this).data(); table.row(this).data(data).draw(); }); // When Gouvernorat gets selected ... var $gouv = $('#search_projet_gouvernorat'); $gouv.change(function () { var $form = $(this).closest('form'); var data = {}; data[$gouv.attr('name')] = $gouv.val(); let dt = $form.serializeArray().filter(item => { return (item.name !== 'projet[_token]') }); try { $.ajax({ url: $form.attr('action'), type: $form.attr('method'), data: dt, complete: function (html) { $('#search_projet_communes').replaceWith( $(html.responseText).find('#search_projet_communes') ); $('#search_projet_communes').select2(); } }); } catch (e) { console.log(e); } }); // When Partenaire gets selected ... var $part = $('#search_projet_partenaire'); $part.change(function () { var $form = $(this).closest('form'); var data = {}; data[$part.attr('name')] = $part.val(); let dt = $form.serializeArray().filter(item => { return (item.name !== 'projet[_token]') }); try { $.ajax({ url: $form.attr('action'), type: $form.attr('method'), data: dt, complete: function (html) { $('#search_projet_programme').replaceWith( $(html.responseText).find('#search_projet_programme') ); $('#search_projet_programme').select2(); } }); } catch (e) { console.log(e); } }); /*******Arabic filtre******/ // When Gouvernorat Arabic gets selected ... var $gouvAr = $('#search_projet_ar_gouvernorat'); $gouvAr.change(function () { var $form = $(this).closest('form'); var data = {}; data[$gouvAr.attr('name')] = $gouvAr.val(); let dt = $form.serializeArray().filter(item => { return (item.name !== 'projet[_token]') }); try { $.ajax({ url: $form.attr('action'), type: $form.attr('method'), data: dt, complete: function (html) { $('#search_projet_ar_communes').replaceWith( $(html.responseText).find('#search_projet_ar_communes') ); $('#search_projet_ar_communes').select2(); } }); } catch (e) { console.log(e); } }); // When Partenaire arabic gets selected ... var $partAr = $('#search_projet_ar_partenaire'); $partAr.change(function () { var $form = $(this).closest('form'); var data = {}; data[$partAr.attr('name')] = $partAr.val(); let dt = $form.serializeArray().filter(item => { return (item.name !== 'projet[_token]') }); try { $.ajax({ url: $form.attr('action'), type: $form.attr('method'), data: dt, complete: function (html) { $('#search_projet_ar_programme').replaceWith( $(html.responseText).find('#search_projet_ar_programme') ); $('#search_projet_ar_programme').select2(); } }); } catch (e) { console.log(e); } }); }); </script>{% endblock %}