Commit f399a7146059ad30c417f79ed16c3b51e4f3f623

Authored by Evandro Magalhaes Leite Junior - SUPDE/DEPAE/DE009
1 parent 042b68b9

right white spaces removed

app/views/content_viewer/_article_toolbar.rhtml
... ... @@ -37,7 +37,7 @@
37 37 <%= colorbox_button(:new, label_for_new_article(@page), profile.admin_url.merge(:controller => 'cms', :action => 'new', :parent_id => (@page.folder? ? @page : (@page.parent.nil? ? nil : @page.parent)))) unless remove_content_button(:new) %>
38 38 <% end %>
39 39  
40   - <%
  40 + <%
41 41 @plugins.dispatch(:article_toolbar_extra_buttons).each do |plugin_button| %>
42 42 <%= instance_eval(&plugin_button) %>
43 43 <% end %>
... ...
lib/noosfero/plugin.rb
... ... @@ -285,7 +285,7 @@ class Noosfero::Plugin
285 285 nil
286 286 end
287 287  
288   -
  288 +
289 289 # -> Adds buttons to manage members page
290 290 # returns = { :title => title, :icon => icon, :url => url }
291 291 # title = name that will be displayed.
... ... @@ -293,9 +293,9 @@ class Noosfero::Plugin
293 293 # url = url or route to which the button will redirect.
294 294 def article_toolbar_extra_buttons
295 295 nil
296   - end
297   -
298   -
  296 + end
  297 +
  298 +
299 299 # This method will be called just before a comment is saved to the database.
300 300 #
301 301 # It can modify the comment in several ways. In special, a plugin can call
... ... @@ -582,6 +582,6 @@ class Noosfero::Plugin
582 582 #content_expire too.
583 583 %w[edit delete spread locale suggest home new upload]
584 584 end
585   -
  585 +
586 586  
587 587 end
... ...
plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb
... ... @@ -4,19 +4,19 @@ class EmailArticlePluginMyprofileController &lt; MyProfileController
4 4 # before_filter :check_access_to_profile, :except => [:join, :join_not_logged, :index, :add]
5 5 # before_filter :store_location, :only => [:join, :join_not_logged, :report_abuse, :send_mail]
6 6 # before_filter :login_required, :only => [:add, :join, :join_not_logged, :leave, :unblock, :leave_scrap, :remove_scrap, :remove_activity, :view_more_activities, :view_more_network_activities, :report_abuse, :register_report, :leave_comment_on_activity, :send_mail]
7   -
  7 +
8 8 def send_email
9 9 article = Article.find(params[:id])
10 10 EmailArticlePluginMyprofileController::Sender.deliver_mail(article)
11 11 render :text=>'ok'
12 12 end
13   -
  13 +
14 14 class Sender < ActionMailer::Base
15 15 def mail(article)
16 16 members = article.profile.members
17 17 emails = []
18 18 members.each{ |m|
19   - emails.push(m.user.email)
  19 + emails.push(m.user.email)
20 20 }
21 21 content_type 'text/html'
22 22 recipients emails
... ... @@ -25,6 +25,5 @@ class EmailArticlePluginMyprofileController &lt; MyProfileController
25 25 subject "[Artigo] " + article.title
26 26 body article.body
27 27 end
28   - end
29   -end
30   -
  28 + end
  29 +end
31 30 \ No newline at end of file
... ...
plugins/email_article/lib/email_article_plugin.rb
... ... @@ -12,9 +12,9 @@ class EmailArticlePlugin &lt; Noosfero::Plugin
12 12 label = _("Send article to members")
13 13 htmlclass = _("button with-text icon-menu-mail")
14 14 title = _("Email article to all community members")
15   - lambda {
  15 + lambda {
16 16 link_to_remote(
17   - label,
  17 + label,
18 18 {
19 19 :url => { :controller => 'email_article_plugin_myprofile', :action => "send_email", :id => @page},
20 20 :method => :get,
... ... @@ -22,12 +22,12 @@ class EmailArticlePlugin &lt; Noosfero::Plugin
22 22 :failure => "alert('Erro ao enviar email')",
23 23 :confirm => _("Are you sure you want to email this article to the all community members?"),
24 24 },
25   - :class => htmlclass,
  25 + :class => htmlclass,
26 26 :title => title
27 27 )
28 28 }
29 29 end
30   -
  30 +
31 31 def stylesheet?
32 32 true
33 33 end
... ...
plugins/email_article/test/unit/email_article_plugin_test.rb
... ... @@ -17,5 +17,5 @@ class EmailArticlePluginTest &lt; ActiveSupport::TestCase
17 17 should 'have description' do
18 18 assert_equal _("A plugin that lists the most accessed, most commented, most liked and most disliked contents."), EmailArticlePlugin.plugin_description
19 19 end
20   -
  20 +
21 21 end
... ...