Project

General

Profile

« Previous | Next » 

Revision 82e47ae0

Added by Amos Benari about 12 years ago

  • ID 82e47ae0f86994702c3a084cc6150250a81034ee

updates UI to bootstrap v2

View differences:

app/views/hosts/_list.html.erb
<%= javascript "jquery.cookie", "host_checkbox" %>
<% title header ||= "" %>
<table class="list zebra-striped fixed-width" >
<table class="table table-bordered table-striped table-condensed" >
<tr>
<th class="ca tbl-column1"><%= check_box_tag "check_all", "", false, { :onclick => "toggleCheck()", :title => "Select All" } %></th>
<th class="tbl-column4"><%= sort :name %></th>
<th class="tbl-column2"><%= sort :os, :as => "Operating<br>System" %></th>
<th class="tbl-column2"><%= sort :environment %></th>
<th class="tbl-column2"><%= sort :model %></th>
<th class="tbl-column3"><%= sort :hostgroup, :as => "Host Group" %></th>
<th class="tbl-column2"><%= sort :last_report %></th>
<th class="ca span0"><%= check_box_tag "check_all", "", false, { :onclick => "toggleCheck()", :title => "Select All" } %></th>
<th class='span3'><%= sort :name %></th>
<th><%= sort :os, :as => "Operating<br>System" %></th>
<th><%= sort :environment %></th>
<th><%= sort :model %></th>
<th><%= sort :hostgroup, :as => "Host Group" %></th>
<th><%= sort :last_report %></th>
<th></th>
</tr>
<% hosts.each do |host| -%>
<tr>
<td class="ca tbl-column1">
<td class="ca span0">
<%= check_box_tag "host_ids[]", nil, false, :id => "host_ids_#{host.id}", :disabled => !authorized?, :class => 'host_select_boxes', :onclick => 'hostChecked(this)' -%>
</td>
<td class="tbl-column4"> <%= name_column(host) %> </td>
<td class="tbl-column2"><%= (icon(host.os, :size => "18x18") + trunc(" #{host.os}",14)).html_safe if host.os %></td>
<td class="tbl-column2"><%= trunc(host.try(:environment), 14) %></td>
<td class="tbl-column2"><%= trunc(host.try(:model), 14) %></td>
<td class="tbl-column3"><%= hostgroup_name host.hostgroup, 26 %></td>
<td class="tbl-column2"><%= last_report_column(host) %></td>
<td class='span3'><%= name_column(host) %> </td>
<td><%= (icon(host.os, :size => "18x18") + trunc(" #{host.os}",14)).html_safe if host.os %></td>
<td><%= trunc(host.try(:environment), 14) %></td>
<td><%= trunc(host.try(:model), 14) %></td>
<td><%= hostgroup_name host.hostgroup, 26 %></td>
<td><%= last_report_column(host) %></td>
<td>
<%= display_link_if_authorized 'Edit', hash_for_edit_host_path(:id => host) %>
<%= display_link_if_authorized 'Clone', hash_for_clone_host_path(:id => host) %>
<%= display_link_if_authorized 'Delete', hash_for_host_path(:id => host, :auth_action => :destroy), :confirm => "Delete #{host.name}?", :method => :delete, :action => :destroy %>
<%= action_buttons(
display_link_if_authorized("Edit Host", hash_for_edit_host_path(:id => host), :class=>"btn btn-small"),
display_link_if_authorized("Clone", hash_for_clone_host_path(:id => host)),
display_delete_if_authorized(hash_for_host_path(:id => host), :confirm => "Delete #{host.name}?", :action => :destroy))%>
</td>
</tr>
<% end -%>
</table>
<div id="confirmation-modal" class="modal hide fade">
<div class="modal-header">
<a href="#" class="close">×</a>
<a href="#" class="close" data-dismiss="modal">×</a>
<h3>Please Confirm</h3>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<a href="#" class="btn primary">Submit</a>
<a href="#" class="btn btn-primary">Submit</a>
<a href="#" class="btn secondary">Cancel</a>
</div>
</div>

Also available in: Unified diff