aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/.gitkeep0
-rw-r--r--app/views/dashboard/_foreman_image_upload_widget.html.erb2
-rw-r--r--app/views/image_upload/_form.html.erb11
-rw-r--r--app/views/image_upload/index.html.erb18
-rw-r--r--app/views/image_upload/new.html.erb2
5 files changed, 33 insertions, 0 deletions
diff --git a/app/views/.gitkeep b/app/views/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/views/.gitkeep
diff --git a/app/views/dashboard/_foreman_image_upload_widget.html.erb b/app/views/dashboard/_foreman_image_upload_widget.html.erb
new file mode 100644
index 0000000..88b52ca
--- /dev/null
+++ b/app/views/dashboard/_foreman_image_upload_widget.html.erb
@@ -0,0 +1,2 @@
+<h4 class="header ca"><%= _('ForemanImageUpload') %></h4>
+<%= _('Widget content') %>
diff --git a/app/views/image_upload/_form.html.erb b/app/views/image_upload/_form.html.erb
new file mode 100644
index 0000000..8faa14e
--- /dev/null
+++ b/app/views/image_upload/_form.html.erb
@@ -0,0 +1,11 @@
+<%= form_for(@image_info,
+ :url => compute_resource_image_upload_index_path(@compute)
+) do |f| %>
+
+<%= f.label :image %>
+<%= f.file_field :image %>
+
+<%= selectable_f f, :pool_name, @compute.storage_pools.map(&:name), { }, :label => _("Upload to storage pool"), :label_size => "col-md-2" %>
+
+<%= submit_or_cancel f, false, :cancel_path => compute_resource_image_upload_index_path(@compute) %>
+<% end %>
diff --git a/app/views/image_upload/index.html.erb b/app/views/image_upload/index.html.erb
new file mode 100644
index 0000000..380ae57
--- /dev/null
+++ b/app/views/image_upload/index.html.erb
@@ -0,0 +1,18 @@
+<% title "Image upload for #{@compute.name}" %>
+
+<% title_actions button_group(link_to_if_authorized _('Upload Imge'), hash_for_new_compute_resource_image_upload_path(params[:compute_resource_id]), :class => 'btn btn-default') %>
+
+<table class="table table-bordered table-striped table-condensed" data-table='inline'>
+ <thead>
+ <th>Pool</th>
+ <th>Capacity</th>
+ </thead>
+ <tbody>
+ <% @compute.storage_pools.each do |pool| %>
+ <tr>
+ <td><%= pool.name %></td>
+ <td><%= pool.capacity %></td>
+ </tr>
+ <% end -%>
+ </tbody>
+</table>
diff --git a/app/views/image_upload/new.html.erb b/app/views/image_upload/new.html.erb
new file mode 100644
index 0000000..426be11
--- /dev/null
+++ b/app/views/image_upload/new.html.erb
@@ -0,0 +1,2 @@
+<% title _('Upload Image') %>
+<%= render :partial => 'form' %>