Project

General

Profile

Download (1.47 KB) Statistics
| Branch: | Tag: | Revision:
af6e2624 Ohad Levy
<% title "Puppet classes" %>
cdf02336 Ohad Levy
05ab4c16 Ohad Levy
<% title_actions display_link_if_authorized("New Puppetclass", hash_for_new_puppetclass_path),
display_link_if_authorized("Import new puppet classes and environments", hash_for_import_environments_puppetclasses_path)
%>
cdf02336 Ohad Levy
82e47ae0 Amos Benari
<table class="table table-bordered table-striped">
af6e2624 Ohad Levy
<tr>
ac7fe332 Ohad Levy
<th><%= sort :name %></th>
05ab4c16 Ohad Levy
<th><%= sort :environment, :as => "Environments" %> and documentation</th>
69f8d207 Ohad Levy
<th>Host Group</th>
1070e146 Ohad Levy
<th>Hosts</th>
9afa092e Ohad Levy
<th>Keys</th>
d995ecb4 Paul Kelly
<th></th>
af6e2624 Ohad Levy
</tr>
<% for puppetclass in @puppetclasses %>
4487bd21 Ohad Levy
<tr class="<%= cycle("even", "odd") -%>">
31207a31 Ohad Levy
<td><%=link_to_if_authorized h(puppetclass.name), hash_for_edit_puppetclass_path(:id => puppetclass) %></td>
a67b0923 Paul Kelly
<td>
<% for environment in puppetclass.environments -%>
017e1049 Ohad Levy
<%= link_to_function environment, rdoc_classes_path(environment, puppetclass.name) %>
9fd7478e Paul Kelly
<% end %>
</td>
017e1049 Ohad Levy
<td><%= puppetclass.hostgroups.map {|hg| link_to hg, hostgroup_path(hg)}.to_sentence.html_safe %></td>
dc11280f Ohad Levy
<td> <%= link_to host_counter(puppetclass), hosts_path(:search => "class = #{puppetclass.name}")%></td>
9afa092e Ohad Levy
<td>
<%= link_to puppetclass.lookup_keys.count, puppetclass_lookup_keys_path(puppetclass) %>
</td>
82e47ae0 Amos Benari
<td>
<%= display_delete_if_authorized hash_for_puppetclass_path(:id => puppetclass), :confirm => "Delete #{puppetclass.name}?" %>
d995ecb4 Paul Kelly
</td>
af6e2624 Ohad Levy
</tr>
<% end %>
</table>

4487bd21 Ohad Levy
<%= page_entries_info @puppetclasses %>
af6e2624 Ohad Levy
<%= will_paginate @puppetclasses %>