From c02800fabd608114afd47f90a1e8d70abf329a33 Mon Sep 17 00:00:00 2001 From: Evandro Junior Date: Mon, 12 May 2014 16:24:24 +0000 Subject: [PATCH] needs revision, but working --- plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb | 41 +++-------------------------------------- plugins/email_article/lib/email_article_plugin.rb | 26 +++++++++++++++++--------- plugins/email_article/public/boletim_desformatado.html | 720 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/email_article/public/novo_boletim.html | 698 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ plugins/email_article/public/novo_boletin.html | 711 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5 files changed, 1438 insertions(+), 758 deletions(-) create mode 100644 plugins/email_article/public/boletim_desformatado.html create mode 100644 plugins/email_article/public/novo_boletim.html delete mode 100644 plugins/email_article/public/novo_boletin.html diff --git a/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb b/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb index fd4233f..583c2a3 100644 --- a/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb +++ b/plugins/email_article/controllers/email_article_plugin_myprofile_controller.rb @@ -24,9 +24,9 @@ class EmailArticlePluginMyprofileController < MyProfileController members.each{ |m| emails.push(m.user.email) } - puts "***************************" - y emails - puts "***************************" +# puts "***************************" +# y emails +# puts "***************************" content_type 'text/html' recipients emails from "#{article.author.user.name} <#{article.author.user.email}>" @@ -41,40 +41,5 @@ class EmailArticlePluginMyprofileController < MyProfileController body article.body end end - - - -# def deliver -# #return false unless self.valid? -# EmailArticlePluginMyprofileController::Sender.deliver_mail(self) -# end -# -# class Sender < ActionMailer::Base -# def mail(contact) -# content_type 'text/html' -# emails = contact.dest.notification_emails -# recipients emails -# from "#{contact.name} <#{contact.dest.environment.noreply_email}>" -# reply_to contact.email -# if contact.sender -# headers 'X-Noosfero-Sender' => contact.sender.identifier -# end -# if contact.receive_a_copy -# cc "#{contact.name} <#{contact.email}>" -# end -# subject "[#{contact.dest.short_name(30)}] " + contact.subject -# body :name => contact.name, -# :email => contact.email, -# :city => contact.city, -# :state => contact.state, -# :message => contact.message, -# :environment => contact.dest.environment.name, -# :url => url_for(:host => contact.dest.environment.default_hostname, :controller => 'home'), -# :target => contact.dest.name -# end -# end - - end -#append_view_path File.join(File.dirname(__FILE__) + '/../views') \ No newline at end of file diff --git a/plugins/email_article/lib/email_article_plugin.rb b/plugins/email_article/lib/email_article_plugin.rb index 5039b3e..c60aaab 100644 --- a/plugins/email_article/lib/email_article_plugin.rb +++ b/plugins/email_article/lib/email_article_plugin.rb @@ -9,15 +9,23 @@ class EmailArticlePlugin < Noosfero::Plugin end def article_toolbar_extra_buttons - lambda { - link_to_remote(_("Email article to members"), - {:url => { :controller => 'email_article_plugin_myprofile', :action => "send_email", :id => @page}, - :method => :get, - :success => "alert('Emails enviados')", - :failure => "alert('Erro ao enviar email')" -# , :loading => "Enviando emails" - }) - } + label = _("Send article to members") + htmlclass = _("button with-text icon-menu-mail") + title = _("Email article to all community members") + lambda { + link_to_remote( + label, + { + :url => { :controller => 'email_article_plugin_myprofile', :action => "send_email", :id => @page}, + :method => :get, + :success => "alert('Emails enviados')", + :failure => "alert('Erro ao enviar email')", + :confirm => _("Are you sure you want to email this article to the all community members?"), + }, + :class => htmlclass, + :title => title + ) + } end def stylesheet? diff --git a/plugins/email_article/public/boletim_desformatado.html b/plugins/email_article/public/boletim_desformatado.html new file mode 100644 index 0000000..bda4153 --- /dev/null +++ b/plugins/email_article/public/boletim_desformatado.html @@ -0,0 +1,720 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+
Boletim Informativo DESDR
+
Boletim
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
 
+

 

+
De Pessoas
Linha
Aniversariantes
ANIVERSARIANTES DO MÊS DE MAIO +
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Dia

+
+

Nome

+
+

Setor

+
+

02

+
+

DANIEL ARAUJO DE MELO

+
+

DE501

+
+

02

+
+

EDUARDO MACIEL FRAGA MAIA FILHO

+
+

DE501

+
+

02

+
+

GILMARA FURTADO BEZERRA

+
+

DE510

+
+

02

+
+

MARCIO MELO ARAUJO

+
+

DE512

+
+

03

+
+

ANTONIO CLAUDIO PEDREIRA NEIVA

+
+

DE507

+
+

05

+
+

EDUARDO TOURINHO EDINGTON

+
+

DE5CT

+
+

05

+
+

LUIS GUSTAVO PERALTA MASCOTTO

+
+

DE502

+
+

09

+
+

ALEXSANDRO DE O. NASCIMENTO

