Skip to content

Commit

Permalink
Ref #3: jolie page d'édition des annonces
Browse files Browse the repository at this point in the history
  • Loading branch information
DarckCrystale committed Jun 20, 2017
1 parent 72f54a3 commit 52a599b
Showing 1 changed file with 49 additions and 15 deletions.
64 changes: 49 additions & 15 deletions app/Resources/views/annonce/editer.html.twig
Original file line number Diff line number Diff line change
@@ -1,21 +1,55 @@
{% extends 'base.html.twig' %}

{% block title %}{{ annonce.titre }}{% endblock %}

{% block body %}
<h1>Annonce edit</h1>
<div class="col-md-12">
<ol class="breadcrumb">
<li><a href="/">AAAccueil</a></li>
<li><a href="{{ path('annonce_liste') }}">Annonces</a></li>
<li class="active">{{ annonce.titre }}</li>
</ol>

{{ form_start(form_editer) }}
{{ form_widget(form_editer) }}
<input type="submit" value="Edit" />
{{ form_end(form_editer) }}
<h1>Éditer l'annonce</h1>
</div>
<div class="col-md-12">
{{ form_start(form_editer, {'attr': {'id': 'form_editer_annonce'}}) }}
{{ form_widget(form_editer) }}
{{ form_end(form_editer) }}
</div>
<div class="col-md-6">
<button class="btn btn-danger" data-toggle="modal" data-target="#modal-{{ annonce.slug }}"><span class="glyphicon glyphicon-trash"></span> Supprimer l'annonce</button>
</div>
<div class="col-md-6 text-right">
<a href="{{ path('annonce_liste') }}" class="btn btn-default"><span class="glyphicon glyphicon-chevron-left"></span> Annuler les modifications</a>
<button class="btn btn-primary" form="form_editer_annonce"><span class="glyphicon glyphicon-ok"></span> Enregistrer les modifications</button>
</div>

<ul>
<li>
<a href="{{ path('annonce_liste') }}">Back to the list</a>
</li>
<li>
{{ form_start(form_supprimer) }}
<input type="submit" value="Delete">
{{ form_end(form_supprimer) }}
</li>
</ul>
<div id="modal-confirmation-suppression">
<div id="modal-{{ annonce.slug }}" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<p>Voulez-vous supprimer l'annonce {{ annonce.titre }} ?</p>
</div>
</div>
</div>
<div class="modal-footer text-left">
<div class="row">
<div class="col-md-6 text-left">
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-chevron-left"></span> Annuler</button>
</div>
<div class="col-md-6 text-right">
{{ form_start(form_supprimer) }}
<button class="btn btn-danger" type="submit"><span class="glyphicon glyphicon-trash"></span> Confirmer la suppression</button>
{{ form_end(form_supprimer) }}
</div>
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
{% endblock %}

0 comments on commit 52a599b

Please sign in to comment.