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/domains/index.html.erb
<table class="table table-bordered table-striped table-two-pane">
<tr>
<th><%= sort :name, :as => s_("Domain|Fullname") %></th>
<th><%= _("Hosts") %></th>
<th><%= sort :hosts_count, :as => _("Hosts") %></th>
<th></th>
</tr>
<% for domain in @domains %>
<tr>
<td><%= link_to_if_authorized h(domain.fullname.empty? ? domain.name : domain.fullname), hash_for_edit_domain_path(:id => domain).merge(:auth_object => domain, :authorizer => authorizer) %></td>
<td><%= link_to @host_counter[domain.id] || 0, hosts_path(:search => "domain = #{domain}") %>
<td><%= link_to domain.hosts_count, hosts_path(:search => "domain = #{domain}") %>
<td><%= display_delete_if_authorized hash_for_domain_path(:id => domain).merge(:auth_object => domain, :authorizer => authorizer), :confirm => _("Delete %s?") % domain.name %></td>
</tr>
<% end %>

Also available in: Unified diff