Commit b7823262daf1ff757ced68f122dcb72764a8c8a5

Authored by Rodrigo Souto
2 parents 6ccbcfa6 176bce4b

Merge branch 'master' into stoa

Conflicts:
	app/controllers/my_profile/cms_controller.rb
	db/schema.rb
Showing 402 changed files with 8248 additions and 14676 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 402 files displayed.

.ackrc 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +--ignore-dir=log
  2 +--ignore-dir=tmp
  3 +--ignore-dir=pkg
... ...
... ... @@ -1,250 +0,0 @@
1   -If you are not listed here, but should be, please write to the noosfero mailing
2   -list: http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
3   -(this list requires subscription to post, but since you are an author of
4   -noosfero, that's not a problem).
5   -
6   -Developers
7   -==========
8   -
9   -Ábner Silva de Oliveira <abner.oliveira@serpro.gov.br>
10   -Alan Freihof Tygel <alantygel@gmail.com>
11   -alcampelo <alcampelo@alcampelo.(none)>
12   -Alessandro Palmeira <alessandro.palmeira@gmail.com>
13   -Alessandro Palmeira + Caio C. Salgado <alessandro.palmeira@gmail.com>
14   -Alessandro Palmeira + Caio Salgado <alessandro.palmeira@gmail.com>
15   -Alessandro Palmeira + Caio Salgado <caio.csalgado@gmail.com>
16   -Alessandro Palmeira + Caio Salgado + Diego Araújo + João M. M. da Silva <diegoamc90@gmail.com>
17   -Alessandro Palmeira + Carlos Morais <alessandro.palmeira@gmail.com>
18   -Alessandro Palmeira + Daniel Alves <alessandro.palmeira@gmail.com>
19   -Alessandro Palmeira + Daniel Alves + Diego Araújo <diegoamc90@gmail.com>
20   -Alessandro Palmeira + Daniel Alves + Diego Araújo + Guilherme Rojas <danpaulalves@gmail.com>
21   -Alessandro Palmeira + Diego Araujo <alessandro.palmeira@gmail.com>
22   -Alessandro Palmeira + Diego Araújo <alessandro.palmeira@gmail.com>
23   -Alessandro Palmeira + Diego Araujo + Daniela Feitosa <alessandro.palmeira@gmail.com>
24   -Alessandro Palmeira + Diego Araujo <diegoamc90@gmail.com>
25   -Alessandro Palmeira + Diego Araújo <diegoamc90@gmail.com>
26   -Alessandro Palmeira + Diego Araujo + Eduardo Morais <alessandro.palmeira@gmail.com>
27   -Alessandro Palmeira + Diego Araújo + João M. M. da Silva <alessandro.palmeira@gmail.com>
28   -Alessandro Palmeira + Diego Araújo + João M. M. da Silva <diegoamc90@gmail.com>
29   -Alessandro Palmeira + Diego Araujo + João M. M. da Silva + Paulo Meirelles <alessandro.palmeira@gmail.com>
30   -Alessandro Palmeira + Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
31   -Alessandro Palmeira + Diego Araújo + Pedro Leal + João M. M. da Silva <diegoamc90@gmail.com>
32   -Alessandro Palmeira + Diego Araujo + Rafael Manzo <alessandro.palmeira@gmail.com>
33   -Alessandro Palmeira + Eduardo Morais <alessandro.palmeira@gmail.com>
34   -Alessandro Palmeira + Guilherme Rojas <alessandro.palmeira@gmail.com>
35   -Alessandro Palmeira + Jefferson Fernandes <alessandro.palmeira@gmail.com>
36   -Alessandro Palmeira + João M. M. da Silva <alessandro.palmeira@gmail.com>
37   -Alessandro Palmeira + Joao M. M. da Silva + Diego Araujo <alessandro.palmeira@gmail.com>
38   -Alessandro Palmeira + João M. M. da Silva + Renan Teruo <alessandro.palmeira@gmail.com>
39   -Alessandro Palmeira + João M. M. Silva <alessandro.palmeira@gmail.com>
40   -Alessandro Palmeira + Paulo Meirelles <alessandro.palmeira@gmail.com>
41   -Alessandro Palmeira + Paulo Meirelles + João M. M. da Silva <alessandro.palmeira@gmail.com>
42   -Alessandro Palmeira + Rafael Manzo <alessandro.palmeira@gmail.com>
43   -Ana Losnak <analosnak@gmail.com>
44   -Antonio Terceiro + Carlos Morais <terceiro@colivre.coop.br>
45   -Antonio Terceiro + Paulo Meirelles <terceiro@colivre.coop.br>
46   -Antonio Terceiro <terceiro@colivre.coop.br>
47   -Arthur Del Esposte <arthurmde@gmail.com>
48   -Arthur Del Esposte <arthurmde@yahoo.com.br>
49   -Aurelio A. Heckert <aurelio@colivre.coop.br>
50   -Braulio Bhavamitra <brauliobo@gmail.com>
51   -Bráulio Bhavamitra <brauliobo@gmail.com>
52   -Braulio Bhavamitra <braulio@eita.org.br>
53   -Caio <caio.csalgado@gmail.com>
54   -Caio + Diego + Pedro + João <caio.csalgado@gmail.com>
55   -Caio Formiga <caio.formiga@gmail.com>
56   -Caio, Pedro <caio.csalgado@gmail.com>
57   -Caio Salgado + Alessandro Palmeira <caio.csalgado@gmail.com>
58   -Caio Salgado <caio.csalgado@gmail.com>
59   -Caio Salgado + Carlos Morais + Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
60   -Caio Salgado + Diego Araujo <caio.csalgado@gmail.com>
61   -Caio Salgado + Diego Araújo <caio.csalgado@gmail.com>
62   -Caio Salgado + Diego Araújo <diegoamc90@gmail.com>
63   -Caio Salgado + Diego Araújo + Jefferson Fernandes <caio.csalgado@gmail.com>
64   -Caio Salgado + Diego Araújo + João M. M. da Silva <caio.csalgado@gmail.com>
65   -Caio Salgado + Diego Araújo + Pedro Leal <caio.csalgado@gmail.com>
66   -Caio Salgado + Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
67   -Caio Salgado + Diego Araújo + Rafael Manzo <diegoamc90@gmail.com>
68   -Caio Salgado + Jefferson Fernandes <caio.csalgado@gmail.com>
69   -Caio Salgado + Jefferson Fernandes <jeffs.fernandes@gmail.com>
70   -Caio Salgado + Rafael Manzo <caio.csalgado@gmail.com>
71   -Caio Salgado + Renan Teruo <caio.csalgado@gmail.com>
72   -Caio Salgado + Renan Teruo <caio.salgado@gmail.com>
73   -Caio Salgado + Renan Teruo + Jefferson Fernandes <jeffs.fernandes@gmail.com>
74   -Caio Salgado + Renan Teruo <renanteruoc@gmail.com>
75   -Caio SBA <caio@colivre.coop.br>
76   -Caio Tiago Oliveira <caiotiago@colivre.coop.br>
77   -Carlos Andre de Souza <carlos.andre.souza@msn.com>
78   -Carlos Morais <carlos88morais@gmail.com>
79   -Carlos Morais + Diego Araújo <diegoamc90@gmail.com>
80   -Carlos Morais + Eduardo Morais <carlos88morais@gmail.com>
81   -Carlos Morais + Paulo Meirelles <carlos88morais@gmail.com>
82   -Carlos Morais + Pedro Leal <carlos88morais@gmail.com>
83   -Daniela Feitosa <dani@dohko.(none)>
84   -Daniel Alves + Diego Araújo <danpaulalves@gmail.com>
85   -Daniel Alves + Diego Araújo <diegoamc90@gmail.com>
86   -Daniel Alves + Diego Araújo + Guilherme Rojas <danpaulalves@gmail.com>
87   -Daniel Alves + Diego Araújo + Guilherme Rojas <diegoamc90@gmail.com>
88   -Daniel Alves + Diego Araújo + Guilherme Rojas <guilhermehrojas@gmail.com>
89   -Daniel Alves + Guilherme Rojas <danpaulalves@gmail.com>
90   -Daniel Alves + Rafael Manzo <rr.manzo@gmail.com>
91   -Daniela Soares Feitosa <danielafeitosa@colivre.coop.br>
92   -Daniel Bucher <daniel.bucher88@gmail.com>
93   -Daniel Cunha <daniel@colivre.coop.br>
94   -David Carlos <ddavidcarlos1392@gmail.com>
95   -diegoamc <diegoamc90@gmail.com>
96   -Diego Araújo + Alessandro Palmeira <diegoamc90@gmail.com>
97   -Diego Araújo + Alessandro Palmeira + João M. M. da Silva <diegoamc90@gmail.com>
98   -Diego Araújo + Alessandro Palmeira + Rafael Manzo <rr.manzo@gmail.com>
99   -Diego Araujo + Caio Salgado <diegoamc90@gmail.com>
100   -Diego Araújo + Daniel Alves + Rafael Manzo <rr.manzo@gmail.com>
101   -Diego Araújo <diegoamc90@gmail.com>
102   -Diego Araújo + Eduardo Morais + Paulo Meirelles <diegoamc90@gmail.com>
103   -Diego Araújo + Guilherme Rojas <diegoamc90@gmail.com>
104   -Diego Araújo + Jefferson Fernandes <diegoamc90@gmail.com>
105   -Diego Araujo + Jefferson Fernandes <jeffs.fernandes@gmail.com>
106   -Diego Araújo + João Machini <diegoamc90@gmail.com>
107   -Diego Araújo + João Machini <digoamc90@gmail.com>
108   -Diego Araújo + João M. M. da Silva + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
109   -Diego Araújo + João M. M. da Silva <diegoamc90@gmail.com>
110   -Diego Araújo + João M. M. da Silva + João Machini <diegoamc90@gmail.com>
111   -Diego Araújo + João M. M. da Silva + Pedro Leal <diegoamc90@gmail.com>
112   -Diego Araújo + Paulo Meirelles <diegoamc90@gmail.com>
113   -Diego Araújo + Pedro Leal <diegoamc90@gmail.com>
114   -Diego Araujo + Rafael Manzo <diegoamc90@gmail.com>
115   -Diego Araújo + Rafael Manzo <diegoamc90@gmail.com>
116   -Diego Araújo + Renan Teruo + Alessandro Palmeira <diegoamc90@gmail.com>
117   -Diego Araújo + Renan Teruo <diegoamc90@gmail.com>
118   -Diego Araujo + Rodrigo Souto + Rafael Manzo <rr.manzo@gmail.com>
119   -Diego + Jefferson <diegoamc90@gmail.com>
120   -Diego Martinez <diegoamc90@gmail.com>
121   -Diego Martinez <diego@diego-K55A.(none)>
122   -Diego + Renan <renanteruoc@gmail.com>
123   -Eduardo Tourinho Edington <eduardo.edington@serpro.gov.br>
124   -Evandro Jr <evandrojr@gmail.com>
125   -Evandro Junior <evandrojr@gmail.com>
126   -Fabio Teixeira <fabio1079@gmail.com>
127   -Fernanda Lopes <nanda.listas+psl@gmail.com>
128   -Francisco Marcelo A. Lima Júnior <francisco.lima-junior@serpro.gov.br>
129   -Francisco Marcelo de Araujo Lima Junior <79350259591@serpro-1457614.(none)>
130   -Francisco Marcelo de Araújo Lima Júnior <francisco.lima-junior@serpro.gov.br>
131   -Francisco Marcelo de Araújo Lima Júnior <maljunior@gmail.com>
132   -Gabriela Navarro <navarro1703@gmail.com>
133   -Grazieno Pellegrino <grazieno@gmail.com>
134   -Gust <darksshades@hotmail.com>
135   -Hugo Melo <hugo@riseup.net>
136   -Isaac Canan <isaac@intelletto.com.br>
137   -Italo Valcy <italo@dcc.ufba.br>
138   -Jefferson Fernandes + Diego Araujo + Rafael Manzo <jeffs.fernandes@gmail.com>
139   -Jefferson Fernandes + Joao M. M. da Silva <jeffs.fernandes@gmail.com>
140   -Jefferson Fernandes + Joao M. M. Silva <jeffs.fernandes@gmail.com>
141   -João da Silva + Eduardo Morais + Rafael Manzo <rr.manzo@gmail.com>
142   -João da Silva <jaodsilv@linux.ime.usp.br>
143   -João Marco Maciel da Silva + Rafael Manzo + Renan Teruo <jaodsilv@linux.ime.usp.br>
144   -João M. M. da Silva + Alessandro Palmeira + Diego Araújo + Caio Salgado <jaodsilv@linux.ime.usp.br>
145   -João M. M. da Silva + Alessandro Palmeira + Diego Araújo <jaodsilv@linux.ime.usp.br>
146   -Joao M. M. da Silva + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
147   -João M. M. da Silva + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
148   -João M. M. da Silva + Alessandro Palmeira + João Machini <jaodsilv@linux.ime.usp.br>
149   -João M. M. da Silva + Caio Salgado + Alessandro Palmeira <jaodsilv@linux.ime.usp.br>
150   -João M. M. da Silva + Caio Salgado <jaodsilv@linux.ime.usp.br>
151   -João M. M. da Silva + Carlos Morais <jaodsilv@linux.ime.usp.br>
152   -João M. M. da Silva + Diego Araújo <diegoamc90@gmail.com>
153   -João M. M. da Silva + Diego Araújo <jaodsilv@linux.ime.usp.br>
154   -João M. M. da Silva + Diego Araújo + Pedro Leal <jaodsilv@linux.ime.usp.br>
155   -João M. M. da Silva <jaodsilv@linux.ime.usp.br>
156   -Joao M. M. da Silva + Jefferson Fernandes <jaodsilv@linux.ime.usp.br>
157   -João M. M. da Silva + Jefferson Fernandes <jaodsilv@linux.ime.usp.br>
158   -João M. M. da Silva + João M. Miranda <jaodsilv@linux.ime.usp.br>
159   -João M. M. da Silva + Paulo Meirelles <jaodsilv@linux.ime.usp.br>
160   -João M. M. da Silva + Pedro Leal <jaodsilv@linux.ime.usp.br>
161   -João M. M. da Silva + Rafael Manzo + Diego Araújo <jaodsilv@linux.ime.usp.br>
162   -João M. M. da Silva + Rafael Manzo <jaodsilv@linux.ime.usp.br>
163   -João M. M. da Silva + Renan Teruo <jaodsilv@linux.ime.usp.br>
164   -João M. M. Silva + Caio Salgado <jaodsilv@linux.ime.usp.br>
165   -João M. M. Silva + Diego Araújo <jaodsilv@linux.ime.usp.br>
166   -Joao M. M. Silva + Jefferson Fernandes <jaodsilv@linux.ime.usp.br>
167   -João M. M. Silva + Paulo Meirelles <jaodsilv@linux.ime.usp.br>
168   -João M. M. Silva + Rafael Manzo <jaodsilv@linux.ime.usp.br>
169   -João M. M. Silva + Renan Teruo <jaodsilv@linux.ime.usp.br>
170   -Joenio Costa <joenio@colivre.coop.br>
171   -Josef Spillner <josef.spillner@tu-dresden.de>
172   -Junior Silva <junior@bajor.localhost.localdomain>
173   -Junior Silva <juniorsilva1001@gmail.com>
174   -Junior Silva <juniorsilva7@juniorsilva-Aspire-5750Z.(none)>
175   -Junior Silva <juniorsilva@colivre.coop.br>
176   -juniorsilva <juniorsilva@QonoS.localhost.localdomain>
177   -Keilla Menezes <keilla@colivre.coop.br>
178   -Larissa Reis <larissa@colivre.coop.br>
179   -Larissa Reis <reiss.larissa@gmail.com>
180   -Leandro Nunes dos Santos <81665687568@serpro-1541727.Home>
181   -Leandro Nunes dos Santos <81665687568@serpro-1541727.(none)>
182   -Leandro Nunes dos Santos <leandronunes@gmail.com>
183   -Leandro Nunes dos Santos <leandro.santos@serpro.gov.br>
184   -LinguÁgil 2010 <linguagil.bahia@gmail.com>
185   -Lucas Melo <lucas@colivre.coop.br>
186   -Lucas Melo <lucaspradomelo@gmail.com>
187   -Luciano <lucianopcbr@gmail.com>
188   -Luis David Aguilar Carlos <ludwig9003@gmail.com>
189   -Luiz Fernando de Freitas Matos <luiz@luizff.matos@gmail.com>
190   -Marcos Ramos <ms.ramos@outlook.com>
191   -Martín Olivera <molivera@solar.org.ar>
192   -Moises Machado <moises@colivre.coop.br>
193   -Naíla Alves <naila@colivre.coop.br>
194   -Nanda Lopes <nanda.listas+psl@gmail.com>
195   -Paulo Meirelles + Alessandro Palmeira + João M. M. da Silva <paulo@softwarelivre.org>
196   -Paulo Meirelles + Alessandro Palmeira <paulo@softwarelivre.org>
197   -Paulo Meirelles + Carlos Morais <paulo@softwarelivre.org>
198   -Paulo Meirelles + Diego Araújo <paulo@softwarelivre.org>
199   -Paulo Meirelles + João M. M. da Silva <paulo@softwarelivre.org>
200   -Paulo Meirelles <paulo@softwarelivre.org>
201   -Paulo Meirelles + Rafael Manzo <paulo@softwarelivre.org>
202   -Rafael Gomes <rafaelgomes@techfree.com.br>
203   -Rafael Manzo + Alessandro Palmeira <rr.manzo@gmail.com>
204   -Rafael Manzo + Daniel Alves <danpaulalves@gmail.com>
205   -Rafael Manzo + Diego Araújo <rr.manzo@gmail.com>
206   -Rafael Manzo + João M. M. Silva <rr.manzo@gmail.com>
207   -Rafael Manzo + Paulo Meirelles <rr.manzo@gmail.com>
208   -Rafael Martins <rmmartins@gmail.com>
209   -Rafael Reggiani Manzo + Caio Salgado + Jefferson Fernandes <rr.manzo@gmail.com>
210   -Rafael Reggiani Manzo + Diego Araujo <diegoamc90@gmail.com>
211   -Rafael Reggiani Manzo + Diego Araujo <rr.manzo@gmail.com>
212   -Rafael Reggiani Manzo + Diego Araújo <rr.manzo@gmail.com>
213   -Rafael Reggiani Manzo + João M. M. da Silva <rr.manzo@gmail.com>
214   -Rafael Reggiani Manzo <rr.manzo@gmail.com>
215   -Raphaël Rousseau <raph@r4f.org>
216   -Raquel Lira <raquel.lira@gmail.com>
217   -Renan Teruo + Caio Salgado <renanteruoc@gmail.com>
218   -Renan Teruoc + Diego Araujo <renanteruoc@gmail.com>
219   -Renan Teruo + Diego Araujo <renanteruoc@gmail.com>
220   -Renan Teruo + Diego Araújo <renanteruoc@gmail.com>
221   -Renan Teruo + Paulo Meirelles <renanteruoc@gmail.com>
222   -Renan Teruo + Rafael Manzo <renanteruoc@gmail.com>
223   -Rodrigo Souto + Ana Losnak + Daniel Bucher + Caio Almeida + Leandro Nunes + Daniela Feitosa + Mariel Zasso <noosfero-br@listas.softwarelivre.org>
224   -Rodrigo Souto <diguliu@gmail.com>
225   -Rodrigo Souto <rodrigo@colivre.coop.br>
226   -Ronny Kursawe <kursawe.ronny@googlemail.com>
227   -root <root@debian.sdr.serpro>
228   -Samuel R. C. Vale <srcvale@holoscopio.com>
229   -Valessio Brito <contato@valessiobrito.com.br>
230   -Valessio Brito <contato@valessiobrito.info>
231   -Valessio Brito <valessio@gmail.com>
232   -vfcosta <vfcosta@gmail.com>
233   -Victor Carvalho <victorhugodf.ac@gmail.com>
234   -Victor Costa <vfcosta@gmail.com>
235   -Victor Hugo Alves de Carvalho <victorhugodf.ac@gmail.com>
236   -Vinicius Cubas Brand <viniciuscb@gmail.com>
237   -Visita <visita@debian.(none)>
238   -Yann Lugrin <yann.lugrin@liquid-concept.ch>
239   -
240   -Ideas, specifications and incentive
241   -===================================
242   -Daniel Tygel <dtygel@fbes.org.br>
243   -Guilherme Rocha <guilherme@gf7.com.br>
244   -Raphael Rousseau <raph@r4f.org>
245   -Théo Bondolfi <move@cooperation.net>
246   -Vicente Aguiar <vicenteaguiar@colivre.coop.br>
247   -
248   -Arts
249   -===================================
250   -Nara Oliveira <narananet@gmail.com>
AUTHORS.md
1   -If you are not listed here, but should be, please write to the noosfero mailing list: http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev (this list requires subscription to post, but since you are an author of noosfero, that's not a problem).
  1 +If you are not listed here, but should be, please write to the noosfero mailing
  2 +list: http://listas.softwarelivre.org/cgi-bin/mailman/listinfo/noosfero-dev
  3 +(this list requires subscription to post, but since you are an author of
  4 +noosfero, that's not a problem).
2 5  
3 6 Developers
4 7 ==========
5 8  
  9 +Ábner Silva de Oliveira <abner.oliveira@serpro.gov.br>
6 10 Alan Freihof Tygel <alantygel@gmail.com>
  11 +alcampelo <alcampelo@alcampelo.(none)>
7 12 Alessandro Palmeira <alessandro.palmeira@gmail.com>
8 13 Alessandro Palmeira + Caio C. Salgado <alessandro.palmeira@gmail.com>
9 14 Alessandro Palmeira + Caio Salgado <alessandro.palmeira@gmail.com>
... ... @@ -35,9 +40,12 @@ Alessandro Palmeira + João M. M. Silva &lt;alessandro.palmeira@gmail.com&gt;
35 40 Alessandro Palmeira + Paulo Meirelles <alessandro.palmeira@gmail.com>
36 41 Alessandro Palmeira + Paulo Meirelles + João M. M. da Silva <alessandro.palmeira@gmail.com>
37 42 Alessandro Palmeira + Rafael Manzo <alessandro.palmeira@gmail.com>
  43 +Ana Losnak <analosnak@gmail.com>
38 44 Antonio Terceiro + Carlos Morais <terceiro@colivre.coop.br>
39 45 Antonio Terceiro + Paulo Meirelles <terceiro@colivre.coop.br>
40 46 Antonio Terceiro <terceiro@colivre.coop.br>
  47 +Arthur Del Esposte <arthurmde@gmail.com>
  48 +Arthur Del Esposte <arthurmde@yahoo.com.br>
41 49 Aurelio A. Heckert <aurelio@colivre.coop.br>
42 50 Braulio Bhavamitra <brauliobo@gmail.com>
43 51 Bráulio Bhavamitra <brauliobo@gmail.com>
... ... @@ -65,11 +73,14 @@ Caio Salgado + Renan Teruo &lt;caio.salgado@gmail.com&gt;
65 73 Caio Salgado + Renan Teruo + Jefferson Fernandes <jeffs.fernandes@gmail.com>
66 74 Caio Salgado + Renan Teruo <renanteruoc@gmail.com>
67 75 Caio SBA <caio@colivre.coop.br>
  76 +Caio Tiago Oliveira <caiotiago@colivre.coop.br>
  77 +Carlos Andre de Souza <carlos.andre.souza@msn.com>
68 78 Carlos Morais <carlos88morais@gmail.com>
69 79 Carlos Morais + Diego Araújo <diegoamc90@gmail.com>
70 80 Carlos Morais + Eduardo Morais <carlos88morais@gmail.com>
71 81 Carlos Morais + Paulo Meirelles <carlos88morais@gmail.com>
72 82 Carlos Morais + Pedro Leal <carlos88morais@gmail.com>
  83 +Daniela Feitosa <dani@dohko.(none)>
73 84 Daniel Alves + Diego Araújo <danpaulalves@gmail.com>
74 85 Daniel Alves + Diego Araújo <diegoamc90@gmail.com>
75 86 Daniel Alves + Diego Araújo + Guilherme Rojas <danpaulalves@gmail.com>
... ... @@ -78,7 +89,9 @@ Daniel Alves + Diego Araújo + Guilherme Rojas &lt;guilhermehrojas@gmail.com&gt;
78 89 Daniel Alves + Guilherme Rojas <danpaulalves@gmail.com>
79 90 Daniel Alves + Rafael Manzo <rr.manzo@gmail.com>
80 91 Daniela Soares Feitosa <danielafeitosa@colivre.coop.br>
  92 +Daniel Bucher <daniel.bucher88@gmail.com>
81 93 Daniel Cunha <daniel@colivre.coop.br>
  94 +David Carlos <ddavidcarlos1392@gmail.com>
82 95 diegoamc <diegoamc90@gmail.com>
83 96 Diego Araújo + Alessandro Palmeira <diegoamc90@gmail.com>
84 97 Diego Araújo + Alessandro Palmeira + João M. M. da Silva <diegoamc90@gmail.com>
... ... @@ -107,15 +120,25 @@ Diego + Jefferson &lt;diegoamc90@gmail.com&gt;
107 120 Diego Martinez <diegoamc90@gmail.com>
108 121 Diego Martinez <diego@diego-K55A.(none)>
109 122 Diego + Renan <renanteruoc@gmail.com>
  123 +Eduardo Tourinho Edington <eduardo.edington@serpro.gov.br>
  124 +Evandro Jr <evandrojr@gmail.com>
  125 +Evandro Junior <evandrojr@gmail.com>
  126 +Fabio Teixeira <fabio1079@gmail.com>
110 127 Fernanda Lopes <nanda.listas+psl@gmail.com>
111 128 Francisco Marcelo A. Lima Júnior <francisco.lima-junior@serpro.gov.br>
112 129 Francisco Marcelo de Araujo Lima Junior <79350259591@serpro-1457614.(none)>
  130 +Francisco Marcelo de Araújo Lima Júnior <francisco.lima-junior@serpro.gov.br>
  131 +Francisco Marcelo de Araújo Lima Júnior <maljunior@gmail.com>
  132 +Gabriela Navarro <navarro1703@gmail.com>
113 133 Grazieno Pellegrino <grazieno@gmail.com>
  134 +Gust <darksshades@hotmail.com>
  135 +Hugo Melo <hugo@riseup.net>
114 136 Isaac Canan <isaac@intelletto.com.br>
115 137 Italo Valcy <italo@dcc.ufba.br>
116 138 Jefferson Fernandes + Diego Araujo + Rafael Manzo <jeffs.fernandes@gmail.com>
117 139 Jefferson Fernandes + Joao M. M. da Silva <jeffs.fernandes@gmail.com>
118 140 Jefferson Fernandes + Joao M. M. Silva <jeffs.fernandes@gmail.com>
  141 +João da Silva + Eduardo Morais + Rafael Manzo <rr.manzo@gmail.com>
119 142 João da Silva <jaodsilv@linux.ime.usp.br>
120 143 João Marco Maciel da Silva + Rafael Manzo + Renan Teruo <jaodsilv@linux.ime.usp.br>
121 144 João M. M. da Silva + Alessandro Palmeira + Diego Araújo + Caio Salgado <jaodsilv@linux.ime.usp.br>
... ... @@ -146,17 +169,29 @@ João M. M. Silva + Rafael Manzo &lt;jaodsilv@linux.ime.usp.br&gt;
146 169 João M. M. Silva + Renan Teruo <jaodsilv@linux.ime.usp.br>
147 170 Joenio Costa <joenio@colivre.coop.br>
148 171 Josef Spillner <josef.spillner@tu-dresden.de>
  172 +Jose Pedro <1jpsneto@gmail.com>
  173 +Junior Silva <junior@bajor.localhost.localdomain>
  174 +Junior Silva <junior@sedeantigo.colivre.coop.br>
149 175 Junior Silva <juniorsilva1001@gmail.com>
150 176 Junior Silva <juniorsilva7@juniorsilva-Aspire-5750Z.(none)>
  177 +Junior Silva <juniorsilva@colivre.coop.br>
  178 +juniorsilva <juniorsilva@QonoS.localhost.localdomain>
151 179 Keilla Menezes <keilla@colivre.coop.br>
152 180 Larissa Reis <larissa@colivre.coop.br>
153 181 Larissa Reis <reiss.larissa@gmail.com>
  182 +Leandro Alves <leandrosustenido@gmail.com>
  183 +Leandro Nunes dos Santos <81665687568@serpro-1541727.Home>
  184 +Leandro Nunes dos Santos <81665687568@serpro-1541727.(none)>
154 185 Leandro Nunes dos Santos <leandronunes@gmail.com>
155 186 Leandro Nunes dos Santos <leandro.santos@serpro.gov.br>
156 187 LinguÁgil 2010 <linguagil.bahia@gmail.com>
157 188 Lucas Melo <lucas@colivre.coop.br>
158 189 Lucas Melo <lucaspradomelo@gmail.com>
  190 +Luciano <lucianopcbr@gmail.com>
  191 +Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
159 192 Luis David Aguilar Carlos <ludwig9003@gmail.com>
  193 +Luiz Fernando de Freitas Matos <luiz@luizff.matos@gmail.com>
  194 +Marcos Ramos <ms.ramos@outlook.com>
160 195 Martín Olivera <molivera@solar.org.ar>
161 196 Moises Machado <moises@colivre.coop.br>
162 197 Naíla Alves <naila@colivre.coop.br>
... ... @@ -189,14 +224,19 @@ Renan Teruo + Diego Araujo &lt;renanteruoc@gmail.com&gt;
189 224 Renan Teruo + Diego Araújo <renanteruoc@gmail.com>
190 225 Renan Teruo + Paulo Meirelles <renanteruoc@gmail.com>
191 226 Renan Teruo + Rafael Manzo <renanteruoc@gmail.com>
  227 +Rodrigo Souto + Ana Losnak + Daniel Bucher + Caio Almeida + Leandro Nunes + Daniela Feitosa + Mariel Zasso <noosfero-br@listas.softwarelivre.org>
192 228 Rodrigo Souto <diguliu@gmail.com>
193 229 Rodrigo Souto <rodrigo@colivre.coop.br>
194 230 Ronny Kursawe <kursawe.ronny@googlemail.com>
195 231 root <root@debian.sdr.serpro>
196 232 Samuel R. C. Vale <srcvale@holoscopio.com>
  233 +Valessio Brito <contato@valessiobrito.com.br>
  234 +Valessio Brito <contato@valessiobrito.info>
197 235 Valessio Brito <valessio@gmail.com>
198 236 vfcosta <vfcosta@gmail.com>
  237 +Victor Carvalho <victorhugodf.ac@gmail.com>
199 238 Victor Costa <vfcosta@gmail.com>
  239 +Victor Hugo Alves de Carvalho <victorhugodf.ac@gmail.com>
200 240 Vinicius Cubas Brand <viniciuscb@gmail.com>
201 241 Visita <visita@debian.(none)>
202 242 Yann Lugrin <yann.lugrin@liquid-concept.ch>
... ...
Gemfile
... ... @@ -15,6 +15,8 @@ gem &#39;thin&#39;
15 15 gem 'hpricot'
16 16 gem 'nokogiri'
17 17 gem 'rake', :require => false
  18 +gem 'rest-client'
  19 +gem 'exception_notification'
18 20  
19 21 gem 'whenever', :require => false
20 22  
... ... @@ -32,7 +34,6 @@ group :test do
32 34 end
33 35  
34 36 group :cucumber do
35   - gem 'rake'
36 37 gem 'cucumber-rails', :require => false
37 38 gem 'capybara'
38 39 gem 'cucumber'
... ...
Gemfile.lock
... ... @@ -62,7 +62,10 @@ GEM
62 62 database_cleaner (1.2.0)
63 63 diff-lcs (1.1.3)
64 64 erubis (2.7.0)
65   - eventmachine (0.12.11)
  65 + eventmachine (0.12.10)
  66 + exception_notification (4.0.1)
  67 + actionmailer (>= 3.0.4)
  68 + activesupport (>= 3.0.4)
66 69 fast_gettext (0.6.8)
67 70 ffi (1.0.11)
68 71 gherkin (2.4.21)
... ... @@ -112,6 +115,8 @@ GEM
112 115 thor (>= 0.14.6, < 2.0)
113 116 rake (0.9.2.2)
114 117 rdoc (3.9.4)
  118 + rest-client (1.6.7)
  119 + mime-types (>= 1.16)
115 120 rmagick (2.13.1)
116 121 rspec (2.10.0)
117 122 rspec-core (~> 2.10.0)
... ... @@ -169,6 +174,7 @@ DEPENDENCIES
169 174 daemons
170 175 dalli
171 176 database_cleaner
  177 + exception_notification
172 178 fast_gettext
173 179 hpricot
174 180 mocha
... ... @@ -179,6 +185,7 @@ DEPENDENCIES
179 185 rails
180 186 rails_autolink
181 187 rake
  188 + rest-client
182 189 rmagick
183 190 rspec
184 191 rspec-rails
... ...
Rakefile
1 1 #!/usr/bin/env rake
  2 +
2 3 # Add your own tasks in files placed in lib/tasks ending in .rake,
3 4 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4 5  
... ...
app/controllers/my_profile/cms_controller.rb
... ... @@ -146,6 +146,7 @@ class CmsController &lt; MyProfileController
146 146 end
147 147  
148 148 @article.profile = profile
  149 + @article.author = user
149 150 @article.last_changed_by = user
150 151 @article.created_by = user
151 152  
... ... @@ -194,7 +195,18 @@ class CmsController &lt; MyProfileController
194 195 end
195 196 if request.post? && params[:uploaded_files]
196 197 params[:uploaded_files].each do |file|
197   - @uploaded_files << UploadedFile.create({:uploaded_data => file, :profile => profile, :parent => @parent, :last_changed_by => user}, :without_protection => true) unless file == ''
  198 + unless file == ''
  199 + @uploaded_files << UploadedFile.create(
  200 + {
  201 + :uploaded_data => file,
  202 + :profile => profile,
  203 + :parent => @parent,
  204 + :last_changed_by => user,
  205 + :author => user,
  206 + },
  207 + :without_protection => true
  208 + )
  209 + end
198 210 end
199 211 @errors = @uploaded_files.select { |f| f.errors.any? }
200 212 if @errors.any?
... ... @@ -277,6 +289,9 @@ class CmsController &lt; MyProfileController
277 289 article_name = params[:name]
278 290 params_marked = params['q'].split(',').select { |marked| user.memberships.map(&:id).include? marked.to_i }
279 291 @marked_groups = Profile.find(params_marked)
  292 + if @marked_groups.empty?
  293 + return session[:notice] = _("Select some group to publish your article")
  294 + end
280 295 @marked_groups.each do |item|
281 296 task = ApproveArticle.create!(:article => @article, :name => article_name, :target => item, :requestor => user)
282 297 begin
... ...
app/controllers/my_profile/friends_controller.rb
... ... @@ -12,7 +12,7 @@ class FriendsController &lt; MyProfileController
12 12 def remove
13 13 @friend = profile.friends.find(params[:id])
14 14 if request.post? && params[:confirmation]
15   - profile.remove_friend(@friend)
  15 + Friendship.remove_friendship(profile, @friend)
16 16 redirect_to :action => 'index'
17 17 end
18 18 end
... ...
app/controllers/public/account_controller.rb
... ... @@ -2,7 +2,7 @@ class AccountController &lt; ApplicationController
2 2  
3 3 no_design_blocks
4 4  
5   - before_filter :login_required, :only => [:activation_question, :accept_terms, :activate_enterprise]
  5 + before_filter :login_required, :only => [:activation_question, :accept_terms, :activate_enterprise, :change_password]
6 6 before_filter :redirect_if_logged_in, :only => [:login, :signup]
7 7 before_filter :protect_from_bots, :only => :signup
8 8  
... ...
app/controllers/public/catalog_controller.rb
... ... @@ -11,7 +11,7 @@ class CatalogController &lt; PublicController
11 11 protected
12 12  
13 13 def check_enterprise_and_environment
14   - unless profile.kind_of?(Enterprise) && @profile.environment.enabled?('products_for_enterprises')
  14 + unless profile.enterprise? && @profile.environment.enabled?('products_for_enterprises')
15 15 redirect_to :controller => 'profile', :profile => profile.identifier, :action => 'index'
16 16 end
17 17 end
... ...
app/controllers/public/content_viewer_controller.rb
... ... @@ -31,8 +31,8 @@ class ContentViewerController &lt; ApplicationController
31 31  
32 32 if request.post? && @page.forum?
33 33 process_forum_terms_of_use(user, params[:terms_accepted])
34   - elsif is_a_forum_topic?(@page)
35   - redirect_to @page.parent.url unless @page.parent.agrees_with_terms?(user)
  34 + elsif is_a_forum_topic?(@page) && !@page.parent.agrees_with_terms?(user)
  35 + redirect_to @page.parent.url
36 36 return
37 37 end
38 38  
... ... @@ -74,7 +74,7 @@ class ContentViewerController &lt; ApplicationController
74 74 end
75 75  
76 76 def versions_diff
77   - path = params[:page].join('/')
  77 + path = params[:page]
78 78 @page = profile.articles.find_by_path(path)
79 79 @v1, @v2 = @page.versions.find_by_version(params[:v1]), @page.versions.find_by_version(params[:v2])
80 80 end
... ... @@ -216,6 +216,8 @@ class ContentViewerController &lt; ApplicationController
216 216 if @page.has_posts?
217 217 posts = get_posts(params[:year], params[:month])
218 218  
  219 + posts = posts.includes(:parent, {:profile => [:domains, :environment]}, :author)
  220 +
219 221 #FIXME Need to run this before the pagination because this version of
220 222 # will_paginate returns a will_paginate collection instead of a
221 223 # relation.
... ...
app/controllers/public/profile_controller.rb
... ... @@ -51,7 +51,7 @@ class ProfileController &lt; PublicController
51 51  
52 52 def communities
53 53 if is_cache_expired?(profile.communities_cache_key(params))
54   - @communities = profile.communities.includes(relations_to_include).paginate(:per_page => per_page, :page => params[:npage])
  54 + @communities = profile.communities.includes(relations_to_include).paginate(:per_page => per_page, :page => params[:npage], :total_entries => profile.communities.count)
55 55 end
56 56 end
57 57  
... ... @@ -202,7 +202,8 @@ class ProfileController &lt; PublicController
202 202 end
203 203  
204 204 def more_comments
205   - activity = ActionTracker::Record.find(:first, :conditions => {:id => params[:activity], :user_id => @profile})
  205 + profile_filter = @profile.person? ? {:user_id => @profile} : {:target_id => @profile}
  206 + activity = ActionTracker::Record.find(:first, :conditions => {:id => params[:activity]}.merge(profile_filter))
206 207 comments_count = activity.comments.count
207 208 comment_page = (params[:comment_page] || 1).to_i
208 209 comments_per_page = 5
... ...
app/helpers/application_helper.rb
... ... @@ -312,13 +312,13 @@ module ApplicationHelper
312 312 raise ArgumentError, 'No partial for object. Is there a partial for any class in the inheritance hierarchy?'
313 313 end
314 314  
315   - def view_for_profile_actions(klass)
316   - raise ArgumentError, 'No profile actions view for this class.' if klass.nil?
317   -
318   - name = klass.name.underscore
319   - return "blocks/profile_info_actions/" + name + '.html.erb' if File.exists?(Rails.root.join('app', 'views', 'blocks', 'profile_info_actions', name + '.html.erb'))
320   -
321   - view_for_profile_actions(klass.superclass)
  315 + def render_profile_actions klass
  316 + name = klass.to_s.underscore
  317 + begin
  318 + render "blocks/profile_info_actions/#{name}"
  319 + rescue ActionView::MissingTemplate
  320 + render_profile_actions klass.superclass
  321 + end
322 322 end
323 323  
324 324 def user
... ... @@ -671,7 +671,7 @@ module ApplicationHelper
671 671  
672 672 def theme_javascript_ng
673 673 script = File.join(theme_path, 'theme.js')
674   - if File.join(Rails.root, 'public', script)
  674 + if File.exists?(File.join(Rails.root, 'public', script))
675 675 javascript_include_tag script
676 676 else
677 677 nil
... ... @@ -1095,7 +1095,7 @@ module ApplicationHelper
1095 1095 result
1096 1096 end
1097 1097  
1098   - def manage_link(list, kind)
  1098 + def manage_link(list, kind, title)
1099 1099 if list.present?
1100 1100 link_to_all = nil
1101 1101 if list.count > 5
... ... @@ -1108,19 +1108,19 @@ module ApplicationHelper
1108 1108 if link_to_all
1109 1109 link << link_to_all
1110 1110 end
1111   - render :partial => "shared/manage_link", :locals => {:link => link, :kind => kind.to_s}
  1111 + render :partial => "shared/manage_link", :locals => {:link => link, :kind => kind.to_s, :title => title}
1112 1112 end
1113 1113 end
1114 1114  
1115 1115 def manage_enterprises
1116 1116 return '' unless user && user.environment.enabled?(:display_my_enterprises_on_user_menu)
1117   - manage_link(user.enterprises, :enterprises).to_s
  1117 + manage_link(user.enterprises, :enterprises, _('My enterprises')).to_s
1118 1118 end
1119 1119  
1120 1120 def manage_communities
1121 1121 return '' unless user && user.environment.enabled?(:display_my_communities_on_user_menu)
1122 1122 administered_communities = user.communities.more_popular.select {|c| c.admins.include? user}
1123   - manage_link(administered_communities, :communities).to_s
  1123 + manage_link(administered_communities, :communities, _('My communities')).to_s
1124 1124 end
1125 1125  
1126 1126 def admin_link
... ... @@ -1223,22 +1223,9 @@ module ApplicationHelper
1223 1223 end
1224 1224  
1225 1225 def add_zoom_to_images
1226   - stylesheet_link_tag('fancybox') +
1227   - javascript_include_tag('jquery.fancybox-1.3.4.pack') +
1228   - javascript_tag("jQuery(function($) {
1229   - $(window).load( function() {
1230   - $('#article .article-body img').each( function(index) {
1231   - var original = original_image_dimensions($(this).attr('src'));
1232   - if ($(this).width() < original['width'] || $(this).height() < original['height']) {
1233   - $(this).wrap('<div class=\"zoomable-image\" />');
1234   - $(this).parent('.zoomable-image').attr('style', $(this).attr('style'));
1235   - $(this).attr('style', '');
1236   - $(this).after(\'<a href=\"' + $(this).attr('src') + '\" class=\"zoomify-image\"><span class=\"zoomify-text\">%s</span></a>');
1237   - }
1238   - });
1239   - $('.zoomify-image').fancybox();
1240   - });
1241   - });" % _('Zoom in'))
  1226 + stylesheet_link_tag('jquery.fancybox') +
  1227 + javascript_include_tag('jquery.fancybox.pack') +
  1228 + javascript_tag("apply_zoom_to_images(#{_('Zoom in').to_json})")
1242 1229 end
1243 1230  
1244 1231 def render_dialog_error_messages(instance_name)
... ... @@ -1373,7 +1360,7 @@ module ApplicationHelper
1373 1360 @message = _("The content here is available to %s's friends only.") % profile.short_name
1374 1361 else
1375 1362 @action = :join
1376   - @message = _('The contents in this community is available to members only.')
  1363 + @message = _('The contents in this profile is available to members only.')
1377 1364 end
1378 1365 @no_design_blocks = true
1379 1366 end
... ...
app/helpers/block_helper.rb
... ... @@ -6,19 +6,20 @@ module BlockHelper
6 6 content_tag 'h3', content_tag('span', h(title)), :class => tag_class
7 7 end
8 8  
9   - def highlights_block_config_image_fields(block, image={})
  9 + def highlights_block_config_image_fields(block, image={}, row_number=nil)
10 10 "
11   - <tr class=\"image-data-line\">
  11 + <tr class=\"image-data-line\" data-row-number='#{row_number}'>
12 12 <td>
13 13 #{select_tag 'block[images][][image_id]', content_tag(:option) + option_groups_from_collection_for_select(block.folder_choices, :images, :name, :id, :name, image[:image_id].to_i).html_safe}
14 14 </td>
15 15 <td>#{text_field_tag 'block[images][][address]', image[:address], :class => 'highlight-address', :size => 20}</td>
16 16 <td>#{text_field_tag 'block[images][][position]', image[:position], :class => 'highlight-position', :size => 1}</td>
17   - </tr><tr class=\"image-title\">
  17 + </tr><tr class=\"image-title\" data-row-number='#{row_number}'>
18 18 <td colspan=\"3\"><label>#{
19 19 content_tag('span', _('Title')) +
20 20 text_field_tag('block[images][][title]', image[:title], :class => 'highlight-title', :size => 45)
21 21 }</label></td>
  22 + <td>#{link_to '', '#', :class=>'button icon-button icon-delete delete-highlight', :confirm=>_('Are you sure you want to remove this highlight')}</td>
22 23 </tr>
23 24 "
24 25 end
... ...
app/helpers/blog_helper.rb
... ... @@ -17,13 +17,13 @@ module BlogHelper
17 17 _('Configure blog')
18 18 end
19 19  
20   - def list_posts(articles, format = 'full')
  20 + def list_posts(articles, format = 'full', paginate = true)
21 21 pagination = will_paginate(articles, {
22 22 :param_name => 'npage',
23 23 :previous_label => _('&laquo; Newer posts'),
24 24 :next_label => _('Older posts &raquo;'),
25 25 :params => {:action=>"view_page", :page=>articles.first.parent.path.split('/'), :controller=>"content_viewer"}
26   - }) if articles.present?
  26 + }) if articles.present? && paginate
