Hi,
This patch just add simple way to add 'sortable' thead to view.
You need to manually define what fields will be in <thread>
and which of them will be sortable.
Usage:
pools_controller.rb:
def index
....
@header = [
{ :name => "Pool name", :sort_attr => :name },
{ :name => "Quota used", :sortable => false },
{ :name => "Quota (Instances)", :sort_attr => "quotas.total_instances"},
{ :name => "Zone", :sort_attr => "zones.name" }
]
....
end
index.haml:
=sortable_table_header @header
-- Michal
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel