From: Jozef Zigmund <jzigm...@redhat.com>

---
 src/app/views/hardware_profiles/_list.haml     |   20 ++++++++++++++++++
 src/app/views/hardware_profiles/_list.html.erb |   26 ------------------------
 src/app/views/hardware_profiles/index.haml     |    1 +
 src/app/views/hardware_profiles/index.html.erb |    1 -
 4 files changed, 21 insertions(+), 27 deletions(-)
 create mode 100644 src/app/views/hardware_profiles/_list.haml
 delete mode 100644 src/app/views/hardware_profiles/_list.html.erb
 create mode 100644 src/app/views/hardware_profiles/index.haml
 delete mode 100644 src/app/views/hardware_profiles/index.html.erb

diff --git a/src/app/views/hardware_profiles/_list.haml 
b/src/app/views/hardware_profiles/_list.haml
new file mode 100644
index 0000000..9dca88e
--- /dev/null
+++ b/src/app/views/hardware_profiles/_list.haml
@@ -0,0 +1,20 @@
+- if @hardware_profiles.size == 0
+  %h1 There are no hardware profiles to display
+- else
+  %table
+    %thead
+      %tr
+        %th{:scope => "col"} Name
+        %th{:scope => "col"} Memory
+        %th{:scope => "col"} Storage
+        %th{:scope => "col"} CPU
+        %th{:scope => "col"} Architecture
+    %tbody
+      - @hardware_profiles.each {|hp|
+      %tr
+        %td= hp.name
+        %td= hp.memory.value if hp.memory
+        %td= hp.storage.value if hp.storage
+        %td= hp.cpu.value if hp.cpu
+        %td= hp.architecture.value if hp.architecture
+      - }
diff --git a/src/app/views/hardware_profiles/_list.html.erb 
b/src/app/views/hardware_profiles/_list.html.erb
deleted file mode 100644
index 1125c09..0000000
--- a/src/app/views/hardware_profiles/_list.html.erb
+++ /dev/null
@@ -1,26 +0,0 @@
-<% if @hardware_profiles.size == 0 %>
-<h1>There are no hardware profiles to display</h1>
-<% else %>
-    <table>
-      <thead>
-        <tr>
-        <th scope="col">Name</th>
-        <th scope="col">Memory</th>
-        <th scope="col">Storage</th>
-        <th scope="col">CPU</th>
-        <th scope="col">Architecture</th>
-        </tr>
-      </thead>
-      <tbody>
-  <%...@hardware_profiles.each {|hp| %>
-       <tr>
-          <td><%= hp.name %></td>
-          <td><%= hp.memory.value if hp.memory %></td>
-          <td><%= hp.storage.value if hp.storage %></td>
-          <td><%= hp.cpu.value if hp.cpu %></td>
-          <td><%= hp.architecture.value if hp.architecture %></td>
-        </tr>
-      <% } %>
-    </tbody>
-  </table>
-<% end %>
diff --git a/src/app/views/hardware_profiles/index.haml 
b/src/app/views/hardware_profiles/index.haml
new file mode 100644
index 0000000..9dabd7e
--- /dev/null
+++ b/src/app/views/hardware_profiles/index.haml
@@ -0,0 +1 @@
+= render :partial => 'list'
diff --git a/src/app/views/hardware_profiles/index.html.erb 
b/src/app/views/hardware_profiles/index.html.erb
deleted file mode 100644
index c19c3fa..0000000
--- a/src/app/views/hardware_profiles/index.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'list' %>
-- 
1.7.2.2

_______________________________________________
deltacloud-devel mailing list
deltacloud-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to