+
+

DE501

+
+

11

+
+

ANDRE FREITAS LOPES

+
+

DE502

+
+

13

+
+

SUSANA DA COSTA FERREIRA

+
+

DE510

+
+

15

+
+

ALESSANDRA VINHAS DE ALMEIDA

+
+

DE512

+
+

15

+
+

ANDREA JESUS DOS SANTOS

+
+

DE507

+
+

15

+
+

ANTONIO COELHO ROSA

+
+

DE511

+
+

15

+
+

MOZART DE RHAMNUZIA JUNIOR

+
+

DE5ED

+
+

16

+
+

FABIO RIBEIRO SILVESTRE

+
+

DE5ED

+
+

16

+
+

TELMA ESTRELA DE SOUZA

+
+

DE510

+
+

19

+
+

RANULFO JOSE DA CUNHA NETTO

+
+

DE5CT

+
+

22

+
+

CARLILE NEVES SOARES

+
+

DE512

+
+

23

+
+

ANDRE LUIZ TEIXEIRA BRITTO

+
+

DE508

+
+

25

+
+

HILTON BARBOSA COELHO NETO

+
+

DE506

+
+

25

+
+

JORDAN DOS PRAZERES SERVA

+
+

DE506

+
+

25

+
+

RAIMUNDO RAUL DE BRITO SANTOS

+
+

DE511

+
+

26

+
+

IGOR NUNES VALADARES

+
+

DE511

+
+

30

+
+

GUSTAVO BALDOINO SANTOS MENEZES

+
+

DE510

+
+
+
+
+

 

+ +

 

+
+
FÉRIAS DO MÊS DE MAIO
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Nome do Empregado

+
+

Início

+
+

Término

+
Duração
+

Liliane Teixeira Santos

+
+

02/05/2014

+
+

31/05/2014

+
+

30 dias

+
+

Ivan Bernades Dias

+
+

04/05/2014

+
+

23/05/2014

+
+

20 dias

+
+

Maria de Lourdes

+
+

04/05/2014

+
+

23/05/2014

+
+

20 dias

+
+

Anhamona Vilas Boas Nunes

+
+

05/05/2014

+
+

15/05/2014

+
+

11 dias

+
+

Abner Silva de Oliveira

+
+

05/05/2014

+
+

24/05/2014

+
+

20 dias

+
+

Andrea Jesus dos Santos

+
+

05/05/2014

+
+

24/05/2014

+
+

20 dias

+
+

Claudia Tedesco de Oliveira

+
+

05/05/2014

+
+

15/05/2014

+
+

11 dias

+
+

Fabio Ribeiro Silvestre

+
+

05/05/2014

+
+

14/05/2014

+
+

10 dias

+
+

Flavio de Matos Santos

+
+

05/05/2014

+
+

14/05/2014

+
+

10 dias

+
+

Solange Maria Pires Sad

+
+

05/05/2014

+
+

14/05/2014

+
+

10 dias

+
+

Luiz Felipe Sampaio Castelo Branco Moreira

+
+

05/05/2014

+
+

15/05/2014

+
+

11 dias

+
+

Rodrigo Costa Colavolpe

+
+

05/05/2014

+
+

14/05/2014

+
+

10 dias

+
+

Celson Nonato Cruz de Aquino

+
+

12/05/2014

+
+

21/05/2014

+
+

10 dias

+
+

Hilton Barbosa Coelho Neto

+
+

12/05/2014

+
+

21/05/2014

+
+

10 dias

+
+

Johann Stangl

+
+

12/05/2014

+
+

26/05/2014

+
+

15 dias

+
+

Rogerio Nobre dos Santos

+
+

12/05/2014

+
+

21/05/2014

+
+

10 dias

+
+

Gustavo Baldoino Santos Menezes

+
+

19/05/2014

+
+

28/05/2014

+
+

10 dias

+
+

Maria Helena Leal Brandão

+
+

19/05/2014

+
+

28/05/2014

+
+

10 dias

+
+

Pedro Rodrigues Gomes

+
+

19/05/2014

+
+

28/05/2014

+
+

10 dias

+
+

Ranulfo Jose da Cunha Netto

+
+

19/05/2014

+
+

30/05/2014

+
+

12 dias

+
+

Carolina de Andrade Souza Dourado

+
+

20/05/2014

+
+

06/06/2014

+
+

18 dias

+
+

Luis Henrique Pinheiro Santos

+
+

26/05/2014

+
+

04/06/2014

+
+

10 dias

+
+
\ No newline at end of file diff --git a/plugins/email_article/public/novo_boletim.html b/plugins/email_article/public/novo_boletim.html new file mode 100644 index 0000000..29024b7 --- /dev/null +++ b/plugins/email_article/public/novo_boletim.html @@ -0,0 +1,698 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ diff --git a/plugins/email_article/public/novo_boletin.html b/plugins/email_article/public/novo_boletin.html deleted file mode 100644 index 8a7a02f..0000000 --- a/plugins/email_article/public/novo_boletin.html +++ /dev/null @@ -1,711 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -- libgit2 0.21.2