Commit e972fcef1cca7d0bcc8815845e4184aedd094fdf

Authored by Victor Costa
2 parents ecac3a42 babac538

Merge branch 'rails3_AI3033-serpro_integration' into stable

plugins/serpro_integration/lib/serpro_integration_plugin.rb
@@ -18,7 +18,7 @@ class SerproIntegrationPlugin < Noosfero::Plugin @@ -18,7 +18,7 @@ class SerproIntegrationPlugin < Noosfero::Plugin
18 18
19 #FIXME make this test 19 #FIXME make this test
20 def profile_editor_extras 20 def profile_editor_extras
21 - lambda do 21 + proc do
22 render :file => 'profile-editor-extras' if profile.kind_of?(Community) 22 render :file => 'profile-editor-extras' if profile.kind_of?(Community)
23 end 23 end
24 end 24 end
plugins/serpro_integration/lib/serpro_integration_plugin/sonar_widget_block.rb
@@ -72,7 +72,7 @@ class SerproIntegrationPlugin::SonarWidgetBlock < Block @@ -72,7 +72,7 @@ class SerproIntegrationPlugin::SonarWidgetBlock < Block
72 72
73 block = self 73 block = self
74 74
75 - lambda do 75 + proc do
76 render :file => 'sonar_widget_block', :locals => { :block => block } 76 render :file => 'sonar_widget_block', :locals => { :block => block }
77 end 77 end
78 78
plugins/serpro_integration/views/profile_design/sonar_plugin/_sonar_widget_block.html.erb 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +
  2 +<%= labelled_form_field(_('Widget'), select(:block, :widget, SerproIntegrationPlugin::SonarWidgetBlock::AVAILABLE_WIDGETS.map {|id, name| [name, id]} )) %>
  3 +
  4 +
plugins/serpro_integration/views/profile_design/sonar_plugin/_sonar_widget_block.rhtml
@@ -1,4 +0,0 @@ @@ -1,4 +0,0 @@
1 -  
2 -<%= labelled_form_field(_('Widget'), select(:block, :widget, SerproIntegrationPlugin::SonarWidgetBlock::AVAILABLE_WIDGETS.map {|id, name| [name, id]} )) %>  
3 -  
4 -  
plugins/serpro_integration/views/sonar_widget_block.html.erb 0 → 100644
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
  1 +<div class='widget'>
  2 + <% if block.is_widget_well_formed_url? %>
  3 + <iframe width='<%=block.widget_width%>' height='<%=block.widget_height%>' src='<%=block.widget_url%>' frameborder="0" allowfullscreen></iframe>
  4 + <% else %>
  5 + <div class='wrong'>
  6 + <iframe width='<%=block.widget_width%>' height='<%=block.widget_height%>' src='<%=block.widget_url%>' frameborder="0" allowfullscreen></iframe>
  7 + <%= _('Something wrong happened. Please see your sonar configuration.') %>
  8 + </div>
  9 + <% end %>
  10 +</div>
plugins/serpro_integration/views/sonar_widget_block.rhtml
@@ -1,10 +0,0 @@ @@ -1,10 +0,0 @@
1 -<div class='widget'>  
2 - <% if block.is_widget_well_formed_url? %>  
3 - <iframe width='<%=block.widget_width%>' height='<%=block.widget_height%>' src='<%=block.widget_url%>' frameborder="0" allowfullscreen></iframe>  
4 - <% else %>  
5 - <div class='wrong'>  
6 - <iframe width='<%=block.widget_width%>' height='<%=block.widget_height%>' src='<%=block.widget_url%>' frameborder="0" allowfullscreen></iframe>  
7 - <%= _('Something wrong happened. Please see your sonar configuration.') %>  
8 - </div>  
9 - <% end %>  
10 -</div>