ACK with a few notes inline. I know these were in the code already, but
it would still be great if you fixed them while you're in there anyway.
Regardless, feel free to push, this is great.
Thomas
--
No trees were killed to send this message, but a large number of
electrons were terribly inconvenienced.
On 06/30/2011 02:43 PM, jprovazn(a)redhat.com wrote:
From: Jan Provaznik<jprovazn(a)redhat.com>
---
src/app/views/layouts/_new_notification.haml | 50 ++++++++++++++------------
1 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/src/app/views/layouts/_new_notification.haml
b/src/app/views/layouts/_new_notification.haml
index 8e7fbbd..67ded3d 100644
--- a/src/app/views/layouts/_new_notification.haml
+++ b/src/app/views/layouts/_new_notification.haml
@@ -25,29 +25,33 @@
%li= flash[:warning]
-if flash[:error]
- -if !flash[:error][:successes].nil?&& !flash[:error][:successes].empty?
This ^ could use:
!flash[:error][:successes].blank?
- .notice.flash-group
- .flash-subset
- %div.heading
- =image_tag 'flash_notice_icon.png', :alt => 'Notices'
- %ul.flashes
- - flash[:error][:successes].each do |k, v|
- %li= "#{k}: #{v}"
- .error.flash-group
- .flash-subset
- %div.heading
- =image_tag 'flash_warning_icon.png', :alt => 'Warnings'
- %ul.flashes
- %li= flash[:error][:summary]
+ -if flash[:error].kind_of?(String)
.flash-subset
%div.heading
=image_tag 'flash_error_icon.png', :alt => 'Errors'
- %ul.flashes
- -if flash[:error].kind_of?(String)
- %li= flash[:error]
- -elsif !flash[:error][:failures].nil?&&
!flash[:error][:failures].empty?
!flash[:error][:failures].blank?
- -flash[:error][:failures].each do |k, v|
- %li= [k, ': ', v]
- -else
- -flash[:error].each do |e|
- %li= e
+ =flash[:error]
+ -else
+ -if !flash[:error][:successes].nil?&& !flash[:error][:successes].empty?
!flash[:error][:failures].blank?
+ .notice.flash-group
+ .flash-subset
+ %div.heading
+ =image_tag 'flash_notice_icon.png', :alt => 'Notices'
+ %ul.flashes
+ - flash[:error][:successes].each do |k, v|
+ %li= "#{k}: #{v}"
+ .error.flash-group
+ .flash-subset
+ %div.heading
+ =image_tag 'flash_warning_icon.png', :alt => 'Warnings'
+ %ul.flashes
+ %li= flash[:error][:summary]
+ .flash-subset
+ %div.heading
+ =image_tag 'flash_error_icon.png', :alt => 'Errors'
+ %ul.flashes
+ -if !flash[:error][:failures].nil?&&
!flash[:error][:failures].empty?
!flash[:error][:failures].blank?
+ -flash[:error][:failures].each do |k, v|
+ %li= [k, ': ', v]
+ -else
+ -flash[:error].each do |e|
+ %li= e