Commit 9c9ff7977a494899befce354a25e126068da7c75

Authored by Caio Almeida
1 parent fa30ade2

Ticket #76: Setting block expiration, fixing crash and adding a disclaimer about privacy

plugins/recent_activities/lib/recent_activities_plugin.rb
1 1 class RecentActivitiesPlugin < Noosfero::Plugin
2 2 def self.plugin_name
3   - "RecentActivitiesPlugin"
  3 + 'RecentActivitiesPlugin'
4 4 end
5 5  
6 6 def self.plugin_description
7   - _("Adds a block that lists recent profile activity.")
  7 + _('Adds a block that lists recent profile activity.')
8 8 end
9 9  
10 10 def self.extra_blocks
... ... @@ -21,3 +21,5 @@ class RecentActivitiesPlugin &lt; Noosfero::Plugin
21 21 true
22 22 end
23 23 end
  24 +
  25 +ApplicationHelper.include ActionTrackerHelper
... ...
plugins/recent_activities/lib/recent_activities_plugin/activities_block.rb
... ... @@ -20,7 +20,7 @@ class RecentActivitiesPlugin::ActivitiesBlock &lt; Block
20 20 end
21 21  
22 22 def help
23   - _('This block lists your latest activities.')
  23 + _('This block lists your latest activities. By default, any user that goes to your profile will be able to see all activities. Configure the "Display to users" option if you don\'t want that.')
24 24 end
25 25  
26 26 def default_title
... ... @@ -34,4 +34,12 @@ class RecentActivitiesPlugin::ActivitiesBlock &lt; Block
34 34 def display_api_content_by_default?
35 35 false
36 36 end
  37 +
  38 + def timeout
  39 + 4.hours
  40 + end
  41 +
  42 + def self.expire_on
  43 + { profile: [:article] }
  44 + end
37 45 end
... ...