Modified: trunk/app/controllers/networks_controller.rb (2403 => 2404)
--- trunk/app/controllers/networks_controller.rb 2010-05-12 16:01:10 UTC (rev 2403)
+++ trunk/app/controllers/networks_controller.rb 2010-05-12 16:06:25 UTC (rev 2404)
@@ -239,11 +239,12 @@
def show
@item_sort_options = [
+ ["rank", "Rank"],
["most_recent", "Most recent"],
["title", "Title"],
["uploader", "Uploader"],
["last_updated", "Last updated"],
- ["rating", "Rating"],
+ ["rating", "User rating"],
["license", "License"],
["workflow_type", "Workflow Type"]
]
@@ -252,6 +253,10 @@
case params[:item_sort]
+ when "rank"; @shared_items.sort! do |a, b|
+ a.rank <=> b.rank
+ end
+
when "title"; @shared_items.sort! do |a, b|
a.contributable.label <=> b.contributable.label
end
@@ -269,7 +274,7 @@
end
when "rating"; @shared_items.sort! do |a, b|
- b.contributable.rating <=> a.contributable.rating
+ b.rating <=> a.rating
end
when "license"; @shared_items.sort! do |a, b|