Project

General

Profile

Download (2.05 KB) Statistics
| Branch: | Tag: | Revision:
<%= 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| %>
<%= base_errors_for taxonomy %>
<%= wizard_header 3, "Create "+taxonomy.class.name,"Select Hosts", "Assign Selected Hosts" %>
<div class="row">
<div class="span11">
<table class="table table-bordered table-striped table-condensed" >
<tr>
<th class="ca"><%= check_box_tag "check_all", "", false, { :onclick => "toggleCheck()", :title => "Select All" } %></th>
<th class=''><%= sort :name %></th>
<th class="hidden-phone"><%= sort :os, :as => "Operating<br>System" %></th>
<th class="hidden-phone"><%= sort :environment %></th>
<th class="hidden-tablet hidden-phone"><%= sort :model %></th>
<th class="hidden-tablet hidden-phone"><%= sort :hostgroup, :as => "Host Group" %></th>
</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>
<td class="hidden-phone"><%= (icon(host.os, :size => "18x18") + trunc(" #{host.os}",14)).html_safe if host.os %></td>
<td class="hidden-phone"><%= trunc(host.try(:environment), 14) %></td>
<td class="hidden-tablet hidden-phone"><%= model_name host %></td>
<td class="hidden-tablet hidden-phone"><%= hostgroup_name host.hostgroup, 26 %></td>
</tr>
<% end %>
</table>

<%= page_entries_info hosts, :more => " - <strong><span class='select_count'>0</span></strong> Selected" %>
<%= will_paginate hosts %>
</div>
</div>
<%= content_tag(:div, :class => "form-actions") do %>
<%= link_to("Cancel", "#{controller_name}_path", :class => "btn") %>
<%= f.submit("Assign to #{@taxonomy_type}", :class => "btn btn-success") %>
<% end %>

<% end %>
(1-1/34)