first commit
This commit is contained in:
260
templates/investigation/add-index.html.twig
Normal file
260
templates/investigation/add-index.html.twig
Normal file
@@ -0,0 +1,260 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Enquête{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set prototypeHtml %}
|
||||
{% include 'investigation/form-question.html.twig' with { formQtn: form.questions.vars.prototype } %}
|
||||
{% endset %}
|
||||
|
||||
<style>
|
||||
|
||||
.save-question {
|
||||
position: fixed; right: 80px; top: 65%; width:215px;
|
||||
}
|
||||
|
||||
.add-question {
|
||||
position: fixed; right: 80px; top: 73%;
|
||||
}
|
||||
|
||||
.investigation-ready {
|
||||
position: fixed; right: 80px; top: 81%; width:215px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- az-header -->
|
||||
<div class="az-content">
|
||||
<div class="container">
|
||||
|
||||
<div class="az-content-body d-flex flex-column">
|
||||
<div class="az-content-breadcrumb">
|
||||
<span>Enquête</span>
|
||||
<span>Création</span>
|
||||
</div>
|
||||
<h2 class="az-content-title">Enquête</h2>
|
||||
|
||||
<div class="az-content-label mg-b-5"></div>
|
||||
<p class="mg-b-20">Créer une nouvelle enquête</p>
|
||||
|
||||
|
||||
{{ form_start(form) }}
|
||||
<div class="tab-vertical mb-3" id="investigation-information">
|
||||
<ul class="nav nav-tabs" id="myTab3" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="en-vertical-tab" data-toggle="tab" href="#en-vertical" role="tab" aria-controls="home" aria-selected="true">🇬🇧 English (UK)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="fr-vertical-tab" data-toggle="tab" href="#fr-vertical" role="tab" aria-controls="profile" aria-selected="false">🇫🇷 Français</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="ar-vertical-tab" data-toggle="tab" href="#ar-vertical" role="tab" aria-controls="contact" aria-selected="false">🇸🇦 العربية</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent3">
|
||||
<div class="tab-pane fade show active" id="en-vertical" role="tabpanel" aria-labelledby="en-vertical-tab">
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="{{ form.name_en.vars.id }}">{{ form_label(form.name_en) }}</label>
|
||||
{{ form_widget(form.name_en, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="{{ form.source_en.vars.id }}">{{ form_label(form.source_en) }}</label>
|
||||
{{ form_widget(form.source_en, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="fr-vertical" role="tabpanel" aria-labelledby="fr-vertical-tab">
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="{{ form.name_fr.vars.id }}">{{ form_label(form.name_fr) }}</label>
|
||||
{{ form_widget(form.name_fr, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label for="{{ form.source_fr.vars.id }}">{{ form_label(form.source_fr) }}</label>
|
||||
{{ form_widget(form.source_fr, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="ar-vertical" role="tabpanel" aria-labelledby="ar-vertical-tab">
|
||||
<div class="form-group">
|
||||
<label for="{{ form.name_ar.vars.id }}">{{ form_label(form.name_ar) }}</label>
|
||||
{{ form_widget(form.name_ar, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ form.source_ar.vars.id }}">{{ form_label(form.source_ar) }}</label>
|
||||
{{ form_widget(form.source_ar, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="questions-collection" data-prototype="{{ prototypeHtml|e('html_attr') }}" data-index="{{ form|length }}">
|
||||
{% for formQuestion in form.questions %}
|
||||
<div class="question-item">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="card border-left border-primary">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-3">
|
||||
<h5 class="card-title mb-5 question-number">Question N: {{ loop.index }}</h5>
|
||||
</div>
|
||||
<div class="col-md-3 offset-2">
|
||||
<button type="button" class="btn btn-outline-secondary rounded-pill mb-3">
|
||||
<i class="fa fa-eye"></i>Afficher
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-2 offset-2">
|
||||
<button type="button" class="btn btn-danger remove-question mb-3 float-right">
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQuestion.title.vars.id }}">{{ form_label(formQuestion.title) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQuestion.title, {'attr': {'class': 'form-control', 'placeholder': 'Visible que pour la createur du question' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQuestion.name_en.vars.id }}">{{ form_label(formQuestion.name_en) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQuestion.name_en, {'attr': {'class': 'form-control', 'placeholder': 'Visible pour les participants' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQuestion.name_fr.vars.id }}">{{ form_label(formQuestion.name_fr) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQuestion.name_fr, {'attr': {'class': 'form-control', 'placeholder': 'Visible pour les participants' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQuestion.name_ar.vars.id }}">{{ form_label(formQuestion.name_ar) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQuestion.name_ar, {'attr': {'class': 'form-control', 'placeholder': 'Visible pour les participants' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group col-sm-10">
|
||||
<label for="{{ formQuestion.amount.vars.id }}">{{ form_label(formQuestion.amount) }}</label>
|
||||
{{ form_widget(formQuestion.amount, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group col-sm-10">
|
||||
<label for="{{ formQuestion.max_participant.vars.id }}">{{ form_label(formQuestion.max_participant) }}</label>
|
||||
{{ form_widget(formQuestion.max_participant, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="card-title mt-4">Modalité</h4>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label>{{ form_label(formQuestion.type_modality) }}</label>
|
||||
{{ form_widget(formQuestion.type_modality, {'attr': {'class': 'form-control form-control-sm mb-3"' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mt-4">
|
||||
<div class="form-group">
|
||||
{% for key,child in formQuestion.choice %}
|
||||
<div class="custom-control-inline">
|
||||
{{ form_widget(child) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-info rounded-pill add-question">
|
||||
<i class="typcn typcn-folder"></i>
|
||||
Ajouter un autre question
|
||||
</button>
|
||||
{{ form_row(form.save, {'attr': {'class': 'btn btn-success rounded-pill save-question' }}) }}
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% if app.request.attributes.get('_route') == 'app_investigation_edit' %}
|
||||
<a href="{{ path('app_investigation_ready', {id: investigation.id}) }}" class="btn btn-secondary rounded-pill investigation-ready">
|
||||
Enquête Prête
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% block javascripts %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
console.log("ddddd");
|
||||
var $collection = $('#questions-collection');
|
||||
var $addButton = $('.add-question');
|
||||
|
||||
// Compter les questions existantes
|
||||
$collection.data('index', $collection.find('.question-item').length);
|
||||
|
||||
|
||||
$addButton.on('click', function() {
|
||||
var index = $collection.data('index');
|
||||
|
||||
var prototype = $collection.data('prototype');
|
||||
|
||||
var newForm = prototype.replace(/__name__/g, index);
|
||||
|
||||
var $newElement = $('<div class="row question-item"></div>');
|
||||
|
||||
$newElement.append(newForm);
|
||||
$collection.append($newElement);
|
||||
|
||||
// Mettre à jour l'index
|
||||
$collection.data('index', index + 1);
|
||||
|
||||
// Afficher les boutons supprimer
|
||||
$('.remove-question').show();
|
||||
|
||||
updateIndexes();
|
||||
|
||||
$("html, body").animate({
|
||||
scrollTop: $(window).scrollTop() + 700
|
||||
}, 400);
|
||||
|
||||
});
|
||||
|
||||
// Suppression des questions
|
||||
$collection.on('click', '.remove-question', function() {
|
||||
console.log($('.question-item').length);
|
||||
if ($('.question-item').length > 1) {
|
||||
$(this).closest('.question-item').remove();
|
||||
console.log($(this).closest('.question-item').remove());
|
||||
updateIndexes();
|
||||
|
||||
// Cacher le bouton supprimer s'il ne reste qu'une question
|
||||
if ($('.question-item').length === 1) {
|
||||
$('.remove-question').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function updateIndexes() {
|
||||
$('.question-item').each(function(index) {
|
||||
$(this).find('h5').text('Question N: ' + (index + 1));
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
75
templates/investigation/admin-active.html.twig
Normal file
75
templates/investigation/admin-active.html.twig
Normal file
@@ -0,0 +1,75 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Enquête{% endblock %}
|
||||
|
||||
{% set navbarTitle = "Enquête" %}
|
||||
{% set navbarPages = [{'page':"Gestion", 'url':null }] %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="content-page" class="content-page">
|
||||
<div class="container-fluid">
|
||||
<div class="iq-card">
|
||||
<div class="iq-card-header d-flex justify-content-between">
|
||||
<div class="iq-header-title">
|
||||
<h4 class="card-title">Liste des enquêtes à activer</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="iq-card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="user-list-table" class="table table-striped table-bordered" role="grid" aria-describedby="user-list-page-info">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Date Create</th>
|
||||
<th>Questions</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for investigation in investigations %}
|
||||
<tr>
|
||||
<td>{{ investigation.getId() }}</td>
|
||||
<td>{{ investigation.getNameEn() }}</td>
|
||||
<td>{{ investigation.getDateCreate()|date("d/m/Y H:i") }}</td>
|
||||
<td>{{ investigation.getNbrQuestions() }}</td>
|
||||
<td>
|
||||
{% if investigation.getLastState() == 10 %}
|
||||
<div class="badge badge-info">Création Terminer </div>
|
||||
{% elseif investigation.getLastState() == 11 %}
|
||||
<div class="badge badge-light">Encour de Création</div>
|
||||
{% elseif investigation.getLastState() == 12 %}
|
||||
<div class="badge badge-dark">Dupliquer</div>
|
||||
{% elseif investigation.getLastState() == 20 %}
|
||||
<div class="badge badge-success">Demande Valider</div>
|
||||
{% elseif investigation.getLastState() == 21 %}
|
||||
<div class="badge badge-warning text-white">Demande Envoyer</div>
|
||||
{% elseif investigation.getLastState() == 22 %}
|
||||
<div class="badge badge-danger text-white">Demande Rejeter</div>
|
||||
{% else %}
|
||||
--
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ path('app_investigation_admin_active', {id:investigation.getId()}) }}" class="">activer</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Wrapper END -->
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
81
templates/investigation/form-question.html.twig
Normal file
81
templates/investigation/form-question.html.twig
Normal file
@@ -0,0 +1,81 @@
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="card border-left border-primary">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-3">
|
||||
<h5 class="card-title mb-5 question-number">Question N: </h5>
|
||||
</div>
|
||||
<div class="col-md-3 offset-2">
|
||||
<button type="button" class="btn btn-outline-secondary rounded-pill mb-3">
|
||||
<i class="fa fa-eye"></i>Afficher
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-2 offset-2">
|
||||
<button type="button" class="btn btn-danger remove-question mb-3 float-right">
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQtn.title.vars.id }}">{{ form_label(formQtn.title) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQtn.title, {'attr': {'class': 'form-control', 'placeholder': 'Visible que pour la createur du question' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQtn.name_en.vars.id }}">{{ form_label(formQtn.name_en) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQtn.name_en, {'attr': {'class': 'form-control', 'placeholder': 'Visible pour les participants' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQtn.name_fr.vars.id }}">{{ form_label(formQtn.name_fr) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQtn.name_fr, {'attr': {'class': 'form-control', 'placeholder': 'Visible pour les participants' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="control-label col-sm-2 align-self-center mb-0" for="{{ formQtn.name_ar.vars.id }}">{{ form_label(formQtn.name_ar) }}:</label>
|
||||
<div class="col-sm-8">
|
||||
{{ form_widget(formQtn.name_ar, {'attr': {'class': 'form-control', 'placeholder': 'Visible pour les participants' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group col-sm-10">
|
||||
<label for="{{ formQtn.amount.vars.id }}">{{ form_label(formQtn.amount) }}</label>
|
||||
{{ form_widget(formQtn.amount, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group col-sm-10">
|
||||
<label for="{{ formQtn.max_participant.vars.id }}">{{ form_label(formQtn.max_participant) }}</label>
|
||||
{{ form_widget(formQtn.max_participant, {'attr': {'class': 'form-control' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="card-title mt-4">Modalité</h4>
|
||||
<div class="row mt-3">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label>{{ form_label(formQtn.type_modality) }}</label>
|
||||
{{ form_widget(formQtn.type_modality, {'attr': {'class': 'form-control form-control-sm mb-3"' }}) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 mt-4">
|
||||
<div class="iq-card-body">
|
||||
{% for child in formQtn.choice %}
|
||||
<div class="custom-control custom-radio custom-radio-color-checked custom-control-inline">
|
||||
{{ form_widget(child, {'attr': {'class': 'custom-control-input bg-success' }}) }}
|
||||
<label class="custom-control-label" for="{{ child.vars.id }}"> {{ form_label(child) }} </label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
105
templates/investigation/index.html.twig
Normal file
105
templates/investigation/index.html.twig
Normal file
@@ -0,0 +1,105 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Enquête{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
<!-- az-header -->
|
||||
<div class="az-content">
|
||||
<div class="container">
|
||||
|
||||
<div class="az-content-body d-flex flex-column">
|
||||
<div class="az-content-breadcrumb">
|
||||
<span>Enquête</span>
|
||||
<span>Gestion</span>
|
||||
</div>
|
||||
<h2 class="az-content-title">Enquête</h2>
|
||||
|
||||
<div class="az-content-label mg-b-5"></div>
|
||||
<p class="mg-b-20">Liste des enquêtes prêt a envoyer à l’administration pour valider</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table mg-b-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Demande de validation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for invest in invesAdmins %}
|
||||
<tr>
|
||||
<td>{{ invest.getId() }}</td>
|
||||
<td>{{ invest.getNameEn() }}</td>
|
||||
<td><a href="{{ path('app_investigation_send_validation', {id:invest.getId()}) }}" class="btn btn-success btn-sm">Envoyer</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- table-responsive -->
|
||||
|
||||
|
||||
<hr class="mg-y-30">
|
||||
|
||||
<div class="az-content-label mg-b-5"></div>
|
||||
<p class="mg-b-20">Liste des enquêtes prêt a envoyer à l’administration pour valider</p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table mg-b-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>Date Create</th>
|
||||
<th>Questions</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for investigation in investigations %}
|
||||
<tr>
|
||||
<td>{{ investigation.getId() }}</td>
|
||||
<td>{{ investigation.getNameEn() }}</td>
|
||||
<td>{{ investigation.getDateCreate()|date("d/m/Y H:i") }}</td>
|
||||
<td>{{ investigation.getNbrQuestions() }}</td>
|
||||
<td>
|
||||
{% if investigation.getLastState() == 10 %}
|
||||
<div class="badge badge-info">Création Terminer </div>
|
||||
{% elseif investigation.getLastState() == 11 %}
|
||||
<div class="badge badge-light">Encour de Création</div>
|
||||
{% elseif investigation.getLastState() == 12 %}
|
||||
<div class="badge badge-dark">Dupliquer</div>
|
||||
{% elseif investigation.getLastState() == 20 %}
|
||||
<div class="badge badge-success">Demande Valider</div>
|
||||
{% elseif investigation.getLastState() == 21 %}
|
||||
<div class="badge badge-warning text-white">Demande Envoyer</div>
|
||||
{% elseif investigation.getLastState() == 22 %}
|
||||
<div class="badge badge-danger text-white">Demande Rejeter</div>
|
||||
{% else %}
|
||||
--
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-icon-list">
|
||||
<a class="btn btn-indigo btn-icon" title="duplicate" href="{{ path('app_investigation_duplicate', {id:investigation.getId()}) }}"><i class="ion ion-ios-git-branch"></i></a>
|
||||
<a class="btn btn-indigo btn-icon" title="Edit" href="{{ path('app_investigation_edit', {id:investigation.getId()}) }}"><i class="typcn typcn-edit"></i></a>
|
||||
<a class="btn btn-indigo btn-icon" title="Afficher" href="{{ path('app_investigation_show', {id:investigation.getId()}) }}"><i class="ion ion-ios-tv"></i></a>
|
||||
<a class="btn btn-danger btn-icon" title="Delete" href="{{ path('app_investigation_delete', {id:investigation.getId()}) }}"><i class="ion ion-md-trash"></i></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- table-responsive -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
114
templates/investigation/show.html.twig
Normal file
114
templates/investigation/show.html.twig
Normal file
@@ -0,0 +1,114 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Enquête{% endblock %}
|
||||
|
||||
{% set state = investigation. getState() %}
|
||||
|
||||
{% if state != null %}
|
||||
{% set step1 = "" %}
|
||||
{% set step2 = "" %}
|
||||
{% set step3 = "" %}
|
||||
{% set step4 = "" %}
|
||||
{% set active1 = "" %}
|
||||
{% set active2 = "" %}
|
||||
{% set active3 = "" %}
|
||||
{% set active4 = "" %}
|
||||
{% set width = "0%" %}
|
||||
|
||||
{% if state.getStep() == 1 %}
|
||||
{% set step1 = "completed" %}
|
||||
{% set active1 = "active" %}
|
||||
{% set width = "10%" %}
|
||||
{% elseif state.getStep() == 2 %}
|
||||
{% set step1 = "completed" %}
|
||||
{% set step2 = "completed" %}
|
||||
{% set active2 = "active" %}
|
||||
{% set width = "50%" %}
|
||||
{% elseif state.getStep() == 3 %}
|
||||
{% set step1 = "completed" %}
|
||||
{% set step2 = "completed" %}
|
||||
{% set step3 = "completed" %}
|
||||
{% set active3 = "active" %}
|
||||
{% set width = "75%" %}
|
||||
{% elseif state.getStep() == 4 %}
|
||||
{% set step1 = "completed" %}
|
||||
{% set step2 = "completed" %}
|
||||
{% set step3 = "completed" %}
|
||||
{% set step4 = "completed" %}
|
||||
{% set active4 = "active" %}
|
||||
{% set width = "100%" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
<!-- az-header -->
|
||||
<div class="az-content">
|
||||
<div class="container">
|
||||
<div class="az-content-body d-flex flex-column">
|
||||
|
||||
<div class="az-content-breadcrumb">
|
||||
<span>Enquête</span>
|
||||
<span>Affichage</span>
|
||||
</div>
|
||||
<h2 class="az-content-title">Enquête</h2>
|
||||
|
||||
<div class="az-content-label mg-b-5"></div>
|
||||
<p class="mg-b-20"></p>
|
||||
|
||||
|
||||
<div class="card bd-0">
|
||||
<div class="card-header tx-medium bd-0">
|
||||
🇬🇧 English (UK) : {{ investigation.getNameEn() }}
|
||||
</div><!-- card-header -->
|
||||
<div class="card-body bd bd-t-0">
|
||||
<p class="mg-b-0">{{ investigation.getSourceEn() }}</p>
|
||||
</div><!-- card-body -->
|
||||
</div>
|
||||
|
||||
<div class="card bd-0">
|
||||
<div class="card-header tx-medium bd-0">
|
||||
🇫🇷 Français : {{ investigation.getNameFr() }}
|
||||
</div><!-- card-header -->
|
||||
<div class="card-body bd bd-t-0">
|
||||
<p class="mg-b-0">{{ investigation.getSourceFr() }}</p>
|
||||
</div><!-- card-body -->
|
||||
</div>
|
||||
|
||||
<div class="card bd-0">
|
||||
<div class="card-header tx-medium bd-0">
|
||||
العربية 🇸🇦 : {{ investigation.getNameAr() }}
|
||||
</div><!-- card-header -->
|
||||
<div class="card-body bd bd-t-0">
|
||||
<p class="mg-b-0">{{ investigation.getSourceAr() }}</p>
|
||||
</div><!-- card-body -->
|
||||
</div>
|
||||
|
||||
|
||||
{% for question in investigation.getQuestions() %}
|
||||
<div class="card border-left border-primary">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<div class="col-md-3">
|
||||
<h5 class="card-title mb-2 question-number">Question N: {{ loop.index }}</h5>
|
||||
</div>
|
||||
<div class="col-md-3 offset-1">
|
||||
Amount: {{ question.getAmount() }}
|
||||
</div>
|
||||
<div class="col-md-2 offset-1">
|
||||
Max participant: {{ question.getMaxParticipant() }}
|
||||
</div>
|
||||
</div>
|
||||
<p><strong>Title:</strong> {{ question.getTitle() }}<p>
|
||||
<p><strong>🇬🇧 Name:</strong> {{ question.getNameEn() }}<p>
|
||||
<p><strong>🇫🇷 Nom:</strong> {{ question.getNameFr() }}<p>
|
||||
<p><strong>🇸🇦 العربية:</strong> {{ question.getNameAr() }}<p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user