Skip to content

Commit

Permalink
Merge pull request #27 from pifaace/feature/flashMessages
Browse files Browse the repository at this point in the history
Feature/flash messages
  • Loading branch information
pifaace committed Nov 20, 2017
2 parents 6ae9f05 + 312eff1 commit 74cb89c
Show file tree
Hide file tree
Showing 8 changed files with 242 additions and 170 deletions.
7 changes: 6 additions & 1 deletion app/Resources/views/backoffice/article/edit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
{% block body %}
{% set titlePage = 'Editer un article' %}
<div class="col-lg-10 bg-grey ml-md-auto form-padding">

<div class="form-content">
<h2>{{ titlePage }}</h2>


{% include 'flashMessage/flashMessage.html.twig' %}

{{ form_start(form) }}
{{ form_errors(form) }}

Expand All @@ -29,7 +33,8 @@
<div class="tags">
{% if article.tags is not null %}
{% for tag in article.tags %}
<div class='tag'>{{ tag.name }}<i class='fa fa-times tag-remove' aria-hidden='true'></i></div>
<div class='tag'>{{ tag.name }}<i class='fa fa-times tag-remove' aria-hidden='true'></i>
</div>
{% endfor %}
{% endif %}
<input type="text" class="tag-input" placeholder="Ajouter un tag">
Expand Down
3 changes: 3 additions & 0 deletions app/Resources/views/backoffice/article/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{% block body %}
<div class="col-lg-10 bg-grey ml-md-auto">
<h2>LES ARTICLES</h2>

{% include 'flashMessage/flashMessage.html.twig' %}

<hr>
<a class="btn btn-primary mt-2 mb-2" href="{{ path('article_new') }}">Nouvel article</a>

Expand Down
9 changes: 9 additions & 0 deletions app/Resources/views/flashMessage/flashMessage.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% for flashMessage in app.session.flashbag.get('notice') %}
<div class="flash-container">
<div class="alert alert-success" role="alert">
<div class="flash-notice">
{{ flashMessage }}
</div>
</div>
</div>
{% endfor %}
2 changes: 2 additions & 0 deletions assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
@import "admin/admin";

@import "design/index";

@import "design/flash";
1 change: 1 addition & 0 deletions assets/scss/design/_flash.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading

0 comments on commit 74cb89c

Please sign in to comment.