Permalink
Browse files

Fixed flash translation

  • Loading branch information...
1 parent f1fd699 commit 9a9d366b264a0054630eb07ae4a09ad519622389 @jaytaph committed Jul 14, 2012
Showing with 8 additions and 4 deletions.
  1. +3 −3 README.md
  2. +2 −1 app/Resources/FOSUserBundle/views/layout.html.twig
  3. +3 −0 app/Resources/views/flash_message.html.twig
View
@@ -14,7 +14,7 @@ TODO List
* [ ] Users should be able to add hardware / software / software / etc
* [ ] activation text and email texts should be in a decent layout
* [ ] email should be send to administrator when a new user has registered.
-* [ ] resources can only be deleted if they are not in use
+* [ ] resources can only be deleted if they are not in use (or even ever?)
* [ ] Matchenvironment widget should check matches based on environments (how do we calculate this?)
* [ ] Can we easily add fancyboxes for add/edit ?
* [ ] Do we even need messages? (if not, delete them)
@@ -25,7 +25,6 @@ TODO List
* [ ] Add links that allow users to add hardware/software/OS
* [ ] View more in the top-widgets should point to a TOP-X page (paginated) page.
* [ ] Make sure that machine / environment matches up (ie: /box/machine/X/environment/Y)
-* [ ] registration.flash.user_created should be translated
* [ ] When adding new hardware, the image of the hardware should be displayed (just like the gravatar images?)
* [ ] Implement user profile (/profile)
* [ ] fancybox always uses 75% now, make it so it autoscales to small window
@@ -59,4 +58,5 @@ Done
* [X] twitter handle should be added
* [X] when adding email address to registration, it should automatically load gravatar image
* [X] Display comments to software / hardware / operating systems
-* [X] Add comments to software / hardware / operating systems
+* [X] Add comments to software / hardware / operating systems
+* [X] registration.flash.user_created should be translated
@@ -4,7 +4,8 @@
{% block body %}
{% for key, message in app.session.getFlashes() %}
- <div class="{{ key }}">
+ <div class="alert">
+ <a class="close" data-dismiss="alert" href="#">&times;</a>
{{ message|trans({}, 'FOSUserBundle') }}
</div>
{% endfor %}
@@ -1,4 +1,6 @@
{% for key, flash in app.session.getFlashes() %}
+{# fos flash banners are done through the fos layouts, since they need translations #}
+{% if key|slice(0, 4) != "fos_" %}
<div class="alert alert-{{ key }}">
<a class="close" data-dismiss="alert" href="#">&times;</a>
{% if key == "success" %}
@@ -10,4 +12,5 @@
{% endif %}
{{ flash }}
</div>
+{% endif %}
{% endfor %}

0 comments on commit 9a9d366

Please sign in to comment.