serpro_integration_plugin.rb
743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class SerproIntegrationPlugin < Noosfero::Plugin
def self.plugin_name
"Serpro Integration Plugin"
end
def self.plugin_description
_("Make integration with serpro servers.")
end
#FIXME make this test
# User could not have this block
def self.extra_blocks
{ SerproIntegrationPlugin::SonarWidgetBlock => {:type => [Community] },
SerproIntegrationPlugin::SmileBlock => {:type => [Community] },
}
end
#FIXME make this test
def profile_editor_extras
lambda do
render :file => 'profile-editor-extras' if profile.kind_of?(Community)
end
end
def profile_id
context.profile
end
def stylesheet?
true
end
# FIXME make this test
def js_files
['smile_face.js']
end
end