27 27 content = []
28 28 artic_len = articles.length
29 29 articles.each_with_index{ |art,i|
... ... @@ -45,9 +45,9 @@ module BlogHelper
45 45  
46 46 def display_post(article, format = 'full')
47 47 no_comments = (format == 'full') ? false : true
  48 + title = article_title(article, :no_comments => no_comments)
48 49 html = send("display_#{format}_format", FilePresenter.for(article)).html_safe
49   -
50   - article_title(article, :no_comments => no_comments) + html
  50 + title + html
51 51 end
52 52  
53 53 def display_full_format(article)
... ...
app/helpers/content_viewer_helper.rb
... ... @@ -10,7 +10,7 @@ module ContentViewerHelper
10 10 end
11 11  
12 12 def number_of_comments(article)
13   - display_number_of_comments(article.comments.without_spam.count)
  13 + display_number_of_comments(article.comments_count - article.spam_comments_count)
14 14 end
15 15  
16 16 def article_title(article, args = {})
... ... @@ -26,7 +26,7 @@ module ContentViewerHelper
26 26 end
27 27 title << content_tag('span',
28 28 content_tag('span', show_date(article.published_at), :class => 'date') +
29   - content_tag('span', _(", by %s") % link_to(article.author_name, article.author_url), :class => 'author') +
  29 + content_tag('span', _(", by %s") % (article.author ? link_to(article.author_name, article.author_url) : article.author_name), :class => 'author') +
30 30 content_tag('span', comments, :class => 'comments'),
31 31 :class => 'created-at'
32 32 )
... ...
app/helpers/folder_helper.rb
... ... @@ -5,15 +5,17 @@ module FolderHelper
5 5 include ShortFilename
6 6 include ArticleHelper
7 7  
8   - def list_articles(articles, recursive = false)
9   - if !articles.blank?
10   - articles = articles.paginate(
  8 + def list_contents(configure={})
  9 + configure[:recursive] ||= false
  10 + configure[:list_type] ||= :folder
  11 + if !configure[:contents].blank?
  12 + configure[:contents] = configure[:contents].paginate(
11 13 :order => "updated_at DESC",
12 14 :per_page => 10,
13 15 :page => params[:npage]
14 16 )
15 17  
16   - render :file => 'shared/articles_list', :locals => {:articles => articles, :recursive => recursive}
  18 + render :file => 'shared/content_list', :locals => configure
17 19 else
18 20 content_tag('em', _('(empty folder)'))
19 21 end
... ... @@ -23,21 +25,33 @@ module FolderHelper
23 25 articles.select {|article| article.display_to?(user)}
24 26 end
25 27  
26   - def display_article_in_listing(article, recursive = false, level = 0)
27   - article = FilePresenter.for article
28   - article_link = if article.image?
29   - link_to('&nbsp;' * (level * 4) + image_tag(icon_for_article(article)) + short_filename(article.name), article.url.merge(:view => true))
  28 + def display_content_in_listing(configure={})
  29 + recursive = configure[:recursive] || false
  30 + list_type = configure[:list_type] || :folder
  31 + level = configure[:level] || 0
  32 + content = FilePresenter.for configure[:content]
  33 + content_link = if content.image?
  34 + link_to('&nbsp;' * (level * 4) +
  35 + image_tag(icon_for_article(content)) + short_filename(content.name),
  36 + content.url.merge(:view => true)
  37 + )
30 38 else
31   - link_to('&nbsp;' * (level * 4) + short_filename(article.name), article.url.merge(:view => true), :class => icon_for_article(article))
  39 + link_to('&nbsp;' * (level * 4) +
  40 + short_filename(content.name),
  41 + content.url.merge(:view => true), :class => icon_for_article(content)
  42 + )
32 43 end
33 44 result = content_tag(
34 45 'tr',
35   - content_tag('td', article_link )+
36   - content_tag('td', show_date(article.updated_at), :class => 'last-update'),
37   - :class => 'sitemap-item'
  46 + content_tag('td', content_link ) +
  47 + content_tag('td', show_date(content.updated_at), :class => 'last-update'),
  48 + :class => "#{list_type}-item"
38 49 )
39 50 if recursive
40   - result + article.children.map {|item| display_article_in_listing(item, recursive, level + 1) }.join('')
  51 + result + content.children.map {|item|
  52 + display_content_in_listing :content=>item, :recursive=>recursive,
  53 + :list_type=>list_type, :level=>level+1
  54 + }.join("\n")
41 55 else
42 56 result
43 57 end
... ...
app/models/article.rb
... ... @@ -2,7 +2,7 @@ require &#39;hpricot&#39;
2 2  
3 3 class Article < ActiveRecord::Base
4 4  
5   - attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent, :allow_members_to_edit, :translation_of_id, :language, :license_id, :parent_id, :display_posts_in_current_language, :category_ids, :posts_per_page, :moderate_comments, :accept_comments, :feed, :published, :source, :highlighted, :notify_comments, :display_hits, :slug, :external_feed_builder, :display_versions, :external_link
  5 + attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent, :allow_members_to_edit, :translation_of_id, :language, :license_id, :parent_id, :display_posts_in_current_language, :category_ids, :posts_per_page, :moderate_comments, :accept_comments, :feed, :published, :source, :highlighted, :notify_comments, :display_hits, :slug, :external_feed_builder, :display_versions, :external_link, :image_builder
6 6  
7 7 acts_as_having_image
8 8  
... ... @@ -37,6 +37,12 @@ class Article &lt; ActiveRecord::Base
37 37 # xss_terminate plugin can't sanitize array fields
38 38 before_save :sanitize_tag_list
39 39  
  40 + before_create do |article|
  41 + if article.author
  42 + article.author_name = article.author.name
  43 + end
  44 + end
  45 +
40 46 belongs_to :profile
41 47 validates_presence_of :profile_id, :name
42 48 validates_presence_of :slug, :path, :if => lambda { |article| !article.name.blank? }
... ... @@ -45,6 +51,7 @@ class Article &lt; ActiveRecord::Base
45 51  
46 52 validates_uniqueness_of :slug, :scope => ['profile_id', 'parent_id'], :message => N_('The title (article name) is already being used by another article, please use another title.'), :if => lambda { |article| !article.slug.blank? }
47 53  
  54 + belongs_to :author, :class_name => 'Person'
48 55 belongs_to :last_changed_by, :class_name => 'Person', :foreign_key => 'last_changed_by_id'
49 56 belongs_to :created_by, :class_name => 'Person', :foreign_key => 'created_by_id'
50 57  
... ... @@ -453,10 +460,10 @@ class Article &lt; ActiveRecord::Base
453 460 ['TextArticle', 'TextileArticle', 'TinyMceArticle']
454 461 end
455 462  
456   - scope :published, :conditions => { :published => true }
457   - scope :folders, lambda {|profile|{:conditions => { :type => profile.folder_types} }}
458   - scope :no_folders, lambda {|profile|{:conditions => ['type NOT IN (?)', profile.folder_types]}}
459   - scope :galleries, :conditions => { :type => 'Gallery' }
  463 + scope :published, :conditions => ['articles.published = ?', true]
  464 + scope :folders, lambda {|profile|{:conditions => ['articles.type IN (?)', profile.folder_types] }}
  465 + scope :no_folders, lambda {|profile|{:conditions => ['articles.type NOT IN (?)', profile.folder_types]}}
  466 + scope :galleries, :conditions => [ "articles.type IN ('Gallery')" ]
460 467 scope :images, :conditions => { :is_image => true }
461 468 scope :no_images, :conditions => { :is_image => false }
462 469 scope :text_articles, :conditions => [ 'articles.type IN (?)', text_article_types ]
... ... @@ -468,7 +475,7 @@ class Article &lt; ActiveRecord::Base
468 475 scope :more_recent, :order => "created_at DESC"
469 476  
470 477 def self.display_filter(user, profile)
471   - return {:conditions => ['published = ?', true]} if !user
  478 + return {:conditions => ['articles.published = ?', true]} if !user
472 479 {:conditions => [" articles.published = ? OR
473 480 articles.last_changed_by_id = ? OR
474 481 articles.profile_id = ? OR
... ... @@ -495,6 +502,7 @@ class Article &lt; ActiveRecord::Base
495 502 end
496 503  
497 504 def allow_post_content?(user = nil)
  505 + return true if allow_edit_topic?(user)
498 506 user && (user.has_permission?('post_content', profile) || allow_publish_content?(user) && (user == author))
499 507 end
500 508  
... ... @@ -517,9 +525,14 @@ class Article &lt; ActiveRecord::Base
517 525 end
518 526  
519 527 def allow_edit?(user)
  528 + return true if allow_edit_topic?(user)
520 529 allow_post_content?(user) || user && allow_members_to_edit && user.is_member_of?(profile)
521 530 end
522 531  
  532 + def allow_edit_topic?(user)
  533 + self.belongs_to_forum? && (user == author) && user.present? && user.is_member_of?(profile)
  534 + end
  535 +
523 536 def moderate_comments?
524 537 moderate_comments == true
525 538 end
... ... @@ -634,35 +647,36 @@ class Article &lt; ActiveRecord::Base
634 647 can_display_versions? && display_versions
635 648 end
636 649  
637   - def author(version_number = nil)
638   - if version_number
639   - version = self.versions.find_by_version(version_number)
640   - author_id = version.last_changed_by_id if version
641   - else
642   - author_id = self.created_by_id
643   - end
  650 + def get_version(version_number = nil)
  651 + version_number ? versions.find(:first, :order => 'version', :offset => version_number - 1) : versions.earliest
  652 + end
644 653  
645   - environment.people.find_by_id(author_id)
  654 + def author_by_version(version_number = nil)
  655 + version_number ? profile.environment.people.find_by_id(get_version(version_number).author_id) : author
646 656 end
647 657  
648 658 def author_name(version_number = nil)
649   - person = author(version_number)
650   - person ? person.name : (setting[:author_name] || _('Unknown'))
  659 + person = author_by_version(version_number)
  660 + if version_number
  661 + person ? person.name : _('Unknown')
  662 + else
  663 + person ? person.name : (setting[:author_name] || _('Unknown'))
  664 + end
651 665 end
652 666  
653 667 def author_url(version_number = nil)
654   - person = author(version_number)
  668 + person = author_by_version(version_number)
655 669 person ? person.url : nil
656 670 end
657 671  
658 672 def author_id(version_number = nil)
659   - person = author(version_number)
  673 + person = author_by_version(version_number)
660 674 person ? person.id : nil
661 675 end
662 676  
663 677 def version_license(version_number = nil)
664 678 return license if version_number.nil?
665   - profile.environment.licenses.find_by_id(versions.find_by_version(version_number).license_id)
  679 + profile.environment.licenses.find_by_id(get_version(version_number).license_id)
666 680 end
667 681  
668 682 alias :active_record_cache_key :cache_key
... ...
app/models/block.rb
... ... @@ -22,6 +22,10 @@ class Block &lt; ActiveRecord::Base
22 22 false
23 23 end
24 24  
  25 + def get_limit
  26 + [0,limit].max
  27 + end
  28 +
25 29 def embed_code
26 30 me = self
27 31 proc do
... ...
app/models/comment.rb
... ... @@ -109,14 +109,17 @@ class Comment &lt; ActiveRecord::Base
109 109 include Noosfero::Plugin::HotSpot
110 110  
111 111 include Spammable
  112 + include CacheCounterHelper
112 113  
113 114 def after_spam!
114 115 SpammerLogger.log(ip_address, self)
115 116 Delayed::Job.enqueue(CommentHandler.new(self.id, :marked_as_spam))
  117 + update_cache_counter(:spam_comments_count, source, 1) if source.kind_of?(Article)
116 118 end
117 119  
118 120 def after_ham!
119 121 Delayed::Job.enqueue(CommentHandler.new(self.id, :marked_as_ham))
  122 + update_cache_counter(:spam_comments_count, source, -1) if source.kind_of?(Article)
120 123 end
121 124  
122 125 def verify_and_notify
... ...
app/models/domain.rb
... ... @@ -2,7 +2,7 @@ require &#39;noosfero/multi_tenancy&#39;
2 2  
3 3 class Domain < ActiveRecord::Base
4 4  
5   - attr_accessible :name, :owner
  5 + attr_accessible :name, :owner, :is_default
6 6  
7 7 # relationships
8 8 ###############
... ...
app/models/enterprise.rb
... ... @@ -28,7 +28,10 @@ class Enterprise &lt; Organization
28 28 N_('Organization website'); N_('Historic and current context'); N_('Activities short description'); N_('City'); N_('State'); N_('Country'); N_('ZIP code')
29 29  
30 30 settings_items :organization_website, :historic_and_current_context, :activities_short_description
  31 +
31 32 settings_items :products_per_catalog_page, :type => :integer, :default => 6
  33 + alias_method :products_per_catalog_page_before_type_cast, :products_per_catalog_page
  34 + validates_numericality_of :products_per_catalog_page, :allow_nil => true, :greater_than => 0
32 35  
33 36 extend SetProfileRegionFromCityState::ClassMethods
34 37 set_profile_region_from_city_state
... ...
app/models/environment.rb
... ... @@ -288,7 +288,7 @@ class Environment &lt; ActiveRecord::Base
288 288 www.youtube.com
289 289 ] + ('a' .. 'z').map{|i| "#{i}.yimg.com"}
290 290  
291   - settings_items :enabled_plugins, :type => Array, :default => []
  291 + settings_items :enabled_plugins, :type => Array, :default => Noosfero::Plugin.available_plugin_names
292 292  
293 293 settings_items :search_hints, :type => Hash, :default => {}
294 294  
... ...
app/models/featured_products_block.rb
1 1 class FeaturedProductsBlock < Block
2 2  
  3 + attr_accessible :product_ids, :groups_of, :speed, :reflect
  4 +
3 5 settings_items :product_ids, :type => Array, :default => []
4 6 settings_items :groups_of, :type => :integer, :default => 3
5 7 settings_items :speed, :type => :integer, :default => 1000
... ...
app/models/friendship.rb
... ... @@ -15,4 +15,9 @@ class Friendship &lt; ActiveRecord::Base
15 15 Friendship.update_cache_counter(:friends_count, friendship.person, -1)
16 16 Friendship.update_cache_counter(:friends_count, friendship.friend, -1)
17 17 end
  18 +
  19 + def self.remove_friendship(person1, person2)
  20 + person1.remove_friend(person2)
  21 + person2.remove_friend(person1)
  22 + end
18 23 end
... ...
app/models/highlights_block.rb
1 1 class HighlightsBlock < Block
2 2  
3   - attr_accessible :images
  3 + attr_accessible :images, :interval, :shuffle, :navigation
4 4  
5 5 settings_items :images, :type => Array, :default => []
6 6 settings_items :interval, :type => 'integer', :default => 4
... ...
app/models/location_block.rb
1 1 class LocationBlock < Block
2 2  
  3 + attr_accessible :zoom, :map_type
  4 +
3 5 settings_items :zoom, :type => :integer, :default => 4
4 6 settings_items :map_type, :type => :string, :default => 'roadmap'
5 7  
... ...
app/models/person_notifier.rb
... ... @@ -82,7 +82,7 @@ class PersonNotifier
82 82 @url = @profile.environment.top_url
83 83 mail(
84 84 content_type: "text/html",
85   - from: "#{@profile.environment.name} <#{@profile.environment.contact_email}>",
  85 + from: "#{@profile.environment.name} <#{@profile.environment.noreply_email}>",
86 86 to: @profile.email,
87 87 subject: _("[%s] Network Activity") % [@profile.environment.name]
88 88 )
... ...
app/models/product.rb
... ... @@ -10,7 +10,7 @@ class Product &lt; ActiveRecord::Base
10 10 :display => %w[map full]
11 11 }
12 12  
13   - attr_accessible :name, :product_category, :highlighted, :price, :enterprise, :image_builder, :description, :available, :qualifiers
  13 + attr_accessible :name, :product_category, :highlighted, :price, :enterprise, :image_builder, :description, :available, :qualifiers, :unit_id, :discount, :inputs
14 14  
15 15 def self.default_search_display
16 16 'full'
... ...
app/models/product_categories_block.rb
... ... @@ -17,7 +17,7 @@ class ProductCategoriesBlock &lt; Block
17 17 profile = owner
18 18 proc do
19 19 if @categories.nil? or @categories.length == 0
20   - categories = ProductCategory.on_level().order(:name)
  20 + categories = ProductCategory.on_level(nil).order(:name)
21 21 if @categories and @categories.length == 0
22 22 notice = _('There are no sub-categories for %s') % @category.name
23 23 end
... ... @@ -33,7 +33,7 @@ class ProductCategoriesBlock &lt; Block
33 33 end
34 34 end
35 35  
36   - DISPLAY_OPTIONS['catalog_only'] = _('Only on the catalog')
  36 + DISPLAY_OPTIONS = DISPLAY_OPTIONS.merge('catalog_only' => _('Only on the catalog'))
37 37  
38 38 def display
39 39 settings[:display].nil? ? 'catalog_only' : super
... ...
app/models/products_block.rb
... ... @@ -49,17 +49,10 @@ class ProductsBlock &lt; Block
49 49  
50 50 def products(reload = false)
51 51 if product_ids.blank?
52   - products_list = owner.products(reload)
53   - result = []
54   - [4, products_list.size].min.times do
55   - p = products_list.sample
56   - result << p
57   - products_list -= [p]
58   - end
59   - result
  52 + owner.products.order('RANDOM()').limit([4,owner.products.count].min)
60 53 else
61   - product_ids.map {|item| owner.products.find(item) }
62   - end
  54 + owner.products.where(:id => product_ids)
  55 + end.compact
63 56 end
64 57  
65 58 end
... ...
app/models/profile.rb
... ... @@ -3,7 +3,7 @@
3 3 # which by default is the one returned by Environment:default.
4 4 class Profile < ActiveRecord::Base
5 5  
6   - attr_accessible :name, :identifier, :public_profile, :nickname, :custom_footer, :custom_header, :address, :zip_code, :contact_phone, :image_builder, :description, :closed, :template_id, :environment, :lat, :lng, :is_template, :fields_privacy, :preferred_domain_id, :category_ids, :country, :city, :state, :national_region_code, :email, :contact_email, :redirect_l10n, :notification_time
  6 + attr_accessible :name, :identifier, :public_profile, :nickname, :custom_footer, :custom_header, :address, :zip_code, :contact_phone, :image_builder, :description, :closed, :template_id, :environment, :lat, :lng, :is_template, :fields_privacy, :preferred_domain_id, :category_ids, :country, :city, :state, :national_region_code, :email, :contact_email, :redirect_l10n, :notification_time, :redirection_after_login
7 7  
8 8 # use for internationalizable human type names in search facets
9 9 # reimplement on subclasses
... ...
app/models/profile_list_block.rb
1 1 class ProfileListBlock < Block
2 2  
3   - attr_accessible :limit, :prioritize_profiles_with_image
  3 + attr_accessible :prioritize_profiles_with_image
4 4  
5 5 settings_items :limit, :type => :integer, :default => 6
6 6 settings_items :prioritize_profiles_with_image, :type => :boolean, :default => true
... ... @@ -18,13 +18,13 @@ class ProfileListBlock &lt; Block
18 18 result = nil
19 19 visible_profiles = profiles.visible.includes([:image,:domains,:preferred_domain,:environment])
20 20 if !prioritize_profiles_with_image
21   - result = visible_profiles.all(:limit => limit, :order => 'profiles.updated_at DESC').sort_by{ rand }
22   - elsif profiles.visible.with_image.count >= limit
23   - result = visible_profiles.with_image.all(:limit => limit * 5, :order => 'profiles.updated_at DESC').sort_by{ rand }
  21 + result = visible_profiles.all(:limit => get_limit, :order => 'profiles.updated_at DESC').sort_by{ rand }
  22 + elsif profiles.visible.with_image.count >= get_limit
  23 + result = visible_profiles.with_image.all(:limit => get_limit * 5, :order => 'profiles.updated_at DESC').sort_by{ rand }
24 24 else
25   - result = visible_profiles.with_image.sort_by{ rand } + visible_profiles.without_image.all(:limit => limit * 5, :order => 'profiles.updated_at DESC').sort_by{ rand }
  25 + result = visible_profiles.with_image.sort_by{ rand } + visible_profiles.without_image.all(:limit => get_limit * 5, :order => 'profiles.updated_at DESC').sort_by{ rand }
26 26 end
27   - result.slice(0..limit-1)
  27 + result.slice(0..get_limit-1)
28 28 end
29 29  
30 30 def profile_count
... ...
app/models/recent_documents_block.rb
... ... @@ -33,7 +33,7 @@ class RecentDocumentsBlock &lt; Block
33 33 end
34 34  
35 35 def docs
36   - self.limit.nil? ? owner.recent_documents(nil, {}, false) : owner.recent_documents(self.limit, {}, false)
  36 + self.limit.nil? ? owner.recent_documents(nil, {}, false) : owner.recent_documents(self.get_limit, {}, false)
37 37 end
38 38  
39 39 def self.expire_on
... ...
app/models/rss_feed.rb
1 1 class RssFeed < Article
2 2  
3   - attr_accessible :limit, :enabled, :language, :include
  3 + attr_accessible :limit, :enabled, :language, :include, :feed_item_description
4 4  
5 5 def self.type_name
6 6 _('RssFeed')
... ...
app/models/slideshow_block.rb
... ... @@ -6,6 +6,8 @@ class SlideshowBlock &lt; Block
6 6 settings_items :navigation, :type => 'boolean', :default => false
7 7 settings_items :image_size, :type => 'string', :default => 'thumb'
8 8  
  9 + attr_accessible :gallery_id, :image_size, :interval, :shuffle, :navigation
  10 +
9 11 def self.description
10 12 _('Slideshow')
11 13 end
... ...
app/models/user.rb
... ... @@ -5,7 +5,7 @@ require &#39;user_activation_job&#39;
5 5 # Rails generator.
6 6 class User < ActiveRecord::Base
7 7  
8   - attr_accessible :login, :email, :password, :password_confirmation
  8 + attr_accessible :login, :email, :password, :password_confirmation, :activated_at
9 9  
10 10 N_('Password')
11 11 N_('Password confirmation')
... ...
app/presenters/image.rb
... ... @@ -11,4 +11,9 @@ class FilePresenter::Image &lt; FilePresenter
11 11 def short_description
12 12 _('Image (%s)') % content_type.split('/')[1].upcase
13 13 end
  14 +
  15 + #Overwriting method from FilePresenter to allow download of images
  16 + def download?(view = nil)
  17 + view.blank? || view == 'false'
  18 + end
14 19 end
... ...
app/views/account/_signup_form.html.erb
... ... @@ -136,8 +136,6 @@
136 136 <script type="text/javascript">
137 137 jQuery(function($) {
138 138  
139   - $('#signup-form #user_login').css('width', 335 - $('#signup-domain').outerWidth());
140   -
141 139 $('#signup-form input[type=text], #signup-form textarea').each(function() {
142 140 $(this).bind('blur', function() {
143 141 if ($(this).val() == '') {
... ...
app/views/blocks/my_network.html.erb
1 1 <%= block_title(title) %>
2 2  
3   -<%= render :file => 'blocks/my_network/' + owner.class.name.underscore, :locals => { :owner => owner } %>
  3 +<%= render_profile_actions owner.class %>
4 4  
5 5 <ul>
6 6 <li><%= link_to(_('Homepage'), owner.url, :class => 'url') %></li>
... ... @@ -11,5 +11,5 @@
11 11 </ul>
12 12  
13 13 <div class="my-network-actions">
14   - <%= render :file => 'blocks/profile_info_actions/' + owner.class.name.underscore %>
  14 + <%= render 'blocks/profile_info_actions/' + owner.class.name.underscore %>
15 15 </div>
... ...
app/views/blocks/profile_image.html.erb
... ... @@ -23,6 +23,6 @@
23 23 <% end %>
24 24  
25 25 <div class="profile-info-options">
26   - <%= render :file => view_for_profile_actions(block.owner.class) %>
  26 + <%= render_profile_actions block.owner.class %>
27 27 </div>
28 28 </div><!-- end class="vcard" -->
... ...
app/views/blocks/profile_info.html.erb
... ... @@ -40,7 +40,7 @@
40 40 <% end %>
41 41  
42 42 <div class="profile-info-options">
43   - <%= render :file => view_for_profile_actions(block.owner.class) %>
  43 + <%= render_profile_actions block.owner.class %>
44 44 </div>
45 45  
46 46 </div><!-- end class="vcard" -->
... ...
app/views/blocks/profile_info_actions/_community.html.erb 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +<ul>
  2 + <li>
  3 + <%= render "blocks/profile_info_actions/join_leave_community" %>
  4 + </li>
  5 + <% if logged_in? %>
  6 + <% if profile.enable_contact? %>
  7 + <li>
  8 + <%= link_to content_tag('span', _('Send an e-mail')),
  9 + { :profile => profile.identifier,
  10 + :controller => 'contact',
  11 + :action => 'new' },
  12 + {:class => 'button with-text icon-menu-mail', :title => _('Send an e-mail to the administrators')} %>
  13 + </li>
  14 + <% end %>
  15 +
  16 + <li><%= report_abuse(profile, :button) %></li>
  17 +
  18 + <%= render_environment_features(:profile_actions) %>
  19 + <% end %>
  20 +</ul>
... ...
app/views/blocks/profile_info_actions/_enterprise.html.erb 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +<ul>
  2 + <%if logged_in? %>
  3 + <%if !user.favorite_enterprises.include?(profile) %>
  4 + <li><%= link_to content_tag('span', _('Add as favorite')), { :profile => user.identifier, :controller => 'favorite_enterprises', :action => 'add', :id => profile.id }, :class => 'button with-text icon-add', :title => _('Add enterprise as favorite') %></li>
  5 + <% end %>
  6 + <% end %>
  7 + <% if profile.enable_contact? %>
  8 + <li> <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button', :class => 'button with-text icon-menu-mail'} %> </li>
  9 + <% end %>
  10 +
  11 + <li><%= report_abuse(profile, :button) %></li>
  12 +</ul>
... ...
app/views/blocks/profile_info_actions/_organization.html.erb 0 → 100644
app/views/blocks/profile_info_actions/_person.html.erb 0 → 100644
... ... @@ -0,0 +1,16 @@
  1 +<ul>
  2 + <%if logged_in? && (user != profile) %>
  3 +
  4 + <% if !user.already_request_friendship?(profile) and !user.is_a_friend?(profile) %>
  5 + <li>
  6 + <%= button(:add, content_tag('span', _('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %>
  7 + </li>
  8 + <% end %>
  9 +
  10 + <% if user.is_a_friend?(profile) && profile.enable_contact? %>
  11 + <li> <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %> </li>
  12 + <% end %>
  13 +
  14 + <li><%= report_abuse(profile, :button) %></li>
  15 + <% end %>
  16 +</ul>
... ...
app/views/blocks/profile_info_actions/community.html.erb
... ... @@ -1,20 +0,0 @@
1   -<ul>
2   - <li>
3   - <%= render "blocks/profile_info_actions/join_leave_community" %>
4   - </li>
5   - <% if logged_in? %>
6   - <% if profile.enable_contact? %>
7   - <li>
8   - <%= link_to content_tag('span', _('Send an e-mail')),
9   - { :profile => profile.identifier,
10   - :controller => 'contact',
11   - :action => 'new' },
12   - {:class => 'button with-text icon-menu-mail', :title => _('Send an e-mail to the administrators')} %>
13   - </li>
14   - <% end %>
15   -
16   - <li><%= report_abuse(profile, :button) %></li>
17   -
18   - <%= render_environment_features(:profile_actions) %>
19   - <% end %>
20   -</ul>
app/views/blocks/profile_info_actions/enterprise.html.erb
... ... @@ -1,12 +0,0 @@
1   -<ul>
2   - <%if logged_in? %>
3   - <%if !user.favorite_enterprises.include?(profile) %>
4   - <li><%= link_to content_tag('span', _('Add as favorite')), { :profile => user.identifier, :controller => 'favorite_enterprises', :action => 'add', :id => profile.id }, :class => 'button with-text icon-add', :title => _('Add enterprise as favorite') %></li>
5   - <% end %>
6   - <% end %>
7   - <% if profile.enable_contact? %>
8   - <li> <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, {:id => 'enterprise-contact-button', :class => 'button with-text icon-menu-mail'} %> </li>
9   - <% end %>
10   -
11   - <li><%= report_abuse(profile, :button) %></li>
12   -</ul>
app/views/blocks/profile_info_actions/organization.html.erb
app/views/blocks/profile_info_actions/person.html.erb
... ... @@ -1,16 +0,0 @@
1   -<ul>
2   - <%if logged_in? && (user != profile) %>
3   -
4   - <% if !user.already_request_friendship?(profile) and !user.is_a_friend?(profile) %>
5   - <li>
6   - <%= button(:add, content_tag('span', _('Add friend')), profile.add_url, :class => 'add-friend', :title => _("Add friend"), :style => 'position: relative;') %>
7   - </li>
8   - <% end %>
9   -
10   - <% if user.is_a_friend?(profile) && profile.enable_contact? %>
11   - <li> <%= link_to content_tag('span', _('Send an e-mail')), {:profile => profile.identifier, :controller => 'contact', :action => 'new'}, :class => 'button with-text icon-menu-mail' %> </li>
12   - <% end %>
13   -
14   - <li><%= report_abuse(profile, :button) %></li>
15   - <% end %>
16   -</ul>
app/views/box_organizer/_highlights_block.html.erb
  1 +<%= javascript_include_tag "highlight_block" %>
  2 +
1 3 <strong><%= _('Highlights') %></strong>
2 4  
3 5 <table class="noborder"><tbody id="highlights-data-table">
4 6 <tr><th><%= _('Image') %></th><th><%= _('Address') %></th><th><%= _('Position') %></th></tr>
5   - <% for image in @block.images do %>
6   - <%= highlights_block_config_image_fields @block, image %>
  7 + <% @block.images.each_with_index do |image, index| %>
  8 + <%= highlights_block_config_image_fields @block, image, index %>
7 9 <% end %>
8 10 </tbody></table>
9 11  
10   -<%= link_to_function(_('New highlight'), nil, :class => 'button icon-add with-text') do |page|
11   - page.insert_html :bottom, 'highlights-data-table', highlights_block_config_image_fields(@block)
12   -end %>
  12 +<table class="hidden highlight-table-row">
  13 + <tbody>
  14 + <%= highlights_block_config_image_fields(@block) %>
  15 + </tbody>
  16 +</table>
  17 +
  18 +<%= link_to(_('New highlight'), '#', :class => 'button icon-add with-text new-highlight-button')%>
13 19  
14 20 <%= labelled_form_field _('Image transition:'), select('block', 'interval', [[_('No automatic transition'), 0]] + [1, 2, 3, 4, 5, 10, 20, 30, 60].map {|item| [n_('Every 1 second', 'Every %d seconds', item) % item, item]}) %>
15 21  
... ...
app/views/cms/view.html.erb
... ... @@ -25,7 +25,9 @@
25 25 <div id='article-full-path'>
26 26 <strong><%= _('Current folder: ') %></strong>
27 27 <%= link_to profile.identifier, :action => 'index' %>
28   - <%= @article.hierarchy.map {|item| " / " + ((item == @article) ? item.name : link_to(item.slug, :id => item.id)) } %>
  28 + <% @article.hierarchy.each do |item| %>
  29 + <%= " / " + ((item == @article) ? item.name.html_safe : link_to(item.slug, :id => item.id).html_safe) %>
  30 + <% end %>
29 31 </div>
30 32 <% end %>
31 33  
... ...
app/views/comment/_comment_form.html.erb
... ... @@ -31,7 +31,7 @@ function check_captcha(button, confirm_action) {
31 31 return true;
32 32 <% else %>
33 33 jQuery('#recaptcha-container').show();
34   - jQuery.colorbox({ inline : true, href : '#recaptcha-container', maxWidth : '600px', maxHeight : '300px' });
  34 + jQuery.colorbox({ html: jQuery('#recaptcha-container').html(), maxWidth : '600px', maxHeight : '300px' });
35 35 jQuery('#confirm-captcha').unbind('click');
36 36 jQuery('#confirm-captcha').bind('click', function() {
37 37 jQuery.colorbox.close();
... ...
app/views/comment/notifier/notification.html.erb
... ... @@ -1,19 +0,0 @@
1   -<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
2   -
3   -<%= word_wrap(_('%{sender} (%{sender_link}) created a new comment on your article "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %>
4   -
5   -<%= word_wrap(_('Title: %s') % @comment_title) %>
6   -
7   -<%= _("Comment:") %>
8   --------------------------------------------------------------------------------
9   -<%= word_wrap(@comment_body) %>
10   --------------------------------------------------------------------------------
11   -
12   -<%= _('Access the address below to view this comment:') %>
13   -<%= url_for @comment_url %>
14   -
15   -<%= _("Greetings,") %>
16   -
17   ---
18   -<%= _('%s team.') % @environment %>
19   -<%= url_for @url %>
app/views/comment/notifier/notification.text.erb 0 → 100644
... ... @@ -0,0 +1,19 @@
  1 +<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
  2 +
  3 +<%= word_wrap(_('%{sender} (%{sender_link}) created a new comment on your article "%{article_title}".') % { :sender => @sender, :sender_link => url_for(@sender_link), :article_title => @article_title }) %>
  4 +
  5 +<%= word_wrap(_('Title: %s') % @comment_title) %>
  6 +
  7 +<%= _("Comment:") %>
  8 +-------------------------------------------------------------------------------
  9 +<%= word_wrap(@comment_body) %>
  10 +-------------------------------------------------------------------------------
  11 +
  12 +<%= _('Access the address below to view this comment:') %>
  13 +<%= url_for @comment_url %>
  14 +
  15 +<%= _("Greetings,") %>
  16 +
  17 +--
  18 +<%= _('%s team.') % @environment %>
  19 +<%= url_for @url %>
... ...
app/views/content_viewer/article_versions.html.erb
1 1 <div class="article-versions">
2   - <%= button(:back, _('Go back to latest version'), {:action => 'view_page'}) %>
  2 + <%= button(:back, _('Go back to latest version'), @page.url) %>
3 3 </div>
4 4  
5 5 <%= article_title(@page, :no_link => true) %>
6 6  
7 7 <p><%= _('This is the list of all versions of this content. Select a version to see it and then revert to it.') %>.</p>
8 8  
9   -<%= form_tag({:controller => 'content_viewer', :action => 'versions_diff', :profile => profile.identifier, :page => @page.path.split('/')}, :method => 'get') do %>
  9 +<%= form_tag({:controller => 'content_viewer', :action => 'versions_diff', :profile => profile.identifier, :page => @page.path}, :method => 'get') do %>
10 10 <ul id="article-versions">
11 11 <% @versions.each do |v| %>
12 12 <li>
... ...
app/views/content_viewer/blog_page.html.erb
... ... @@ -9,13 +9,15 @@
9 9 </div>
10 10 <hr class="pre-posts"/>
11 11 <div class="blog-posts">
  12 + <% paginate = true %>
12 13 <%=
13 14 posts = @posts
14 15 format = blog.visualization_format
15 16 if inside_block
16 17 posts = blog.posts.paginate(:page=>1, :per_page=>inside_block.posts_per_page)
17 18 format = inside_block.visualization_format
  19 + paginate = false
18 20 end
19   - (blog.empty? ? content_tag('em', _('(no posts)')) : list_posts(posts, format))
  21 + (blog.empty? ? content_tag('em', _('(no posts)')) : list_posts(posts, format, paginate))
20 22 %>
21 23 </div>
... ...
app/views/content_viewer/folder.html.erb
... ... @@ -8,5 +8,5 @@
8 8 <% if folder.children.empty? %>
9 9 <em><%= _('(empty folder)') %></em>
10 10 <% else %>
11   - <%= list_articles(folder.children) %>
  11 + <%= list_contents(:contents=>folder.children) %>
12 12 <% end %>
... ...
app/views/content_viewer/versioned_article.html.erb
... ... @@ -23,7 +23,6 @@
23 23 <p id="no-current-version">
24 24 <%= _('This is not the latest version of this content.') %>
25 25 </p>
26   -</div>
27 26  
28 27 <% version_license = @page.version_license(@version) %>
29 28 <%# This seemingly doubled verification exists because the article-sub-header
... ...
app/views/content_viewer/view_page.html.erb
... ... @@ -40,8 +40,6 @@
40 40 </div>
41 41 <% end %>
42 42  
43   -<%= render :partial => 'shared/disabled_enterprise' %>
44   -
45 43 <% if NOOSFERO_CONF['addthis_enabled'] %>
46 44 <%= render :partial => 'addthis' %>
47 45 <% end %>
... ...
app/views/pending_task_notifier/notification.html.erb
... ... @@ -1,25 +0,0 @@
1   -<%= _("Dear %s") % @person.name %>,
2   -
3   -<%= _("You have %d pending task(s).") % @tasks.size %>
4   -
5   -<%= @tasks.map{|i| " * #{i.description}"}.join("\n") %>
6   -
7   -<%= _("Click in address below to process task(s):") %>
8   -
9   -<%= @url_for_pending_tasks %>
10   -<% @organizations_with_pending_tasks.each do |organization| %>
11   -<% pending_tasks = @person.pending_tasks_for_organization(organization) %>
12   -<%= _("%s has %d pending task(s).") % [organization.name, pending_tasks.size] %>
13   -
14   -<%= pending_tasks.map{|i| " * #{i.information}"}.join("\n") %>
15   -
16   -<%= _("Click in address below to process task(s):") %>
17   -
18   -<%= url_for(:host => @default_hostname, :controller => 'tasks', :profile => organization.identifier) %>
19   -<% end %>
20   -
21   -<%= _('Greetings,') %>
22   -
23   ---
24   -<%= _('%s team.') % @environment %>
25   -<%= @url %>
app/views/pending_task_notifier/notification.text.erb 0 → 100644
... ... @@ -0,0 +1,25 @@
  1 +<%= _("Dear %s") % @person.name %>,
  2 +
  3 +<%= _("You have %d pending task(s).") % @tasks.size %>
  4 +
  5 +<%= @tasks.map{|i| " * #{i.description}"}.join("\n") %>
  6 +
  7 +<%= _("Click in address below to process task(s):") %>
  8 +
  9 +<%= @url_for_pending_tasks %>
  10 +<% @organizations_with_pending_tasks.each do |organization| %>
  11 +<% pending_tasks = @person.pending_tasks_for_organization(organization) %>
  12 +<%= _("%s has %d pending task(s).") % [organization.name, pending_tasks.size] %>
  13 +
  14 +<%= pending_tasks.map{|i| " * #{i.information}"}.join("\n") %>
  15 +
  16 +<%= _("Click in address below to process task(s):") %>
  17 +
  18 +<%= url_for(:host => @default_hostname, :controller => 'tasks', :profile => organization.identifier) %>
  19 +<% end %>
  20 +
  21 +<%= _('Greetings,') %>
  22 +
  23 +--
  24 +<%= _('%s team.') % @environment %>
  25 +<%= @url %>
... ...
app/views/profile/index.html.erb
1   -<%= render :partial => 'shared/disabled_enterprise' %>
2   -
3 1 <h1><%= h profile.name %></h1>
4 2  
5 3 <% if @action %>
... ... @@ -19,7 +17,7 @@
19 17 <table class='profile'>
20 18 <tr>
21 19 <td colspan='2'>
22   - <% plugins_tabs = @plugins.dispatch(:profile_tabs).map { |tab| {:title => tab[:title], :id => tab[:id], :content => instance_exec(&tab[:content]), :start => tab[:title]} }%>
  20 + <% plugins_tabs = @plugins.dispatch(:profile_tabs).map { |tab| {:title => tab[:title], :id => tab[:id], :content => instance_exec(&tab[:content]), :start => tab[:start]} }%>
23 21  
24 22 <% tabs = plugins_tabs.select { |tab| tab[:start] } %>
25 23  
... ...
app/views/profile/sitemap.html.erb
1 1 <h1><%= _("%s: site map") % profile.name %></h1>
2 2  
3   -<%= list_articles(available_articles(@articles, user), false) %>
  3 +<%= list_contents :contents=>available_articles(@articles, user), :list_type=>:sitemap %>
... ...
app/views/profile_editor/index.html.erb
... ... @@ -24,7 +24,7 @@
24 24  
25 25 <%= control_panel_button(_('Edit Appearance'), 'design-editor', :controller => 'profile_themes', :action => 'index') %>
26 26  
27   - <%= control_panel_button(_('Edit Header and Footer'), 'header-and-footer', :controller => 'profile_editor', :action => 'header_footer') unless profile.enterprise? && environment.enabled?('disable_header_and_footer') && !user.is_admin?(environment) %>
  27 + <%= control_panel_button(_('Edit Header and Footer'), 'header-and-footer', :controller => 'profile_editor', :action => 'header_footer') if user.is_admin?(environment) || (!profile.enterprise? && !environment.enabled?('disable_header_and_footer')) %>
28 28  
29 29 <%= control_panel_button(_('Manage Content'), 'cms', :controller => 'cms') %>
30 30  
... ...
app/views/scrap/notifier/notification.html.erb
... ... @@ -1,16 +0,0 @@
1   -<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
2   -
3   -<%= word_wrap(_('%{sender} (%{sender_link}) has left the following scrap for you:') % { :sender => @sender, :sender_link => url_for(@sender_link) }) %>
4   -
5   --------------------------------------------------------------------------------
6   -<%= word_wrap(@scrap_content) %>
7   --------------------------------------------------------------------------------
8   -
9   -<%= _('View this scrap on the wall') %>:
10   -<%= url_for @wall_url %>
11   -
12   -<%= _("Greetings,") %>
13   -
14   ---
15   -<%= _('%s team.') % @environment %>
16   -<%= url_for @url %>
app/views/scrap/notifier/notification.text.erb 0 → 100644
... ... @@ -0,0 +1,16 @@
  1 +<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
  2 +
  3 +<%= word_wrap(_('%{sender} (%{sender_link}) has left the following scrap for you:') % { :sender => @sender, :sender_link => url_for(@sender_link) }) %>
  4 +
  5 +-------------------------------------------------------------------------------
  6 +<%= word_wrap(@scrap_content) %>
  7 +-------------------------------------------------------------------------------
  8 +
  9 +<%= _('View this scrap on the wall') %>:
  10 +<%= url_for @wall_url %>
  11 +
  12 +<%= _("Greetings,") %>
  13 +
  14 +--
  15 +<%= _('%s team.') % @environment %>
  16 +<%= url_for @url %>
... ...
app/views/shared/_disabled_enterprise.html.erb
... ... @@ -1,10 +0,0 @@
1   -<% if profile.enterprise? && !profile.enabled? && !profile.blocks.select {|b| b.class == DisabledEnterpriseMessageBlock}.any? %>
2   - <div id='profile-disabled'>
3   - <%= environment.message_for_disabled_enterprise %>
4   - <% if profile.blocked? && user && user.is_admin?(profile.environment) %>
5   - <div class='unlock-button'>
6   - <%= button :lock, _('Unblock'), {:controller => 'profile', :action => 'unblock'} %>
7   - </div>
8   - <% end %>
9   - </div>
10   -<% end %>
app/views/shared/_manage_link.html.erb
1 1 <div id=<%= "manage-#{kind}" %> class="manage-groups">
2   - <a href="#" id=<%= "manage-#{kind}-link" %> class="simplemenu-trigger" title="<%= _('Manage %s') % kind %>"><i class=<%= "icon-menu-#{kind.singularize}" %>></i><strong><%= ui_icon('ui-icon-triangle-1-s') + _('My %s') % kind %></strong></a>
  2 + <a href="#" id=<%= "manage-#{kind}-link" %> class="simplemenu-trigger" title="<%= _('Manage %s') % _(kind) %>"><i class=<%= "icon-menu-#{kind.singularize}" %>></i><strong><%= ui_icon('ui-icon-triangle-1-s') + title %></strong></a>
3 3 <ul class="simplemenu-submenu">
4 4 <% link.each do |link| %>
5 5 <li class="simplemenu-item"><%= link %></li>
... ...
app/views/shared/articles_list.html.erb
... ... @@ -1,14 +0,0 @@
1   -<table>
2   -
3   - <tr>
4   - <th><%= _('Title') %></th>
5   - <th><%= _('Last update') %></th>
6   - </tr>
7   - <% articles.each do |article| %>
8   - <% if article.display_to?(user) %>
9   - <%= display_article_in_listing(article, recursive, 0) %>
10   - <% end %>
11   - <% end %>
12   -</table>
13   -
14   -<p><%= pagination_links(articles, {:param_name => 'npage', :page_links => true}) %></p>
app/views/shared/content_list.html.erb 0 → 100644
... ... @@ -0,0 +1,13 @@
  1 +<table class="<%= list_type %>-content">
  2 + <tr>
  3 + <th><%= _('Title') %></th>
  4 + <th><%= _('Last update') %></th>
  5 + </tr>
  6 + <% contents.each do |content| %>
  7 + <% if content.display_to?(user) %>
  8 + <%= display_content_in_listing :content=>content, :list_type=>list_type, :recursive=>recursive %>
  9 + <% end %>
  10 + <% end %>
  11 +</table>
  12 +
  13 +<p><%= pagination_links contents, :param_name => 'npage', :page_links => true %></p>
... ...
app/views/task_mailer/invitation_notification.html.erb
... ... @@ -1 +0,0 @@
1   -<%= @message %>
2 0 \ No newline at end of file
app/views/task_mailer/invitation_notification.text.erb 0 → 100644
... ... @@ -0,0 +1 @@
  1 +<%= @message %>
0 2 \ No newline at end of file
... ...
app/views/task_mailer/target_notification.html.erb
... ... @@ -1,10 +0,0 @@
1   -<%= _('Hello %s,') % @target %>
2   -
3   -<%= word_wrap(@message) %>
4   -
5   -<%= word_wrap(_('Access your list of tasks or your control panel to see this and other pending actions that need your attention.')) %>
6   -<%= @tasks_url %>
7   -
8   ---
9   -<%= _('%s team.') % @environment %>
10   -<%= @url %>
app/views/task_mailer/target_notification.text.erb 0 → 100644
... ... @@ -0,0 +1,10 @@
  1 +<%= _('Hello %s,') % @target %>
  2 +
  3 +<%= word_wrap(@message) %>
  4 +
  5 +<%= word_wrap(_('Access your list of tasks or your control panel to see this and other pending actions that need your attention.')) %>
  6 +<%= @tasks_url %>
  7 +
  8 +--
  9 +<%= _('%s team.') % @environment %>
  10 +<%= @url %>
... ...
app/views/task_mailer/task_activated.text.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +task_cancelled.text.erb
0 2 \ No newline at end of file
... ...
app/views/task_mailer/task_activated.text.plain.html.erb
... ... @@ -1 +0,0 @@
1   -task_cancelled.text.plain.html.erb
2 0 \ No newline at end of file
app/views/task_mailer/task_cancelled.text.erb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<%= _('Dear %s,') % @requestor %>
  2 +
  3 +<%= word_wrap(@message) %>
  4 +
  5 +<%= _('Greetings,') %>
  6 +
  7 +--
  8 +<%= _('%s team.') % @environment %>
  9 +<%= @url %>
... ...
app/views/task_mailer/task_cancelled.text.plain.html.erb
... ... @@ -1,9 +0,0 @@
1   -<%= _('Dear %s,') % @requestor %>
2   -
3   -<%= word_wrap(@message) %>
4   -
5   -<%= _('Greetings,') %>
6   -
7   ---
8   -<%= _('%s team.') % @environment %>
9   -<%= @url %>
app/views/task_mailer/task_created.text.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +task_cancelled.text.erb
0 2 \ No newline at end of file
... ...
app/views/task_mailer/task_created.text.plain.html.erb
... ... @@ -1 +0,0 @@
1   -task_cancelled.text.plain.html.erb
2 0 \ No newline at end of file
app/views/task_mailer/task_finished.text.erb 0 → 120000
... ... @@ -0,0 +1 @@
  1 +task_cancelled.text.erb
0 2 \ No newline at end of file
... ...
app/views/task_mailer/task_finished.text.plain.html.erb
... ... @@ -1 +0,0 @@
1   -task_cancelled.text.plain.html.erb
2 0 \ No newline at end of file
app/views/user_mailer/activation_code.html.erb
... ... @@ -1,9 +0,0 @@
1   -<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
2   -
3   -<%= word_wrap(_('Welcome to %{environment}! To activate your account, follow the link: %{activation_url}') % { :environment => @environment, :activation_url => @url + url_for(:controller => :account, :action => :activate, :activation_code => @activation_code, :redirection => @redirection, :join => @join) }) %>
4   -
5   -<%= _("Greetings,") %>
6   -
7   ---
8   -<%= _('%s team.') % @environment %>
9   -<%= url_for @url %>
app/views/user_mailer/activation_code.text.erb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +<%= _('Hi, %{recipient}!') % { :recipient => @recipient } %>
  2 +
  3 +<%= word_wrap(_('Welcome to %{environment}! To activate your account, follow the link: %{activation_url}') % { :environment => @environment, :activation_url => @url + url_for(:controller => :account, :action => :activate, :activation_code => @activation_code, :redirection => @redirection, :join => @join) }) %>
  4 +
  5 +<%= _("Greetings,") %>
  6 +
  7 +--
  8 +<%= _('%s team.') % @environment %>
  9 +<%= url_for @url %>
... ...
app/views/user_mailer/activation_email_notify.html.erb
... ... @@ -1,12 +0,0 @@
1   -<%= _('Hello %s,') % @name %>
2   -
3   -<%= _('Your email %s was just activated.') % [@email] %>
4   -
5   -<%= _('You can access your e-mail from anywhere, using the following address:') %>
6   -<%= @webmail %>
7   -
8   -<%= _('Greetings,') %>
9   -
10   ---
11   -<%= _('%s team.') % @environment %>
12   -<%= @url %>
app/views/user_mailer/activation_email_notify.text.erb 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +<%= _('Hello %s,') % @name %>
  2 +
  3 +<%= _('Your email %s was just activated.') % [@email] %>
  4 +
  5 +<%= _('You can access your e-mail from anywhere, using the following address:') %>
  6 +<%= @webmail %>
  7 +
  8 +<%= _('Greetings,') %>
  9 +
  10 +--
  11 +<%= _('%s team.') % @environment %>
  12 +<%= @url %>
... ...
baseplugins/README 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +Plugins in this directory are enabled by default, and cannot be disabled at the
  2 +system level. Each environment admistrator can still disable it in the web UI,
  3 +though.
... ...
baseplugins/people_block 0 → 120000
... ... @@ -0,0 +1 @@
  1 +../plugins/people_block
0 2 \ No newline at end of file
... ...
config/environment.rb
1 1 # Load the rails application
2 2 require File.expand_path('../application', __FILE__)
3 3  
  4 +#FIXME Necessary hack to avoid the need of downgrading rubygems on rails 2.3.5
  5 +# http://stackoverflow.com/questions/5564251/uninitialized-constant-activesupportdependenciesmutex
  6 +require 'thread'
  7 +
4 8 # Uncomment below to force Rails into production mode when
5 9 # you don't control web/app server and can't set it the proper way
6 10 #ENV['RAILS_ENV'] ||= 'production'
... ...
config/initializers/exception_notification.rb
1 1 unless NOOSFERO_CONF['exception_recipients'].blank?
2   - require 'noosfero.rb'
3   - require 'exception_notification.rb'
4   - ExceptionNotifier.sender_address = "noreply@#{Noosfero.default_hostname}"
5   - ExceptionNotifier.email_prefix = "[Noosfero ERROR] "
6   - ExceptionNotifier.exception_recipients = NOOSFERO_CONF['exception_recipients']
7   - ActionController::Base.send :include, ExceptionNotifiable
  2 + Noosfero::Application.config.middleware.use ExceptionNotification::Rack,
  3 + :email => {
  4 + :sender_address => "noreply@#{Noosfero.default_hostname}",
  5 + :email_prefix => "[Noosfero ERROR] ",
  6 + :exception_recipients => NOOSFERO_CONF['exception_recipients']
  7 + }
8 8 end
... ...
config/plugins/people_block
... ... @@ -1 +0,0 @@
1   -../../plugins/people_block
2 0 \ No newline at end of file
config/routes.rb
... ... @@ -131,7 +131,7 @@ Noosfero::Application.routes.draw do
131 131 match ':profile/*page/versions', :controller => 'content_viewer', :action => 'article_versions', :profile => /#{Noosfero.identifier_format}/, :constraints => EnvironmentDomainConstraint.new
132 132 match '*page/versions', :controller => 'content_viewer', :action => 'article_versions'
133 133  
134   - match ':profile/*page/versions_diff', :controller => 'content_viewer', :action => 'versions_diff', :profile => /#{Noosfero.identifier_format}/, :conditions => { :if => lambda { |env| !Domain.hosting_profile_at(env[:host]) } }
  134 + match ':profile/*page/versions_diff', :controller => 'content_viewer', :action => 'versions_diff', :profile => /#{Noosfero.identifier_format}/, :constraints => EnvironmentDomainConstraint.new
135 135 match '*page/versions_diff', :controller => 'content_viewer', :action => 'versions_diff'
136 136  
137 137 # match requests for profiles that don't have a custom domain
... ...
db/migrate/20140501171906_index_filtered_fields_on_task.rb 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +class IndexFilteredFieldsOnTask < ActiveRecord::Migration
  2 + def self.up
  3 + add_index :tasks, :requestor_id
  4 + add_index :tasks, :target_id
  5 + add_index :tasks, :target_type
  6 + add_index :tasks, [:target_id, :target_type]
  7 + add_index :tasks, :status
  8 + end
  9 +
  10 + def self.down
  11 + remove_index :tasks, :requestor_id
  12 + remove_index :tasks, :target_id
  13 + remove_index :tasks, :target_type
  14 + remove_index :tasks, [:target_id, :target_type]
  15 + remove_index :tasks, :status
  16 + end
  17 +end
... ...
db/migrate/20140709212646_add_spam_comments_counter_cache_to_articles.rb 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +class AddSpamCommentsCounterCacheToArticles < ActiveRecord::Migration
  2 + def self.up
  3 + add_column :articles, :spam_comments_count, :integer, :default => 0
  4 + add_column :article_versions, :spam_comments_count, :integer, :default => 0
  5 + execute "update articles set spam_comments_count = (select count(*) from comments where comments.source_id = articles.id and comments.source_type = 'Article' and comments.spam = 't');"
  6 + end
  7 +
  8 + def self.down
  9 + remove_column :articles, :spam_comments_count
  10 + remove_column :article_versions, :spam_comments_count
  11 + end
  12 +end
... ...
db/migrate/20140709224246_create_real_relation_between_article_and_author.rb 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +class CreateRealRelationBetweenArticleAndAuthor < ActiveRecord::Migration
  2 + def self.up
  3 + add_column :articles, :author_id, :integer
  4 + add_column :article_versions, :author_id, :integer
  5 +
  6 + # Set article's author as the first version's last_changed_by_id.
  7 + execute "update articles set author_id = (select article_versions.last_changed_by_id from article_versions where article_versions.article_id = articles.id and article_versions.version = 1 limit 1)"
  8 + end
  9 +
  10 + def self.down
  11 + remove_column :articles, :author_id
  12 + remove_column :article_versions, :author_id
  13 + end
  14 +end
... ...
db/migrate/20140724134601_fix_yaml_encoding.rb 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +class FixYamlEncoding < ActiveRecord::Migration
  2 + def self.up
  3 + fix_encoding(Block, 'settings')
  4 + fix_encoding(Product, 'data')
  5 + fix_encoding(Environment, 'settings')
  6 + fix_encoding(Profile, 'data')
  7 + fix_encoding(ActionTracker::Record, 'params')
  8 + fix_encoding(Article, 'setting')
  9 + end
  10 +
  11 + def self.down
  12 + puts "Warning: cannot restore original encoding"
  13 + end
  14 +
  15 + private
  16 +
  17 + def self.fix_encoding(model, param)
  18 + result = model.find(:all, :conditions => "#{param} LIKE '%!binary%'")
  19 + puts "Fixing #{result.count} rows of #{model} (#{param})"
  20 + result.each {|r| r.update_column(param, deep_fix(r.send(param)).to_yaml)}
  21 + end
  22 +
  23 + def self.deep_fix(hash)
  24 + hash.each do |value|
  25 + value.force_encoding('UTF-8') if value.is_a?(String) && !value.frozen? && value.encoding == Encoding::ASCII_8BIT
  26 + deep_fix(value) if value.respond_to?(:each)
  27 + end
  28 + end
  29 +
  30 +end
... ...
db/migrate/20140808185510_update_default_tagging_context.rb 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +class UpdateDefaultTaggingContext < ActiveRecord::Migration
  2 +
  3 + def self.up
  4 + ActsAsTaggableOn::Tagging.where(:taggable_type => Article, :context => nil).update_all(:context => 'tags')
  5 + end
  6 +
  7 + def self.down
  8 + ActsAsTaggableOn::Tagging.where(:taggable_type => Article, :context => 'tags').update_all(:context => nil)
  9 + end
  10 +
  11 +end
... ...
db/schema.rb
... ... @@ -96,6 +96,8 @@ ActiveRecord::Schema.define(:version =&gt; 20140811141211) do
96 96 t.integer "image_id"
97 97 t.integer "position"
98 98 t.integer "created_by_id"
  99 + t.integer "spam_comments_count", :default => 0
  100 + t.integer "author_id"
99 101 end
100 102  
101 103 add_index "article_versions", ["article_id"], :name => "index_article_versions_on_article_id"
... ... @@ -142,6 +144,8 @@ ActiveRecord::Schema.define(:version =&gt; 20140811141211) do
142 144 t.integer "image_id"
143 145 t.integer "position"
144 146 t.integer "created_by_id"
  147 + t.integer "spam_comments_count", :default => 0
  148 + t.integer "author_id"
145 149 end
146 150  
147 151 add_index "articles", ["comments_count"], :name => "index_articles_on_comments_count"
... ... @@ -644,7 +648,12 @@ ActiveRecord::Schema.define(:version =&gt; 20140811141211) do
644 648 t.boolean "spam", :default => false
645 649 end
646 650  
  651 + add_index "tasks", ["requestor_id"], :name => "index_tasks_on_requestor_id"
647 652 add_index "tasks", ["spam"], :name => "index_tasks_on_spam"
  653 + add_index "tasks", ["status"], :name => "index_tasks_on_status"
  654 + add_index "tasks", ["target_id", "target_type"], :name => "index_tasks_on_target_id_and_target_type"
  655 + add_index "tasks", ["target_id"], :name => "index_tasks_on_target_id"
  656 + add_index "tasks", ["target_type"], :name => "index_tasks_on_target_type"
648 657  
649 658 create_table "terms_forum_people", :id => false, :force => true do |t|
650 659 t.integer "forum_id"
... ...
debian/changelog
  1 +noosfero (1.0~rc1) wheezy-test; urgency=low
  2 +
  3 + * First 1.0 release candidate
  4 +
  5 + -- Rodrigo Souto <vagrant@wheezy-base> Fri, 15 Aug 2014 16:35:35 -0300
  6 +
1 7 noosfero (0.99.0~rc20140618202455) wheezy-test; urgency=low
2 8  
3 9 * Another rc with rails3
4 10  
5 11 -- Rodrigo Souto <rodrigo@colivre.coop.br> Wed, 18 Jun 2014 20:25:01 +0000
6 12  
  13 +noosfero (0.47.3) unstable; urgency=low
  14 +
  15 + * Bugfixes release
  16 +
  17 + -- Daniela Soares Feitosa <daniela@colivre.coop.br> Fri, 20 Jun 2014 03:13:29 +0000
  18 +
  19 +noosfero (0.47.2) unstable; urgency=low
  20 +
  21 + * Bugfix release
  22 +
  23 + -- Rodrigo Souto <rodrigo@colivre.coop.br> Fri, 13 Jun 2014 15:19:28 +0000
  24 +
7 25 noosfero (0.47.1) unstable; urgency=low
8 26  
9 27 * Bugfix release
... ...