|
<% title "Environments" %>
|
|
|
|
<% title_actions import_proxy_select(hash_for_import_environments_environments_path), button_group(display_link_if_authorized("New Environment", hash_for_new_environment_path)) %>
|
|
|
|
<table class="table table-bordered table-striped">
|
|
<tr>
|
|
<th><%= sort :name %></th>
|
|
<th>Hosts</th>
|
|
<th></th>
|
|
</tr>
|
|
|
|
<% for environment in @environments %>
|
|
<tr>
|
|
<td>
|
|
<%= link_to_if_authorized h(environment.name), hash_for_edit_environment_path(:id=> environment.name) %>
|
|
</td>
|
|
<td><%= link_to @counter[environment.id] || 0, hosts_path(:search => "environment = #{environment}") %>
|
|
<td>
|
|
<%= action_buttons(link_to("Classes", puppetclasses_path(:search => "environment = #{environment}"), :class=>'btn btn-small'),
|
|
display_delete_if_authorized(hash_for_environment_path(:id => environment.name), :confirm => "Delete #{environment.name}?")) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<%= page_entries_info @environments %>
|
|
<%= will_paginate @environmentsS %>
|