Commit 9b469d9b4a018cd65112258c44969d0e8c7e12da

Authored by Junior Silva
Committed by Antonio Terceiro
1 parent ae0014f2

Partially fix send_email plugin to work with Rails 3

Signed-off-by: Junior Silva <juniorsilva1001@gmail.com>
Signed-off-by: Antonio Terceiro <terceiro@colivre.coop.br>
plugins/send_email/controllers/send_email_plugin_admin_controller.rb
1 1 class SendEmailPluginAdminController < PluginsController
2   - append_view_path File.join(File.dirname(__FILE__) + '/../views')
3 2  
4 3 def index
5 4 @environment = environment
... ...
plugins/send_email/lib/send_email_plugin.rb
  1 +require 'send_email_plugin/core_ext'
  2 +
1 3 class SendEmailPlugin < Noosfero::Plugin
2 4  
3 5 def self.plugin_name
... ...
plugins/send_email/lib/send_email_plugin/core_ext.rb 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +Environment.class_eval do
  2 + attr_accessible :send_email_plugin_allow_to
  3 +end
  4 +
... ...
plugins/send_email/views/send_email_plugin_admin/index.html.erb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<h1><%= _("SendEmailPlugin's config") %></h1>
  2 +
  3 +<%= form_for :environment, :url => {:action => 'index'}, :html => {:method => 'post'} do |f| %>
  4 + <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %>
  5 + <small><%= _('(list of email addresses separated by comma)') %></small>
  6 + <% button_bar do %>
  7 + <%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins'} %>
  8 + <% end %>
  9 +<% end %>
... ...
plugins/send_email/views/send_email_plugin_admin/index.rhtml
... ... @@ -1,9 +0,0 @@
1   -<h1><%= _("SendEmailPlugin's config") %></h1>
2   -
3   -<%= form_for :environment, :url => {:action => 'index'}, :html => {:method => 'post'} do |f| %>
4   - <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %>
5   - <small><%= _('(list of email addresses separated by comma)') %></small>
6   - <% button_bar do %>
7   - <%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins'} %>
8   - <% end %>
9   -<% end %>