Project

General

Profile

« Previous | Next » 

Revision 6895854c

Added by Stephen Benjamin about 10 years ago

fixes #4256 - makes columns sortable in the UI

View differences:

app/views/environments/index.html.erb
<table class="table table-bordered table-striped table-two-pane">
<tr>
<th><%= sort :name, :as => s_('Environment|Name') %></th>
<th><%= _('Hosts') %></th>
<th><%= sort :hosts_count, :as => _('Hosts') %></th>
<th></th>
</tr>
......
<td>
<%= link_to_if_authorized environment.name, hash_for_edit_environment_path(:id => environment.name).merge(:auth_object => environment, :authorizer => authorizer) %>
</td>
<td><%= link_to @host_counter[environment.id] || 0, hosts_path(:search => "environment = #{environment}") %>
<td><%= link_to environment.hosts_count, hosts_path(:search => "environment = #{environment}") %>
<td>
<%= action_buttons(link_to(_('Classes'), puppetclasses_path(:search => "environment = #{environment}")),
import_proxy_links(hash_for_import_environments_environments_path(:env => environment.name)),

Also available in: Unified diff