---
src/app/controllers/deployments_controller.rb | 1 -
src/app/views/layouts/_new_notification.html.haml | 19 ++++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb
b/src/app/controllers/deployments_controller.rb
index 14f9947..538eb6c 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -359,7 +359,6 @@ class DeploymentsController < ApplicationController
def set_errors_flash(errors)
unless errors.empty?
flash.now[:error] = {
- :summary => t("deployments.flash.error.not_launched"),
:failures => errors
}
end
diff --git a/src/app/views/layouts/_new_notification.html.haml
b/src/app/views/layouts/_new_notification.html.haml
index 5b7988a..99b3230 100644
--- a/src/app/views/layouts/_new_notification.html.haml
+++ b/src/app/views/layouts/_new_notification.html.haml
@@ -46,18 +46,23 @@
- 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][:summary].blank?
+ .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].blank?
- -flash[:error][:failures].each do |k, v|
- %li= [k, ': ', v]
+ -if flash[:error][:failures].length > 1
+ -flash[:error][:failures].each do |k, v|
+ %li= [k, ': ', v]
+ -else
+ -flash[:error][:failures].each do |k, v|
+ %li= [v]
-else
-flash[:error].each do |e|
%li= e
--
1.7.6.5