myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3801] branches/packs/app: removed featured statu


From: noreply
Subject: [myexperiment-hackers] [3801] branches/packs/app: removed featured status from home page
Date: Tue, 19 Nov 2013 16:54:43 +0000 (UTC)

Revision
3801
Author
dgc
Date
2013-11-19 16:54:42 +0000 (Tue, 19 Nov 2013)

Log Message

removed featured status from home page

Modified Paths

Diff

Modified: branches/packs/app/helpers/activities_helper.rb (3800 => 3801)


--- branches/packs/app/helpers/activities_helper.rb	2013-11-19 16:46:06 UTC (rev 3800)
+++ branches/packs/app/helpers/activities_helper.rb	2013-11-19 16:54:42 UTC (rev 3801)
@@ -108,8 +108,14 @@
       conditions = ["((" + context_bits.join(" OR ") + ") AND (" + type_bits.join(" OR ") + "))", *(context_vars + type_vars)]
     end
 
-    order = 'featured DESC, timestamp DESC, priority ASC'
+    order_bits = []
 
+    order_bits << "featured DESC" unless opts[:enable_feature] == false
+    order_bits << "timestamp DESC"
+    order_bits << "priority ASC"
+
+    order = order_bits.join(", ")
+
     activities = Authorization.scoped(Activity,
         :auth_type       => 'activities.auth_type',
         :auth_id         => 'activities.auth_id',

Modified: branches/packs/app/views/home/index.rhtml (3800 => 3801)


--- branches/packs/app/views/home/index.rhtml	2013-11-19 16:46:06 UTC (rev 3800)
+++ branches/packs/app/views/home/index.rhtml	2013-11-19 16:54:42 UTC (rev 3801)
@@ -1,6 +1,6 @@
 <h1>Activity</h1>
 
-<% activities = activities_for_feed(:contexts => logged_in? ? current_user.personal_resources_and_subscriptions : [], :user => current_user) %>
+<% activities = activities_for_feed(:contexts => logged_in? ? current_user.personal_resources_and_subscriptions : [], :user => current_user, :enable_feature => false) %>
 
 <div id="activities">
   <%= render(:partial => "activities/list", :locals => { :activities => activities, :user => current_user, :enable_feature => false } ) -%>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]