---
 src/app/controllers/portal_pool_controller.rb |    5 +++++
 src/app/views/portal_pool/images.html.erb     |   22 ++++++++++++++++++++++
 src/app/views/portal_pool/show.html.erb       |    1 +
 3 files changed, 28 insertions(+), 0 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 90df8a5..9106346 100644
--- a/src/app/controllers/portal_pool_controller.rb
+++ b/src/app/controllers/portal_pool_controller.rb
@@ -66,4 +66,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..ad815fd
--- /dev/null
+++ b/src/app/views/portal_pool/images.html.erb
@@ -0,0 +1,22 @@
+<% 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>
+        <th scope="col">Provider</th>
+        </tr>
+      </thead>
+      <tbody>
+  <%[email protected] {|image| %>
+        <tr>
+          <td><%= image.name %></td>
+          <td><%= image.architecture %></td>
+          <td><%= image.provider.name %></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 d649199..d9173e8 100644
--- a/src/app/views/portal_pool/show.html.erb
+++ b/src/app/views/portal_pool/show.html.erb
@@ -36,3 +36,4 @@
   </table>
 <% end %>
 <%= link_to "Add a new instance", {:controller => "instance", :action => 
"new", :id => @pool}, :class=>"actionlink"%>
+<%=link_to "View Images", {:controller => "portal_pool", :action => "images", 
:portal_pool => @pool}, :class => "actionlink" %>
\ No newline at end of file
-- 
1.6.6.1

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

Reply via email to