From: Jozef Zigmund <[email protected]>
---
src/app/views/provider/_form.haml | 17 +++++++++++++
src/app/views/provider/_form.html.erb | 12 ---------
src/app/views/provider/accounts.haml | 20 ++++++++++++++++
src/app/views/provider/accounts.html.erb | 26 ---------------------
src/app/views/provider/delete.haml | 2 +
src/app/views/provider/delete.html.erb | 2 -
src/app/views/provider/hardware_profiles.haml | 1 +
src/app/views/provider/hardware_profiles.html.erb | 1 -
src/app/views/provider/new.haml | 1 +
src/app/views/provider/new.html.erb | 1 -
src/app/views/provider/realms.haml | 1 +
src/app/views/provider/realms.html.erb | 1 -
src/app/views/provider/settings.haml | 3 ++
src/app/views/provider/settings.html.erb | 4 ---
src/app/views/provider/show.haml | 12 +++++++++
src/app/views/provider/show.html.erb | 18 --------------
16 files changed, 57 insertions(+), 65 deletions(-)
create mode 100644 src/app/views/provider/_form.haml
delete mode 100644 src/app/views/provider/_form.html.erb
create mode 100644 src/app/views/provider/accounts.haml
delete mode 100644 src/app/views/provider/accounts.html.erb
create mode 100644 src/app/views/provider/delete.haml
delete mode 100644 src/app/views/provider/delete.html.erb
create mode 100644 src/app/views/provider/hardware_profiles.haml
delete mode 100644 src/app/views/provider/hardware_profiles.html.erb
create mode 100644 src/app/views/provider/new.haml
delete mode 100644 src/app/views/provider/new.html.erb
create mode 100644 src/app/views/provider/realms.haml
delete mode 100644 src/app/views/provider/realms.html.erb
create mode 100644 src/app/views/provider/settings.haml
delete mode 100644 src/app/views/provider/settings.html.erb
create mode 100644 src/app/views/provider/show.haml
delete mode 100644 src/app/views/provider/show.html.erb
diff --git a/src/app/views/provider/_form.haml
b/src/app/views/provider/_form.haml
new file mode 100644
index 0000000..e338a60
--- /dev/null
+++ b/src/app/views/provider/_form.haml
@@ -0,0 +1,17 @@
+.dcloud_form
+ = error_messages_for 'provider'
+ %h2 Add a cloud provider
+ %br/
+ - form_tag :controller => :provider, :action => 'create' do
+ %ul
+ %li
+ %label
+ Name
+ %span Provide a descriptive name for this provider connection.
+ = text_field :provider, :name, :class => "txtfield"
+ %li
+ %label
+ URL
+ %span Enter the URL of the cloud provider.
+ = text_field:provider, :url, :class => "txtfield"
+ = submit_tag "Save", :class => "submit"
diff --git a/src/app/views/provider/_form.html.erb
b/src/app/views/provider/_form.html.erb
deleted file mode 100644
index 789f34b..0000000
--- a/src/app/views/provider/_form.html.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-<div class="dcloud_form">
- <%= error_messages_for 'provider' %>
-
- <h2>Add a cloud provider</h2><br />
- <% form_tag :controller => :provider, :action => 'create' do %>
- <ul>
- <li><label>Name<span>Provide a descriptive name for this provider
connection.</span></label><%= text_field :provider, :name, :class => "txtfield"
%></li>
- <li><label>URL<span>Enter the URL of the cloud provider.</span></label><%=
text_field:provider, :url, :class => "txtfield" %></li>
- </ul>
- <%= submit_tag "Save", :class => "submit" %>
- <% end %>
-</div>
diff --git a/src/app/views/provider/accounts.haml
b/src/app/views/provider/accounts.haml
new file mode 100644
index 0000000..647f44a
--- /dev/null
+++ b/src/app/views/provider/accounts.haml
@@ -0,0 +1,20 @@
+- if @provider.cloud_accounts.size == 0
+ %h1 There are no accounts to display
+- else
+ %table
+ %thead
+ %tr
+ %th{:scope => "col"} Label
+ %th{:scope => "col"} Username
+ %th{:scope => "col"}
+ %th{:scope => "col"}
+ %tbody
+ - @provider.cloud_accounts.each {|acct|
+ %tr
+ %td= acct.label
+ %td= acct.username
+ %td= link_to "Edit", {:controller => 'cloud_accounts', :action =>
'edit', :id => acct.id} if has_account_modify?(@provider)
+ %td= link_to "Delete", {:controller => 'cloud_accounts', :action =>
'destroy', :id => acct.id} if has_account_modify?(@provider) &&
acct.destroyable?
+ %td= link_to "Quota", {:controller => 'quota', :action => 'show', :id
=> acct.id, :parent_type => "cloud_account"}
+ - }
+= link_to "Add an account", {:controller => "cloud_accounts", :action =>
"new", :provider_id => @provider}, :class => "actionlink"
diff --git a/src/app/views/provider/accounts.html.erb
b/src/app/views/provider/accounts.html.erb
deleted file mode 100644
index ca8d287..0000000
--- a/src/app/views/provider/accounts.html.erb
+++ /dev/null
@@ -1,26 +0,0 @@
-<% if @provider.cloud_accounts.size == 0 %>
-<h1>There are no accounts to display</h1>
-<% else %>
- <table>
- <thead>
- <tr>
- <th scope="col">Label</th>
- <th scope="col">Username</th>
- <th scope="col"></th>
- <th scope="col"></th>
- </tr>
- </thead>
- <tbody>
- <%[email protected]_accounts.each {|acct| %>
- <tr>
- <td><%= acct.label %></td>
- <td><%= acct.username %></td>
- <td><%= link_to "Edit", {:controller => 'cloud_accounts', :action
=> 'edit', :id => acct.id} if has_account_modify?(@provider) %></td>
- <td><%= link_to "Delete", {:controller => 'cloud_accounts', :action
=> 'destroy', :id => acct.id} if has_account_modify?(@provider) &&
acct.destroyable? %></td>
- <td><%= link_to "Quota", {:controller => 'quota', :action =>
'show', :id => acct.id, :parent_type => "cloud_account"} %></td>
- </tr>
- <% } %>
- </tbody>
- </table>
-<% end %>
-<%= link_to "Add an account", {:controller => "cloud_accounts", :action =>
"new", :provider_id => @provider}, :class => "actionlink" %>
diff --git a/src/app/views/provider/delete.haml
b/src/app/views/provider/delete.haml
new file mode 100644
index 0000000..6727d77
--- /dev/null
+++ b/src/app/views/provider/delete.haml
@@ -0,0 +1,2 @@
+%h1 ProviderController#delete
+%p Find me in app/views/provider_controller/delete.html.erb
diff --git a/src/app/views/provider/delete.html.erb
b/src/app/views/provider/delete.html.erb
deleted file mode 100644
index b21ec14..0000000
--- a/src/app/views/provider/delete.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<h1>ProviderController#delete</h1>
-<p>Find me in app/views/provider_controller/delete.html.erb</p>
diff --git a/src/app/views/provider/hardware_profiles.haml
b/src/app/views/provider/hardware_profiles.haml
new file mode 100644
index 0000000..96fe378
--- /dev/null
+++ b/src/app/views/provider/hardware_profiles.haml
@@ -0,0 +1 @@
+= render :partial => 'hardware_profiles/list'
diff --git a/src/app/views/provider/hardware_profiles.html.erb
b/src/app/views/provider/hardware_profiles.html.erb
deleted file mode 100644
index 579d796..0000000
--- a/src/app/views/provider/hardware_profiles.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'hardware_profiles/list' %>
diff --git a/src/app/views/provider/new.haml b/src/app/views/provider/new.haml
new file mode 100644
index 0000000..c66fabf
--- /dev/null
+++ b/src/app/views/provider/new.haml
@@ -0,0 +1 @@
+= render :partial => 'form'
diff --git a/src/app/views/provider/new.html.erb
b/src/app/views/provider/new.html.erb
deleted file mode 100644
index 8353b17..0000000
--- a/src/app/views/provider/new.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'form' %>
\ No newline at end of file
diff --git a/src/app/views/provider/realms.haml
b/src/app/views/provider/realms.haml
new file mode 100644
index 0000000..31f7886
--- /dev/null
+++ b/src/app/views/provider/realms.haml
@@ -0,0 +1 @@
+= render :partial => 'realms/list'
diff --git a/src/app/views/provider/realms.html.erb
b/src/app/views/provider/realms.html.erb
deleted file mode 100644
index 3aca533..0000000
--- a/src/app/views/provider/realms.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= render :partial => 'realms/list' %>
diff --git a/src/app/views/provider/settings.haml
b/src/app/views/provider/settings.haml
new file mode 100644
index 0000000..b4cdc43
--- /dev/null
+++ b/src/app/views/provider/settings.haml
@@ -0,0 +1,3 @@
+- form_tag({ :action => 'destroy' }, {:onsubmit => "return confirm('Really
delete the provider?');"}) do
+ = hidden_field :provider, :id
+ = submit_tag "Delete Provider", :class => "submit_link"
diff --git a/src/app/views/provider/settings.html.erb
b/src/app/views/provider/settings.html.erb
deleted file mode 100644
index 806fada..0000000
--- a/src/app/views/provider/settings.html.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-<% form_tag({ :action => 'destroy' }, {:onsubmit => "return confirm('Really
delete the provider?');"}) do %>
- <%= hidden_field :provider, :id %>
- <%= submit_tag "Delete Provider", :class => "submit_link" %>
-<% end %>
diff --git a/src/app/views/provider/show.haml b/src/app/views/provider/show.haml
new file mode 100644
index 0000000..b3e0bd7
--- /dev/null
+++ b/src/app/views/provider/show.haml
@@ -0,0 +1,12 @@
+- content_for :scripts do
+ :javascript
+ $(document).ready(function() {
+ $("#provider-tabs").tabs();
+ });
+#provider-tabs
+ %ul
+ %li= link_to "Accounts", {:action => "accounts", :id => @provider.id,
:ajax => true}
+ %li= link_to "Realms", {:action => "realms", :id => @provider.id, :ajax
=> true }
+ - if has_view_perms?
+ %li= link_to "User access", {:controller => "permissions", :action =>
"list", :provider_id => @provider.id, :ajax => true }
+ %li= link_to "Settings", {:action => "settings", :id => @provider.id,
:ajax => true}
diff --git a/src/app/views/provider/show.html.erb
b/src/app/views/provider/show.html.erb
deleted file mode 100644
index 81f288e..0000000
--- a/src/app/views/provider/show.html.erb
+++ /dev/null
@@ -1,18 +0,0 @@
-<% content_for :scripts do %>
- <script type="text/javascript">
- $(document).ready(function() {
- $("#provider-tabs").tabs();
- });
- </script>
-<% end %>
-
-<div id="provider-tabs">
- <ul>
- <li><%= link_to "Accounts", {:action => "accounts", :id => @provider.id,
:ajax => true} %></li>
- <li><%= link_to "Realms", {:action => "realms", :id => @provider.id,
:ajax => true } %></li>
- <% if has_view_perms? %>
- <li><%= link_to "User access", {:controller => "permissions", :action
=> "list", :provider_id => @provider.id, :ajax => true } %></li>
- <% end %>
- <li><%= link_to "Settings", {:action => "settings", :id => @provider.id,
:ajax => true} %></li>
- </ul>
-</div>
--
1.7.2.2
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel