Commit 602b0f34 authored by Mat's avatar Mat
Browse files

Lettre, préparation du template

parent f882a37f
......@@ -4,6 +4,7 @@ namespace PotageBundle\Form\Lettre;
use PotageBundle\Entity\Lettre;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
......@@ -11,7 +12,10 @@ class LettreType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('sauver', SubmitType::class, array(
'label' => 'Enregistrer',
'attr' => array('class' => 'btn btn-dark mb-2')
));
}
public function configureOptions(OptionsResolver $resolver)
......
......@@ -15,13 +15,131 @@
{% endblock %}
{% block sidebarContent %}
<div class="row">
<div class="row">
<aside class="col-3">
<div class="card text-white bg-dark" id="card-button-ajouter">
<div class="card-header">
<a href="javascript: void(0);" class="btn btn-dark btn-block btn-create"
data-toggle="modal" data-target=".form-lettre-modal">
<i class="fas fa-plus"></i>
Écrire une nouvelle lettre
</a>
</div>
</div>
<div style="margin: 1em 0;">
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a class="nav-link active" id="v-pills-actuel-tab" data-toggle="pill" href="#v-pills-actuel" role="tab"
aria-controls="v-pills-actuel" aria-selected="true">
<i class="fas fa-caret-right fa-fw"></i> En ce moment</a>
<a class="nav-link" id="v-pills-archives-tab" data-toggle="pill" href="#v-pills-archives" role="tab"
aria-controls="v-pills-archives" aria-selected="false">
<i class="fas fa-caret-right fa-fw"></i> Archives</a>
</div>
</div>
<div class="card">
<div class="card-body">
<h3 class="card-title"><i class="fas fa-question-circle fa-fw"></i> Info</h3>
<p class="card-text">Les lettres sont d'abord
<span class="badge badge-secondary">1</span> associées à une offre, puis
<span class="badge badge-secondary">2</span> associées à un groupe, puis
<span class="badge badge-secondary">3</span> peuplées d'infos, puis
<span class="badge badge-secondary">4</span> mise en publication</p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<span id="t_rows">Nombre total de lettres</span>
<span class="badge badge-primary badge-pill">74</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Lettres en préparation
<span class="badge badge-primary badge-pill">3</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
</li>
<li class="list-group-item">
</li>
</ul>
</div>
</aside>
{% endblock %}
{% block sectionContent %}
<section class="col-9">
{% include '@Potage/Lettre/ajaxForm.html.twig' %}
<div class="row">
<div class="col left hd-1">
<h1>{{ block('title') }}</h1>
</div>
</div>
<div class="col right hd-1">
<div style="margin-top: 0.65em;">
{#
<a href="javascript: void(0);" class="btn btn-outline-dark mb-2 btn-sm btn-reload">
<i class="fas fa-sync-alt"></i>
Rafraîchir la liste
</a>
#}
</div>
</div>
</div>
<div class="tab-content" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="v-pills-actuel" role="tabpanel" aria-labelledby="v-pills-actuel-tab">
<h2><i class="fas fa-angle-down fa-fw"></i> En préparation</h2>
<table id="maintab-draft" class="table offres table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Offre</th>
<th scope="col">Contenu</th>
<th scope="col">Créée le</th>
<th scope="col">Date de clôture</th>
<th scope="col">Référence</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<h2><i class="fas fa-angle-down fa-fw"></i> En cours</h2>
<table id="maintab-current" class="table offres table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Offre</th>
<th scope="col">Contenu</th>
<th scope="col">Créée le</th>
<th scope="col">Date de clôture</th>
<th scope="col">Référence</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="v-pills-archives" role="tabpanel" aria-labelledby="v-pills-archives-tab">
<h2><i class="fas fa-angle-down fa-fw"></i> Archives</h2>
<table id="maintab-closed" class="table offres table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Offre</th>
<th scope="col">Contenu</th>
<th scope="col">Créée le</th>
<th scope="col">Date de clôture</th>
<th scope="col">Référence</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</section>
</div>
{% endblock %}
{% block customJS %}
......
<div class="modal fade form-lettre-modal" tabindex="-1" role="dialog" aria-labelledby="FormLettreModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title" id="form-lettre"></h2>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{{ form_start(formLettre) }}
<div class="modal-body">
{{ form_errors(formLettre) }}
<div class="form-group row">
<div class="col-sm-4">
</div>
<div class="col-sm-8">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary mb-2" data-dismiss="modal">Fermer</button>
{{ form_label(formLettre.sauver) }}
{{ form_widget(formLettre.sauver) }}
</div>
{{ form_rest(formLettre) }}
{{ form_end(formLettre) }}
</div>
</div>
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment