This is just an initial partial, still needs styling. Previously,
we were setting the flash[] messages, but not displaying them anywhere.
---
src/app/views/layouts/_notification.rhtml | 31 +++++++++++++++++++++++
src/app/views/layouts/cloud/_notification.rhtml | 2 +-
src/app/views/layouts/dcloud.rhtml | 2 +-
3 files changed, 33 insertions(+), 2 deletions(-)
create mode 100644 src/app/views/layouts/_notification.rhtml
diff --git a/src/app/views/layouts/_notification.rhtml
b/src/app/views/layouts/_notification.rhtml
new file mode 100644
index 0000000..b969739
--- /dev/null
+++ b/src/app/views/layouts/_notification.rhtml
@@ -0,0 +1,31 @@
+<div id="notification" <%if flash[:error]%>class="error-align"<%end%>>
+ <%= link_to "", params, :id => "close-notify" %>
+ <% if flash[:error] %>
+ <% if !flash[:error][:successes].nil? &&
!flash[:error][:successes].empty? %>
+ <div class="success">
+ <h4>The following items were successful:</h4>
+ <ul>
+ <% flash[:error][:successes].each {|item| %>
+ <li><%= item %></li>
+ <% } %>
+ </ul>
+ </div>
+ <% end %>
+ <% if !flash[:error][:failures].nil? && !flash[:error][:failures].empty? %>
+ <div class="warning"><h4><%= flash[:error][:summary]%></h4></div>
+ <div class="error">
+ <ul>
+ <% flash[:error][:failures].each {|key, value| %>
+ <li><%= key %>: <%= value %></li>
+ <% } %>
+ </ul>
+ </div>
+ <% end %>
+ <% end %>
+ <% if flash[:warning] %>
+ <div class="warning"><h4><%= flash[:warning] %></h4></div>
+ <% end %>
+ <% if flash[:notice] %>
+ <div class="success"><ul><li><%= flash[:notice] %></li></ul></div>
+ <% end %>
+</div>
\ No newline at end of file
diff --git a/src/app/views/layouts/cloud/_notification.rhtml
b/src/app/views/layouts/cloud/_notification.rhtml
index b969739..bd468a1 100644
--- a/src/app/views/layouts/cloud/_notification.rhtml
+++ b/src/app/views/layouts/cloud/_notification.rhtml
@@ -1,4 +1,4 @@
-<div id="notification" <%if flash[:error]%>class="error-align"<%end%>>
+<div id="notification">
<%= link_to "", params, :id => "close-notify" %>
<% if flash[:error] %>
<% if !flash[:error][:successes].nil? &&
!flash[:error][:successes].empty? %>
diff --git a/src/app/views/layouts/dcloud.rhtml
b/src/app/views/layouts/dcloud.rhtml
index 60e0ad8..0026a00 100644
--- a/src/app/views/layouts/dcloud.rhtml
+++ b/src/app/views/layouts/dcloud.rhtml
@@ -79,7 +79,7 @@
</div>
<div id="main">
<div id="content_area">
-
+ <%= render :partial => '/layouts/notification' %>
<%= yield %> <%# the rest of the center and right hand side %>
</div>
</div>
--
1.6.6.1
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel