-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref #4 : joli aperçu d'une notification
- Loading branch information
1 parent
03be49b
commit 81b2e4f
Showing
1 changed file
with
68 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,74 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}{{ notification.titre }}{% endblock %} | ||
|
||
{% block body %} | ||
<h1>Notification</h1> | ||
<div class="col-md-12"> | ||
<ol class="breadcrumb"> | ||
<li><a href="/">AAAccueil</a></li> | ||
<li><a href="{{ path('notification_liste') }}">Notifications</a></li> | ||
<li class="active">{{ notification.titre }}</li> | ||
</ol> | ||
<h1>Notification</h1> | ||
|
||
<dl class="dl-horizontal"> | ||
<dt>ID</dt> | ||
<dd>{{ notification.id }}</dd> | ||
<dt>Slug</dt> | ||
<dd>{{ notification.slug }}</dd> | ||
<dt>A été créé le</dt> | ||
<dd>{% if notification.dateCreation %}{{ notification.dateCreation|localizeddate('none', 'none', 'fr_FR', null, 'd LLLL Y à H:mm') }}{% endif %}</dd> | ||
</dl> | ||
|
||
<dl class="dl-horizontal"> | ||
<dt>Titre</dt> | ||
<dd>{{ notification.titre }}</dd> | ||
<dt>Créateur</dt> | ||
<dd>{{ notification.createur.pseudo }}</dd> | ||
<dt>Icône</dt> | ||
<dd><span class="{{ notification.icone }}"></span></dd> | ||
<dt>Description</dt> | ||
<dd>{{ notification.description }}</dd> | ||
</dl> | ||
|
||
<dl class="dl-horizontal"> | ||
<dt>Visibilité</dt> | ||
<dd>{% if notification.estPublic %}Publique{% else %}Privée{% endif %}</dd> | ||
</dl> | ||
|
||
<table> | ||
<tbody> | ||
<tr> | ||
<th>Id</th> | ||
<td>{{ notification.id }}</td> | ||
</tr> | ||
<tr> | ||
<th>Slug</th> | ||
<td>{{ notification.slug }}</td> | ||
</tr> | ||
<tr> | ||
<th>Titre</th> | ||
<td>{{ notification.titre }}</td> | ||
</tr> | ||
<tr> | ||
<th>Description</th> | ||
<td>{{ notification.description }}</td> | ||
</tr> | ||
<tr> | ||
<th>Icone</th> | ||
<td><span class="glyphicon {{ notification.icone }}" aria-hidden="true"></span></td> | ||
</tr> | ||
<tr> | ||
<th>Datecreation</th> | ||
<td>{% if notification.dateCreation %}{{ notification.dateCreation|localizeddate('none', 'none', 'fr_FR', null, 'd LLLL Y à H:mm') }}{% endif %}</td> | ||
</tr> | ||
<tr> | ||
<th>Estpublic</th> | ||
<td>{% if notification.estPublic %}Yes{% else %}No{% endif %}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<div class="col-md-6"> | ||
<button class="btn btn-danger" data-toggle="modal" data-target="#modal-{{ notification.slug }}"><span class="glyphicon glyphicon-trash"></span> Supprimer la notification</button> | ||
</div> | ||
<div class="col-md-6 text-right"> | ||
<a href="{{ path('notification_editer', { 'slug': notification.slug }) }}" class="btn btn-primary"><span class="glyphicon glyphicon-edit"></span> Éditer la notification</a> | ||
</div> | ||
|
||
<ul> | ||
<li> | ||
<a href="{{ path('notification_liste') }}">Back to the list</a> | ||
</li> | ||
<li> | ||
<a href="{{ path('notification_editer', { 'slug': notification.slug }) }}">Edit</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-{{ notification.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 la notification {{ notification.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> | ||
</div> | ||
{% endblock %} |