---
 src/app/controllers/portal_pool_controller.rb |    5 +++++
 src/app/views/portal_pool/images.html.erb     |   20 ++++++++++++++++++++
 src/app/views/portal_pool/show.html.erb       |    3 ++-
 3 files changed, 27 insertions(+), 1 deletions(-)
 create mode 100644 src/app/views/portal_pool/images.html.erb

diff --git a/src/app/controllers/portal_pool_controller.rb 
b/src/app/controllers/portal_pool_controller.rb
index 1897fc9..7a99d90 100644
--- a/src/app/controllers/portal_pool_controller.rb
+++ b/src/app/controllers/portal_pool_controller.rb
@@ -77,4 +77,9 @@ class PortalPoolController < ApplicationController
 
   def delete
   end
+
+  def images
+    @pool = PortalPool.find(params[:portal_pool])
+    require_privilege(Privilege::POOL_VIEW, @pool)
+  end
 end
diff --git a/src/app/views/portal_pool/images.html.erb 
b/src/app/views/portal_pool/images.html.erb
new file mode 100644
index 0000000..e0187a8
--- /dev/null
+++ b/src/app/views/portal_pool/images.html.erb
@@ -0,0 +1,20 @@
+<% if @pool.images.size == 0 %>
+<h1>There are no images to display</h1>
+<% else %>
+    <table>
+      <thead>
+        <tr>
+        <th scope="col">Name</th>
+          <th scope="col">Arch</th>
+        </tr>
+      </thead>
+      <tbody>
+  <%[email protected] {|image| %>
+        <tr>
+          <td><%= image.name %></td>
+          <td><%= image.architecture %></td>
+        </tr>
+      <% } %>
+    </tbody>
+  </table>
+<% end %>
\ No newline at end of file
diff --git a/src/app/views/portal_pool/show.html.erb 
b/src/app/views/portal_pool/show.html.erb
index 77f8b3b..9901897 100644
--- a/src/app/views/portal_pool/show.html.erb
+++ b/src/app/views/portal_pool/show.html.erb
@@ -36,5 +36,6 @@
   </table>
 <% end %>
 <%= link_to "Add a new instance", {:controller => "instance", :action => 
"new", :id => @pool}, :class=>"actionlink"%>
-<%= link_to "Hardware Profiles",  {:action => "hardware_profiles", :id => 
@pool.id}, :class=>"actionlink"%>
 <%= link_to "Accounts",  {:action => "accounts", :id => @pool.id}, 
:class=>"actionlink"%>
+<%= link_to "Hardware Profiles",  {:action => "hardware_profiles", :id => 
@pool.id}, :class=>"actionlink"%>
+<%=link_to "View Images", {:controller => "portal_pool", :action => "images", 
:portal_pool => @pool}, :class => "actionlink" %>
-- 
1.6.6.1

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to