foreman/app/views/hosts/_assign_hosts.html.erb @ bf4a13d3
671b45e9 | Joseph Mitchell Magen | <%= javascript "jquery.cookie", "host_checkbox" %>
|
|
<% assign_selected_hosts_taxonomy_path = (@taxonomy_type == "Location") ? assign_selected_hosts_location_path : assign_selected_hosts_organization_path %>
|
|||
<%= form_for taxonomy, :url => assign_selected_hosts_taxonomy_path do |f| %>
|
|||
85eac622 | Amos Benari | <%= base_errors_for taxonomy %>
|
|
bfbf7ed8 | Lukas Zapletal | <%= wizard_header 3, _("Create %s") % taxonomy.class.name, _("Select Hosts"), _("Assign Selected Hosts") %>
|
|
85eac622 | Amos Benari | <div class="row">
|
|
bf4a13d3 | Walden Raines | <div class="col-md-11">
|
|
671b45e9 | Joseph Mitchell Magen | <table class="table table-bordered table-striped table-condensed" >
|
|
<tr>
|
|||
bfbf7ed8 | Lukas Zapletal | <th class="ca"><%= check_box_tag "check_all", "", false, { :onclick => "toggleCheck()", :title => _("Select All") } %></th>
|
|
671b45e9 | Joseph Mitchell Magen | <th class=''><%= sort :name %></th>
|
|
bf4a13d3 | Walden Raines | <th class="hidden-xs"><%= sort :os, :as => _("Operating system") %></th>
|
|
<th class="hidden-xs"><%= sort :environment %></th>
|
|||
<th class="hidden-tablet hidden-xs"><%= sort :model %></th>
|
|||
<th class="hidden-tablet hidden-xs"><%= sort :hostgroup, :as => _("Host group") %></th>
|
|||
671b45e9 | Joseph Mitchell Magen | </tr>
|
|
<% hosts.each do |host| %>
|
|||
<tr>
|
|||
<td class="ca">
|
|||
<%= f.check_box(:host_ids, {:label => "", :help_inline => "", :multiple => true, :onclick => 'hostChecked(this)', :id => "host_ids_#{host.id}", :class => 'host_select_boxes', }, host.id) %>
|
|||
</td>
|
|||
<td><%= name_column(host) %> </td>
|
|||
bf4a13d3 | Walden Raines | <td class="hidden-xs"><%= (icon(host.os, :size => "18x18") + trunc(" #{host.os.to_label}",14)).html_safe if host.os %></td>
|
|
<td class="hidden-xs"><%= trunc(host.try(:environment), 14) %></td>
|
|||
<td class="hidden-tablet hidden-xs"><%= model_name host %></td>
|
|||
<td class="hidden-tablet hidden-xs"><%= hostgroup_name host.hostgroup, 26 %></td>
|
|||
671b45e9 | Joseph Mitchell Magen | </tr>
|
|
<% end %>
|
|||
</table>
|
|||
1bf7cc35 | Amos Benari | <%= page_entries_info hosts, :more => " - "+_("<b class='select_count'>0</b> selected") %>
|
|
671b45e9 | Joseph Mitchell Magen | <%= will_paginate hosts %>
|
|
85eac622 | Amos Benari | </div>
|
|
</div>
|
|||
671b45e9 | Joseph Mitchell Magen | <%= content_tag(:div, :class => "form-actions") do %>
|
|
bf4a13d3 | Walden Raines | <%= link_to(_("Cancel"), "#{controller_name}_path", :class => "btn btn-default") %>
|
|
bfbf7ed8 | Lukas Zapletal | <%= f.submit(_("Assign to %s") % @taxonomy_type, :class => "btn btn-success") %>
|
|
671b45e9 | Joseph Mitchell Magen | <% end %>
|
|
bfbf7ed8 | Lukas Zapletal | <% end %>
|