Commit ebb39b44448f1d353ad220e6210923b9bec4e5a8
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'master' into rails3_chat
Conflicts: app/helpers/layout_helper.rb public/javascripts/application.js public/stylesheets/application.css
Showing
787 changed files
with
93380 additions
and
134031 deletions
Show diff stats
Too many changes.
To preserve performance only 100 of 787 files displayed.
.ackrc
AUTHORS
... | ... | @@ -1,251 +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 <junior@sedeantigo.colivre.coop.br> | |
174 | -Junior Silva <juniorsilva1001@gmail.com> | |
175 | -Junior Silva <juniorsilva7@juniorsilva-Aspire-5750Z.(none)> | |
176 | -Junior Silva <juniorsilva@colivre.coop.br> | |
177 | -juniorsilva <juniorsilva@QonoS.localhost.localdomain> | |
178 | -Keilla Menezes <keilla@colivre.coop.br> | |
179 | -Larissa Reis <larissa@colivre.coop.br> | |
180 | -Larissa Reis <reiss.larissa@gmail.com> | |
181 | -Leandro Nunes dos Santos <81665687568@serpro-1541727.Home> | |
182 | -Leandro Nunes dos Santos <81665687568@serpro-1541727.(none)> | |
183 | -Leandro Nunes dos Santos <leandronunes@gmail.com> | |
184 | -Leandro Nunes dos Santos <leandro.santos@serpro.gov.br> | |
185 | -LinguÁgil 2010 <linguagil.bahia@gmail.com> | |
186 | -Lucas Melo <lucas@colivre.coop.br> | |
187 | -Lucas Melo <lucaspradomelo@gmail.com> | |
188 | -Luciano <lucianopcbr@gmail.com> | |
189 | -Luis David Aguilar Carlos <ludwig9003@gmail.com> | |
190 | -Luiz Fernando de Freitas Matos <luiz@luizff.matos@gmail.com> | |
191 | -Marcos Ramos <ms.ramos@outlook.com> | |
192 | -Martín Olivera <molivera@solar.org.ar> | |
193 | -Moises Machado <moises@colivre.coop.br> | |
194 | -Naíla Alves <naila@colivre.coop.br> | |
195 | -Nanda Lopes <nanda.listas+psl@gmail.com> | |
196 | -Paulo Meirelles + Alessandro Palmeira + João M. M. da Silva <paulo@softwarelivre.org> | |
197 | -Paulo Meirelles + Alessandro Palmeira <paulo@softwarelivre.org> | |
198 | -Paulo Meirelles + Carlos Morais <paulo@softwarelivre.org> | |
199 | -Paulo Meirelles + Diego Araújo <paulo@softwarelivre.org> | |
200 | -Paulo Meirelles + João M. M. da Silva <paulo@softwarelivre.org> | |
201 | -Paulo Meirelles <paulo@softwarelivre.org> | |
202 | -Paulo Meirelles + Rafael Manzo <paulo@softwarelivre.org> | |
203 | -Rafael Gomes <rafaelgomes@techfree.com.br> | |
204 | -Rafael Manzo + Alessandro Palmeira <rr.manzo@gmail.com> | |
205 | -Rafael Manzo + Daniel Alves <danpaulalves@gmail.com> | |
206 | -Rafael Manzo + Diego Araújo <rr.manzo@gmail.com> | |
207 | -Rafael Manzo + João M. M. Silva <rr.manzo@gmail.com> | |
208 | -Rafael Manzo + Paulo Meirelles <rr.manzo@gmail.com> | |
209 | -Rafael Martins <rmmartins@gmail.com> | |
210 | -Rafael Reggiani Manzo + Caio Salgado + Jefferson Fernandes <rr.manzo@gmail.com> | |
211 | -Rafael Reggiani Manzo + Diego Araujo <diegoamc90@gmail.com> | |
212 | -Rafael Reggiani Manzo + Diego Araujo <rr.manzo@gmail.com> | |
213 | -Rafael Reggiani Manzo + Diego Araújo <rr.manzo@gmail.com> | |
214 | -Rafael Reggiani Manzo + João M. M. da Silva <rr.manzo@gmail.com> | |
215 | -Rafael Reggiani Manzo <rr.manzo@gmail.com> | |
216 | -Raphaël Rousseau <raph@r4f.org> | |
217 | -Raquel Lira <raquel.lira@gmail.com> | |
218 | -Renan Teruo + Caio Salgado <renanteruoc@gmail.com> | |
219 | -Renan Teruoc + Diego Araujo <renanteruoc@gmail.com> | |
220 | -Renan Teruo + Diego Araujo <renanteruoc@gmail.com> | |
221 | -Renan Teruo + Diego Araújo <renanteruoc@gmail.com> | |
222 | -Renan Teruo + Paulo Meirelles <renanteruoc@gmail.com> | |
223 | -Renan Teruo + Rafael Manzo <renanteruoc@gmail.com> | |
224 | -Rodrigo Souto + Ana Losnak + Daniel Bucher + Caio Almeida + Leandro Nunes + Daniela Feitosa + Mariel Zasso <noosfero-br@listas.softwarelivre.org> | |
225 | -Rodrigo Souto <diguliu@gmail.com> | |
226 | -Rodrigo Souto <rodrigo@colivre.coop.br> | |
227 | -Ronny Kursawe <kursawe.ronny@googlemail.com> | |
228 | -root <root@debian.sdr.serpro> | |
229 | -Samuel R. C. Vale <srcvale@holoscopio.com> | |
230 | -Valessio Brito <contato@valessiobrito.com.br> | |
231 | -Valessio Brito <contato@valessiobrito.info> | |
232 | -Valessio Brito <valessio@gmail.com> | |
233 | -vfcosta <vfcosta@gmail.com> | |
234 | -Victor Carvalho <victorhugodf.ac@gmail.com> | |
235 | -Victor Costa <vfcosta@gmail.com> | |
236 | -Victor Hugo Alves de Carvalho <victorhugodf.ac@gmail.com> | |
237 | -Vinicius Cubas Brand <viniciuscb@gmail.com> | |
238 | -Visita <visita@debian.(none)> | |
239 | -Yann Lugrin <yann.lugrin@liquid-concept.ch> | |
240 | - | |
241 | -Ideas, specifications and incentive | |
242 | -=================================== | |
243 | -Daniel Tygel <dtygel@fbes.org.br> | |
244 | -Guilherme Rocha <guilherme@gf7.com.br> | |
245 | -Raphael Rousseau <raph@r4f.org> | |
246 | -Théo Bondolfi <move@cooperation.net> | |
247 | -Vicente Aguiar <vicenteaguiar@colivre.coop.br> | |
248 | - | |
249 | -Arts | |
250 | -=================================== | |
251 | -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,13 @@ Alessandro Palmeira + João M. M. Silva <alessandro.palmeira@gmail.com> |
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> | |
44 | +Andre Bernardes <andrebsguedes@gmail.com> | |
38 | 45 | Antonio Terceiro + Carlos Morais <terceiro@colivre.coop.br> |
39 | 46 | Antonio Terceiro + Paulo Meirelles <terceiro@colivre.coop.br> |
40 | 47 | Antonio Terceiro <terceiro@colivre.coop.br> |
48 | +Arthur Del Esposte <arthurmde@gmail.com> | |
49 | +Arthur Del Esposte <arthurmde@yahoo.com.br> | |
41 | 50 | Aurelio A. Heckert <aurelio@colivre.coop.br> |
42 | 51 | Braulio Bhavamitra <brauliobo@gmail.com> |
43 | 52 | Bráulio Bhavamitra <brauliobo@gmail.com> |
... | ... | @@ -65,11 +74,14 @@ Caio Salgado + Renan Teruo <caio.salgado@gmail.com> |
65 | 74 | Caio Salgado + Renan Teruo + Jefferson Fernandes <jeffs.fernandes@gmail.com> |
66 | 75 | Caio Salgado + Renan Teruo <renanteruoc@gmail.com> |
67 | 76 | Caio SBA <caio@colivre.coop.br> |
77 | +Caio Tiago Oliveira <caiotiago@colivre.coop.br> | |
78 | +Carlos Andre de Souza <carlos.andre.souza@msn.com> | |
68 | 79 | Carlos Morais <carlos88morais@gmail.com> |
69 | 80 | Carlos Morais + Diego Araújo <diegoamc90@gmail.com> |
70 | 81 | Carlos Morais + Eduardo Morais <carlos88morais@gmail.com> |
71 | 82 | Carlos Morais + Paulo Meirelles <carlos88morais@gmail.com> |
72 | 83 | Carlos Morais + Pedro Leal <carlos88morais@gmail.com> |
84 | +Daniela Feitosa <dani@dohko.(none)> | |
73 | 85 | Daniel Alves + Diego Araújo <danpaulalves@gmail.com> |
74 | 86 | Daniel Alves + Diego Araújo <diegoamc90@gmail.com> |
75 | 87 | Daniel Alves + Diego Araújo + Guilherme Rojas <danpaulalves@gmail.com> |
... | ... | @@ -78,7 +90,9 @@ Daniel Alves + Diego Araújo + Guilherme Rojas <guilhermehrojas@gmail.com> |
78 | 90 | Daniel Alves + Guilherme Rojas <danpaulalves@gmail.com> |
79 | 91 | Daniel Alves + Rafael Manzo <rr.manzo@gmail.com> |
80 | 92 | Daniela Soares Feitosa <danielafeitosa@colivre.coop.br> |
93 | +Daniel Bucher <daniel.bucher88@gmail.com> | |
81 | 94 | Daniel Cunha <daniel@colivre.coop.br> |
95 | +David Carlos <ddavidcarlos1392@gmail.com> | |
82 | 96 | diegoamc <diegoamc90@gmail.com> |
83 | 97 | Diego Araújo + Alessandro Palmeira <diegoamc90@gmail.com> |
84 | 98 | Diego Araújo + Alessandro Palmeira + João M. M. da Silva <diegoamc90@gmail.com> |
... | ... | @@ -107,15 +121,26 @@ Diego + Jefferson <diegoamc90@gmail.com> |
107 | 121 | Diego Martinez <diegoamc90@gmail.com> |
108 | 122 | Diego Martinez <diego@diego-K55A.(none)> |
109 | 123 | Diego + Renan <renanteruoc@gmail.com> |
124 | +Eduardo Tourinho Edington <eduardo.edington@serpro.gov.br> | |
125 | +Evandro Jr <evandrojr@gmail.com> | |
126 | +Evandro Junior <evandrojr@gmail.com> | |
127 | +Fabio Teixeira <fabio1079@gmail.com> | |
110 | 128 | Fernanda Lopes <nanda.listas+psl@gmail.com> |
111 | 129 | Francisco Marcelo A. Lima Júnior <francisco.lima-junior@serpro.gov.br> |
112 | 130 | Francisco Marcelo de Araujo Lima Junior <79350259591@serpro-1457614.(none)> |
131 | +Francisco Marcelo de Araújo Lima Júnior <francisco.lima-junior@serpro.gov.br> | |
132 | +Francisco Marcelo de Araújo Lima Júnior <maljunior@gmail.com> | |
133 | +Gabriela Navarro <navarro1703@gmail.com> | |
113 | 134 | Grazieno Pellegrino <grazieno@gmail.com> |
135 | +Gust <darksshades@hotmail.com> | |
136 | +Hebert Douglas <hebertdougl@gmail.com> | |
137 | +Hugo Melo <hugo@riseup.net> | |
114 | 138 | Isaac Canan <isaac@intelletto.com.br> |
115 | 139 | Italo Valcy <italo@dcc.ufba.br> |
116 | 140 | Jefferson Fernandes + Diego Araujo + Rafael Manzo <jeffs.fernandes@gmail.com> |
117 | 141 | Jefferson Fernandes + Joao M. M. da Silva <jeffs.fernandes@gmail.com> |
118 | 142 | Jefferson Fernandes + Joao M. M. Silva <jeffs.fernandes@gmail.com> |
143 | +João da Silva + Eduardo Morais + Rafael Manzo <rr.manzo@gmail.com> | |
119 | 144 | João da Silva <jaodsilv@linux.ime.usp.br> |
120 | 145 | João Marco Maciel da Silva + Rafael Manzo + Renan Teruo <jaodsilv@linux.ime.usp.br> |
121 | 146 | João M. M. da Silva + Alessandro Palmeira + Diego Araújo + Caio Salgado <jaodsilv@linux.ime.usp.br> |
... | ... | @@ -146,17 +171,29 @@ João M. M. Silva + Rafael Manzo <jaodsilv@linux.ime.usp.br> |
146 | 171 | João M. M. Silva + Renan Teruo <jaodsilv@linux.ime.usp.br> |
147 | 172 | Joenio Costa <joenio@colivre.coop.br> |
148 | 173 | Josef Spillner <josef.spillner@tu-dresden.de> |
174 | +Jose Pedro <1jpsneto@gmail.com> | |
175 | +Junior Silva <junior@bajor.localhost.localdomain> | |
176 | +Junior Silva <junior@sedeantigo.colivre.coop.br> | |
149 | 177 | Junior Silva <juniorsilva1001@gmail.com> |
150 | 178 | Junior Silva <juniorsilva7@juniorsilva-Aspire-5750Z.(none)> |
179 | +Junior Silva <juniorsilva@colivre.coop.br> | |
180 | +juniorsilva <juniorsilva@QonoS.localhost.localdomain> | |
151 | 181 | Keilla Menezes <keilla@colivre.coop.br> |
152 | 182 | Larissa Reis <larissa@colivre.coop.br> |
153 | 183 | Larissa Reis <reiss.larissa@gmail.com> |
184 | +Leandro Alves <leandrosustenido@gmail.com> | |
185 | +Leandro Nunes dos Santos <81665687568@serpro-1541727.Home> | |
186 | +Leandro Nunes dos Santos <81665687568@serpro-1541727.(none)> | |
154 | 187 | Leandro Nunes dos Santos <leandronunes@gmail.com> |
155 | 188 | Leandro Nunes dos Santos <leandro.santos@serpro.gov.br> |
156 | 189 | LinguÁgil 2010 <linguagil.bahia@gmail.com> |
157 | 190 | Lucas Melo <lucas@colivre.coop.br> |
158 | 191 | Lucas Melo <lucaspradomelo@gmail.com> |
192 | +Luciano <lucianopcbr@gmail.com> | |
193 | +Luciano Prestes Cavalcanti <lucianopcbr@gmail.com> | |
159 | 194 | Luis David Aguilar Carlos <ludwig9003@gmail.com> |
195 | +Luiz Fernando de Freitas Matos <luiz@luizff.matos@gmail.com> | |
196 | +Marcos Ramos <ms.ramos@outlook.com> | |
160 | 197 | Martín Olivera <molivera@solar.org.ar> |
161 | 198 | Moises Machado <moises@colivre.coop.br> |
162 | 199 | Naíla Alves <naila@colivre.coop.br> |
... | ... | @@ -189,14 +226,21 @@ Renan Teruo + Diego Araujo <renanteruoc@gmail.com> |
189 | 226 | Renan Teruo + Diego Araújo <renanteruoc@gmail.com> |
190 | 227 | Renan Teruo + Paulo Meirelles <renanteruoc@gmail.com> |
191 | 228 | Renan Teruo + Rafael Manzo <renanteruoc@gmail.com> |
229 | +Rodrigo Souto + Ana Losnak + Daniel Bucher + Caio Almeida + Leandro Nunes + Daniela Feitosa + Mariel Zasso <noosfero-br@listas.softwarelivre.org> | |
192 | 230 | Rodrigo Souto <diguliu@gmail.com> |
193 | 231 | Rodrigo Souto <rodrigo@colivre.coop.br> |
194 | 232 | Ronny Kursawe <kursawe.ronny@googlemail.com> |
195 | 233 | root <root@debian.sdr.serpro> |
196 | 234 | Samuel R. C. Vale <srcvale@holoscopio.com> |
235 | +Tallys Martins <tallysmartins@gmail.com> | |
236 | +tallys <tallys@tallys.(none)> | |
237 | +Valessio Brito <contato@valessiobrito.com.br> | |
238 | +Valessio Brito <contato@valessiobrito.info> | |
197 | 239 | Valessio Brito <valessio@gmail.com> |
198 | 240 | vfcosta <vfcosta@gmail.com> |
241 | +Victor Carvalho <victorhugodf.ac@gmail.com> | |
199 | 242 | Victor Costa <vfcosta@gmail.com> |
243 | +Victor Hugo Alves de Carvalho <victorhugodf.ac@gmail.com> | |
200 | 244 | Vinicius Cubas Brand <viniciuscb@gmail.com> |
201 | 245 | Visita <visita@debian.(none)> |
202 | 246 | Yann Lugrin <yann.lugrin@liquid-concept.ch> | ... | ... |
Gemfile
1 | 1 | source "https://rubygems.org" |
2 | -gem 'rails' | |
3 | -gem 'fast_gettext' | |
4 | -gem 'acts-as-taggable-on' | |
5 | -gem 'prototype-rails' | |
6 | -gem 'prototype_legacy_helper', '0.0.0', :path => 'vendor/prototype_legacy_helper' | |
7 | -gem 'rails_autolink' | |
8 | -gem 'pg' | |
9 | -gem 'rmagick' | |
10 | -gem 'RedCloth' | |
11 | -gem 'will_paginate' | |
12 | -gem 'ruby-feedparser' | |
13 | -gem 'daemons' | |
14 | -gem 'thin' | |
15 | -gem 'hpricot' | |
16 | -gem 'nokogiri' | |
2 | +gem 'rails', '~> 3.2.19' | |
3 | +gem 'fast_gettext', '~> 0.6.8' | |
4 | +gem 'acts-as-taggable-on', '~> 3.0.2' | |
5 | +gem 'prototype-rails', '~> 3.2.1' | |
6 | +gem 'prototype_legacy_helper', '0.0.0', :path => 'vendor/prototype_legacy_helper' | |
7 | +gem 'rails_autolink', '~> 1.1.5' | |
8 | +gem 'pg', '~> 0.13.2' | |
9 | +gem 'rmagick', '~> 2.13.1' | |
10 | +gem 'RedCloth', '~> 4.2.9' | |
11 | +gem 'will_paginate', '~> 3.0.3' | |
12 | +gem 'ruby-feedparser', '~> 0.7' | |
13 | +gem 'daemons', '~> 1.1.5' | |
14 | +gem 'thin', '~> 1.3.1' | |
15 | +gem 'hpricot', '~> 0.8.6' | |
16 | +gem 'nokogiri', '~> 1.5.5' | |
17 | 17 | gem 'rake', :require => false |
18 | -gem 'rest-client' | |
19 | -gem 'exception_notification' | |
18 | +gem 'rest-client', '~> 1.6.7' | |
19 | +gem 'exception_notification', '~> 4.0.1' | |
20 | +gem 'gettext', '~> 2.2.1', :require => false, :group => :development | |
20 | 21 | |
21 | 22 | # FIXME list here all actual dependencies (i.e. the ones in debian/control), |
22 | 23 | # with their GEM names (not the Debian package names) |
23 | 24 | |
24 | 25 | group :production do |
25 | - gem 'dalli' | |
26 | + gem 'dalli', '~> 2.7.0' | |
26 | 27 | end |
27 | 28 | |
28 | 29 | group :test do |
29 | - gem 'rspec' | |
30 | - gem 'rspec-rails' | |
31 | - gem 'mocha', :require => false | |
30 | + gem 'rspec', '~> 2.10.0' | |
31 | + gem 'rspec-rails', '~> 2.10.1' | |
32 | + gem 'mocha', '~> 1.1.0', :require => false | |
32 | 33 | end |
33 | 34 | |
34 | 35 | group :cucumber do |
35 | - gem 'rake' | |
36 | - gem 'cucumber-rails', :require => false | |
37 | - gem 'capybara' | |
38 | - gem 'cucumber' | |
39 | - gem 'database_cleaner' | |
40 | - gem 'selenium-webdriver' | |
36 | + gem 'cucumber-rails', '~> 1.0.6', :require => false | |
37 | + gem 'capybara', '~> 2.1.0' | |
38 | + gem 'cucumber', '~> 1.0.6' | |
39 | + gem 'database_cleaner', '~> 1.2.0' | |
40 | + gem 'selenium-webdriver', '~> 2.39.0' | |
41 | 41 | end |
42 | 42 | |
43 | 43 | # include plugin gemfiles | ... | ... |
Gemfile.lock
... | ... | @@ -1,191 +0,0 @@ |
1 | -PATH | |
2 | - remote: vendor/prototype_legacy_helper | |
3 | - specs: | |
4 | - prototype_legacy_helper (0.0.0) | |
5 | - | |
6 | -GEM | |
7 | - remote: https://rubygems.org/ | |
8 | - specs: | |
9 | - RedCloth (4.2.9) | |
10 | - actionmailer (3.2.6) | |
11 | - actionpack (= 3.2.6) | |
12 | - mail (~> 2.4.4) | |
13 | - actionpack (3.2.6) | |
14 | - activemodel (= 3.2.6) | |
15 | - activesupport (= 3.2.6) | |
16 | - builder (~> 3.0.0) | |
17 | - erubis (~> 2.7.0) | |
18 | - journey (~> 1.0.1) | |
19 | - rack (~> 1.4.0) | |
20 | - rack-cache (~> 1.2) | |
21 | - rack-test (~> 0.6.1) | |
22 | - sprockets (~> 2.1.3) | |
23 | - activemodel (3.2.6) | |
24 | - activesupport (= 3.2.6) | |
25 | - builder (~> 3.0.0) | |
26 | - activerecord (3.2.6) | |
27 | - activemodel (= 3.2.6) | |
28 | - activesupport (= 3.2.6) | |
29 | - arel (~> 3.0.2) | |
30 | - tzinfo (~> 0.3.29) | |
31 | - activeresource (3.2.6) | |
32 | - activemodel (= 3.2.6) | |
33 | - activesupport (= 3.2.6) | |
34 | - activesupport (3.2.6) | |
35 | - i18n (~> 0.6) | |
36 | - multi_json (~> 1.0) | |
37 | - acts-as-taggable-on (3.0.2) | |
38 | - rails (>= 3, < 5) | |
39 | - arel (3.0.2) | |
40 | - builder (3.0.0) | |
41 | - capybara (2.1.0) | |
42 | - mime-types (>= 1.16) | |
43 | - nokogiri (>= 1.3.3) | |
44 | - rack (>= 1.0.0) | |
45 | - rack-test (>= 0.5.4) | |
46 | - xpath (~> 2.0) | |
47 | - childprocess (0.3.3) | |
48 | - ffi (~> 1.0.6) | |
49 | - cucumber (1.0.6) | |
50 | - builder (>= 2.1.2) | |
51 | - diff-lcs (>= 1.1.2) | |
52 | - gherkin (~> 2.4.18) | |
53 | - json (>= 1.4.6) | |
54 | - term-ansicolor (>= 1.0.6) | |
55 | - cucumber-rails (1.0.6) | |
56 | - capybara (>= 1.1.1) | |
57 | - cucumber (>= 1.0.6) | |
58 | - nokogiri (>= 1.5.0) | |
59 | - daemons (1.1.5) | |
60 | - dalli (2.7.0) | |
61 | - database_cleaner (1.2.0) | |
62 | - diff-lcs (1.1.3) | |
63 | - erubis (2.7.0) | |
64 | - eventmachine (0.12.10) | |
65 | - exception_notification (4.0.1) | |
66 | - actionmailer (>= 3.0.4) | |
67 | - activesupport (>= 3.0.4) | |
68 | - fast_gettext (0.6.8) | |
69 | - ffi (1.0.11) | |
70 | - gherkin (2.4.21) | |
71 | - json (>= 1.4.6) | |
72 | - hike (1.2.1) | |
73 | - hpricot (0.8.6) | |
74 | - i18n (0.6.0) | |
75 | - journey (1.0.3) | |
76 | - json (1.7.3) | |
77 | - mail (2.4.4) | |
78 | - i18n (>= 0.4.0) | |
79 | - mime-types (~> 1.16) | |
80 | - treetop (~> 1.4.8) | |
81 | - metaclass (0.0.1) | |
82 | - mime-types (1.19) | |
83 | - mocha (0.11.3) | |
84 | - metaclass (~> 0.0.1) | |
85 | - multi_json (1.3.6) | |
86 | - nokogiri (1.5.5) | |
87 | - pg (0.13.2) | |
88 | - polyglot (0.3.3) | |
89 | - prototype-rails (3.2.1) | |
90 | - rails (~> 3.2) | |
91 | - rack (1.4.1) | |
92 | - rack-cache (1.2) | |
93 | - rack (>= 0.4) | |
94 | - rack-ssl (1.3.2) | |
95 | - rack | |
96 | - rack-test (0.6.1) | |
97 | - rack (>= 1.0) | |
98 | - rails (3.2.6) | |
99 | - actionmailer (= 3.2.6) | |
100 | - actionpack (= 3.2.6) | |
101 | - activerecord (= 3.2.6) | |
102 | - activeresource (= 3.2.6) | |
103 | - activesupport (= 3.2.6) | |
104 | - bundler (~> 1.0) | |
105 | - railties (= 3.2.6) | |
106 | - rails_autolink (1.1.5) | |
107 | - rails (> 3.1) | |
108 | - railties (3.2.6) | |
109 | - actionpack (= 3.2.6) | |
110 | - activesupport (= 3.2.6) | |
111 | - rack-ssl (~> 1.3.2) | |
112 | - rake (>= 0.8.7) | |
113 | - rdoc (~> 3.4) | |
114 | - thor (>= 0.14.6, < 2.0) | |
115 | - rake (0.9.2.2) | |
116 | - rdoc (3.9.4) | |
117 | - rest-client (1.6.7) | |
118 | - mime-types (>= 1.16) | |
119 | - rmagick (2.13.1) | |
120 | - rspec (2.10.0) | |
121 | - rspec-core (~> 2.10.0) | |
122 | - rspec-expectations (~> 2.10.0) | |
123 | - rspec-mocks (~> 2.10.0) | |
124 | - rspec-core (2.10.1) | |
125 | - rspec-expectations (2.10.0) | |
126 | - diff-lcs (~> 1.1.3) | |
127 | - rspec-mocks (2.10.1) | |
128 | - rspec-rails (2.10.1) | |
129 | - actionpack (>= 3.0) | |
130 | - activesupport (>= 3.0) | |
131 | - railties (>= 3.0) | |
132 | - rspec (~> 2.10.0) | |
133 | - ruby-feedparser (0.7) | |
134 | - rubyzip (1.1.2) | |
135 | - selenium-webdriver (2.39.0) | |
136 | - childprocess (>= 0.2.5) | |
137 | - multi_json (~> 1.0) | |
138 | - rubyzip (~> 1.0) | |
139 | - websocket (~> 1.0.4) | |
140 | - sprockets (2.1.3) | |
141 | - hike (~> 1.2) | |
142 | - multi_json (~> 1.0) | |
143 | - rack (~> 1.0) | |
144 | - tilt (~> 1.1, != 1.3.0) | |
145 | - term-ansicolor (1.0.7) | |
146 | - thin (1.3.1) | |
147 | - daemons (>= 1.0.9) | |
148 | - eventmachine (>= 0.12.6) | |
149 | - rack (>= 1.0.0) | |
150 | - thor (0.15.3) | |
151 | - tilt (1.3.3) | |
152 | - treetop (1.4.10) | |
153 | - polyglot | |
154 | - polyglot (>= 0.3.1) | |
155 | - tzinfo (0.3.33) | |
156 | - websocket (1.0.7) | |
157 | - will_paginate (3.0.3) | |
158 | - xpath (2.0.0) | |
159 | - nokogiri (~> 1.3) | |
160 | - | |
161 | -PLATFORMS | |
162 | - ruby | |
163 | - | |
164 | -DEPENDENCIES | |
165 | - RedCloth | |
166 | - acts-as-taggable-on | |
167 | - capybara | |
168 | - cucumber | |
169 | - cucumber-rails | |
170 | - daemons | |
171 | - dalli | |
172 | - database_cleaner | |
173 | - exception_notification | |
174 | - fast_gettext | |
175 | - hpricot | |
176 | - mocha | |
177 | - nokogiri | |
178 | - pg | |
179 | - prototype-rails | |
180 | - prototype_legacy_helper (= 0.0.0)! | |
181 | - rails | |
182 | - rails_autolink | |
183 | - rake | |
184 | - rest-client | |
185 | - rmagick | |
186 | - rspec | |
187 | - rspec-rails | |
188 | - ruby-feedparser | |
189 | - selenium-webdriver | |
190 | - thin | |
191 | - will_paginate |
INSTALL.md
... | ... | @@ -186,8 +186,8 @@ Apache instalation |
186 | 186 | |
187 | 187 | # apt-get install apache2 |
188 | 188 | |
189 | -Apache configuration | |
190 | --------------------- | |
189 | +Configuration - noosfero at / | |
190 | +----------------------------- | |
191 | 191 | |
192 | 192 | First you have to enable the following some apache modules: |
193 | 193 | |
... | ... | @@ -257,6 +257,62 @@ Now restart your apache server (as root): |
257 | 257 | |
258 | 258 | # invoke-rc.d apache2 restart |
259 | 259 | |
260 | +Configuration - noosfero at a /subdirectory | |
261 | +------------------------------------------- | |
262 | + | |
263 | +This section describes how to configure noosfero at a subdirectory, what is | |
264 | +specially useful when you want Noosfero to share a domain name with other | |
265 | +applications. For example you can host noosfero at yourdomain.com/social, a | |
266 | +webmail application at yourdomain.com/webmail, and have a static HTML website | |
267 | +at yourdomain.com/. | |
268 | + | |
269 | +**NOTE:** Some plugins might not work well with this setting. Before deploying | |
270 | +this setting, make sure you test that everything you need works properly with | |
271 | +it. | |
272 | + | |
273 | +The configuration is similar to the main configuration instructions, except for | |
274 | +the following points. In the description below, replace '/subdirectory' with | |
275 | +the actual subdirectory you want. | |
276 | + | |
277 | +1) add a `prefix: /subdirectory` line to your thin configuration file (thin.yml). | |
278 | + | |
279 | +1.1) remember to restart the noosfero application server whenever you make | |
280 | +changes to that configuration file. | |
281 | + | |
282 | + # service noosfero restart | |
283 | + | |
284 | +2) add a line saying `export RAILS_RELATIVE_URL_ROOT=/subdirectory` to | |
285 | +/etc/default/noosfero (you can create it with just this line if it does not | |
286 | +exist already). | |
287 | + | |
288 | +3) You should add the following apache configuration to an existing virtual | |
289 | +host (plus the `<Proxy balancer://noosfero>` section as displayed above): | |
290 | + | |
291 | +``` | |
292 | +Alias /subdirectory /path/to/noosfero/public | |
293 | +<Directory "/path/to/noosfero/public"> | |
294 | + Options FollowSymLinks | |
295 | + AllowOverride None | |
296 | + Order Allow,Deny | |
297 | + Allow from all | |
298 | + | |
299 | + Include /path/to/noosfero/etc/noosfero/apache/cache.conf | |
300 | + | |
301 | + RewriteEngine On | |
302 | + RewriteBase /subdirectory | |
303 | + # Rewrite index to check for static index.html | |
304 | + RewriteRule ^$ index.html [QSA] | |
305 | + # Rewrite to check for Rails cached page | |
306 | + RewriteRule ^([^.]+)$ $1.html [QSA] | |
307 | + RewriteCond %{REQUEST_FILENAME} !-f | |
308 | + RewriteRule ^(.*)$ http://localhost:3000%{REQUEST_URI} [P,QSA,L] | |
309 | +</Directory> | |
310 | +``` | |
311 | + | |
312 | +3.1) remember to reload the apache server whenever any apache configuration | |
313 | +file changes. | |
314 | + | |
315 | + # sudo service apache2 reload | |
260 | 316 | |
261 | 317 | Enabling exception notifications |
262 | 318 | ================================ | ... | ... |
Rakefile
... | ... | @@ -6,3 +6,13 @@ |
6 | 6 | require File.expand_path('../config/application', __FILE__) |
7 | 7 | |
8 | 8 | Noosfero::Application.load_tasks |
9 | + | |
10 | +[ | |
11 | + "baseplugins/*/{tasks,lib/tasks,rails/tasks}/**/*.rake", | |
12 | + "config/plugins/*/{tasks,lib/tasks,rails/tasks}/**/*.rake", | |
13 | + "config/plugins/*/vendor/plugins/*/{tasks,lib/tasks,rails/tasks}/**/*.rake", | |
14 | +].map do |pattern| | |
15 | + Dir.glob(pattern).sort | |
16 | +end.flatten.each do |taskfile| | |
17 | + load taskfile | |
18 | +end | ... | ... |
Vagrantfile
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | |
4 | 4 | VAGRANTFILE_API_VERSION = "2" |
5 | 5 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
6 | - config.vm.box = "debian-wheezy" | |
6 | + config.vm.box = ENV.fetch('VAGRANT_BOX', "debian-wheezy") | |
7 | 7 | config.vm.network :forwarded_port, host: 3000, guest: 3000 |
8 | 8 | config.vm.provision :shell do |shell| |
9 | 9 | shell.inline = 'su vagrant -c /vagrant/script/vagrant' | ... | ... |
app/controllers/admin/categories_controller.rb
... | ... | @@ -45,9 +45,11 @@ class CategoriesController < AdminController |
45 | 45 | if request.post? |
46 | 46 | @category.update_attributes!(params[:category]) |
47 | 47 | @saved = true |
48 | + session[:notice] = _("Category %s saved." % @category.name) | |
48 | 49 | redirect_to :action => 'index' |
49 | 50 | end |
50 | 51 | rescue Exception => e |
52 | + session[:notice] = _('Could not save category.') | |
51 | 53 | render :action => 'edit' |
52 | 54 | end |
53 | 55 | end | ... | ... |
app/controllers/admin/environment_design_controller.rb
... | ... | @@ -3,9 +3,7 @@ class EnvironmentDesignController < BoxOrganizerController |
3 | 3 | protect 'edit_environment_design', :environment |
4 | 4 | |
5 | 5 | def available_blocks |
6 | - # TODO EnvironmentStatisticsBlock is DEPRECATED and will be removed from | |
7 | - # the Noosfero core soon, see ActionItem3045 | |
8 | - @available_blocks ||= [ ArticleBlock, LoginBlock, EnvironmentStatisticsBlock, RecentDocumentsBlock, EnterprisesBlock, CommunitiesBlock, SellersSearchBlock, LinkListBlock, FeedReaderBlock, SlideshowBlock, HighlightsBlock, FeaturedProductsBlock, CategoriesBlock, RawHTMLBlock, TagsBlock ] | |
6 | + @available_blocks ||= [ ArticleBlock, LoginBlock, RecentDocumentsBlock, EnterprisesBlock, CommunitiesBlock, SellersSearchBlock, LinkListBlock, FeedReaderBlock, SlideshowBlock, HighlightsBlock, FeaturedProductsBlock, CategoriesBlock, RawHTMLBlock, TagsBlock ] | |
9 | 7 | @available_blocks += plugins.dispatch(:extra_blocks, :type => Environment) |
10 | 8 | end |
11 | 9 | ... | ... |
app/controllers/admin/features_controller.rb
... | ... | @@ -51,4 +51,10 @@ class FeaturesController < AdminController |
51 | 51 | redirect_to :action => 'manage_fields' |
52 | 52 | end |
53 | 53 | |
54 | + def search_members | |
55 | + arg = params[:q].downcase | |
56 | + result = environment.people.find(:all, :conditions => ['LOWER(name) LIKE ? OR identifier LIKE ?', "%#{arg}%", "%#{arg}%"]) | |
57 | + render :text => prepare_to_token_input(result).to_json | |
58 | + end | |
59 | + | |
54 | 60 | end | ... | ... |
app/controllers/application_controller.rb
... | ... | @@ -7,6 +7,12 @@ class ApplicationController < ActionController::Base |
7 | 7 | before_filter :detect_stuff_by_domain |
8 | 8 | before_filter :init_noosfero_plugins |
9 | 9 | before_filter :allow_cross_domain_access |
10 | + before_filter :login_required, :if => :private_environment? | |
11 | + before_filter :verify_members_whitelist, :if => [:private_environment?, :user] | |
12 | + | |
13 | + def verify_members_whitelist | |
14 | + render_access_denied unless user.is_admin? || environment.in_whitelist?(user) | |
15 | + end | |
10 | 16 | |
11 | 17 | after_filter :set_csrf_cookie |
12 | 18 | |
... | ... | @@ -34,7 +40,7 @@ class ApplicationController < ActionController::Base |
34 | 40 | |
35 | 41 | theme_layout = theme_option(:layout) |
36 | 42 | if theme_layout |
37 | - theme_view_file('layouts/'+theme_layout) || theme_layout | |
43 | + (theme_view_file('layouts/'+theme_layout) || theme_layout).to_s | |
38 | 44 | else |
39 | 45 | 'application' |
40 | 46 | end |
... | ... | @@ -187,4 +193,8 @@ class ApplicationController < ActionController::Base |
187 | 193 | {:results => scope.paginate(paginate_options)} |
188 | 194 | end |
189 | 195 | |
196 | + def private_environment? | |
197 | + @environment.enabled?(:restrict_to_members) | |
198 | + end | |
199 | + | |
190 | 200 | end | ... | ... |
app/controllers/my_profile/cms_controller.rb
... | ... | @@ -4,6 +4,12 @@ class CmsController < MyProfileController |
4 | 4 | |
5 | 5 | include ArticleHelper |
6 | 6 | |
7 | + def search_tags | |
8 | + arg = params[:term].downcase | |
9 | + result = ActsAsTaggableOn::Tag.find(:all, :conditions => ['LOWER(name) LIKE ?', "%#{arg}%"]) | |
10 | + render :text => prepare_to_token_input_by_label(result).to_json, :content_type => 'application/json' | |
11 | + end | |
12 | + | |
7 | 13 | def self.protect_if(*args) |
8 | 14 | before_filter(*args) do |c| |
9 | 15 | user, profile = c.send(:user), c.send(:profile) |
... | ... | @@ -221,7 +227,7 @@ class CmsController < MyProfileController |
221 | 227 | @article = profile.articles.find(params[:id]) |
222 | 228 | if request.post? |
223 | 229 | @article.destroy |
224 | - session[:notice] = _("\"#{@article.name}\" was removed.") | |
230 | + session[:notice] = _("\"%s\" was removed." % @article.name) | |
225 | 231 | referer = Rails.application.routes.recognize_path URI.parse(request.referer).path rescue nil |
226 | 232 | if referer and referer[:controller] == 'cms' and referer[:action] != 'edit' |
227 | 233 | redirect_to referer | ... | ... |
app/controllers/my_profile/memberships_controller.rb
... | ... | @@ -21,6 +21,9 @@ class MembershipsController < MyProfileController |
21 | 21 | @back_to = params[:back_to] || url_for(:action => 'index') |
22 | 22 | if request.post? && @community.valid? |
23 | 23 | @community = Community.create_after_moderation(user, params[:community].merge({:environment => environment})) |
24 | + if @community.new_record? | |
25 | + session[:notice] = _('Your new community creation request will be evaluated by an administrator. You will be notified.') | |
26 | + end | |
24 | 27 | redirect_to @back_to |
25 | 28 | return |
26 | 29 | end | ... | ... |
app/controllers/my_profile/tasks_controller.rb
... | ... | @@ -4,6 +4,7 @@ class TasksController < MyProfileController |
4 | 4 | |
5 | 5 | def index |
6 | 6 | @filter = params[:filter_type].blank? ? nil : params[:filter_type] |
7 | + @task_types = Task.pending_types_for(profile) | |
7 | 8 | @tasks = Task.to(profile).without_spam.pending.of(@filter).order_by('created_at', 'asc').paginate(:per_page => Task.per_page, :page => params[:page]) |
8 | 9 | @failed = params ? params[:failed] : {} |
9 | 10 | end | ... | ... |
app/controllers/public/account_controller.rb
... | ... | @@ -15,11 +15,23 @@ class AccountController < ApplicationController |
15 | 15 | |
16 | 16 | def activate |
17 | 17 | @user = User.find_by_activation_code(params[:activation_code]) if params[:activation_code] |
18 | - if @user and @user.activate | |
19 | - @message = _("Your account has been activated, now you can log in!") | |
20 | - check_redirection | |
21 | - session[:join] = params[:join] unless params[:join].blank? | |
22 | - render :action => 'login', :userlogin => @user.login | |
18 | + if @user | |
19 | + unless @user.environment.enabled?('admin_must_approve_new_users') | |
20 | + if @user.activate | |
21 | + @message = _("Your account has been activated, now you can log in!") | |
22 | + check_redirection | |
23 | + session[:join] = params[:join] unless params[:join].blank? | |
24 | + render :action => 'login', :userlogin => @user.login | |
25 | + end | |
26 | + else | |
27 | + if @user.create_moderate_task | |
28 | + session[:notice] = _('Thanks for registering. The administrators were notified.') | |
29 | + @register_pending = true | |
30 | + @user.activation_code = nil | |
31 | + @user.save! | |
32 | + redirect_to :controller => :home | |
33 | + end | |
34 | + end | |
23 | 35 | else |
24 | 36 | session[:notice] = _("It looks like you're trying to activate an account. Perhaps have already activated this account?") |
25 | 37 | redirect_to :controller => :home |
... | ... | @@ -85,6 +97,7 @@ class AccountController < ApplicationController |
85 | 97 | @user.return_to = session[:return_to] |
86 | 98 | @person = Person.new(params[:profile_data]) |
87 | 99 | @person.environment = @user.environment |
100 | + | |
88 | 101 | if request.post? |
89 | 102 | if may_be_a_bot |
90 | 103 | set_signup_start_time_for_now |
... | ... | @@ -103,11 +116,20 @@ class AccountController < ApplicationController |
103 | 116 | invitation.update_attributes!({:friend => @user.person}) |
104 | 117 | invitation.finish |
105 | 118 | end |
119 | + | |
120 | + unless params[:file].nil? | |
121 | + image = Image::new :uploaded_data=> params[:file][:image] | |
122 | + | |
123 | + @user.person.image = image | |
124 | + @user.person.save | |
125 | + end | |
126 | + | |
106 | 127 | if @user.activated? |
107 | 128 | self.current_user = @user |
108 | 129 | check_join_in_community(@user) |
109 | 130 | go_to_signup_initial_page |
110 | 131 | else |
132 | + session[:notice] = _('Thanks for registering!') | |
111 | 133 | @register_pending = true |
112 | 134 | end |
113 | 135 | end | ... | ... |
app/controllers/public/chat_controller.rb
... | ... | @@ -19,9 +19,13 @@ class ChatController < PublicController |
19 | 19 | def avatar |
20 | 20 | profile = environment.profiles.find_by_identifier(params[:id]) |
21 | 21 | filename, mimetype = profile_icon(profile, :minor, true) |
22 | - data = File.read(File.join(Rails.root, 'public', filename)) | |
23 | - render :text => data, :layout => false, :content_type => mimetype | |
24 | - expires_in 24.hours | |
22 | + if filename =~ /^https?:/ | |
23 | + redirect_to filename | |
24 | + else | |
25 | + data = File.read(File.join(Rails.root, 'public', filename)) | |
26 | + render :text => data, :layout => false, :content_type => mimetype | |
27 | + expires_in 24.hours | |
28 | + end | |
25 | 29 | end |
26 | 30 | |
27 | 31 | def update_presence_status | ... | ... |
app/controllers/public/content_viewer_controller.rb
... | ... | @@ -74,7 +74,7 @@ class ContentViewerController < 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,8 +216,6 @@ class ContentViewerController < 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 | - | |
221 | 219 | #FIXME Need to run this before the pagination because this version of |
222 | 220 | # will_paginate returns a will_paginate collection instead of a |
223 | 221 | # relation. | ... | ... |
app/controllers/public/profile_controller.rb
app/helpers/application_helper.rb
... | ... | @@ -304,7 +304,7 @@ module ApplicationHelper |
304 | 304 | def partial_for_class(klass, prefix=nil, suffix=nil) |
305 | 305 | raise ArgumentError, 'No partial for object. Is there a partial for any class in the inheritance hierarchy?' if klass.nil? |
306 | 306 | name = klass.name.underscore |
307 | - controller.view_paths.reverse_each do |view_path| | |
307 | + controller.view_paths.each do |view_path| | |
308 | 308 | partial = partial_for_class_in_view_path(klass, view_path, prefix, suffix) |
309 | 309 | return partial if partial |
310 | 310 | end |
... | ... | @@ -482,7 +482,12 @@ module ApplicationHelper |
482 | 482 | '/images/icons-app/enterprise-'+ size.to_s() +'.png' |
483 | 483 | end |
484 | 484 | else |
485 | - '/images/icons-app/person-'+ size.to_s() +'.png' | |
485 | + pixels = Image.attachment_options[:thumbnails][size].split('x').first | |
486 | + gravatar_profile_image_url( | |
487 | + profile.email, | |
488 | + :size => pixels, | |
489 | + :d => gravatar_default | |
490 | + ) | |
486 | 491 | end |
487 | 492 | filename = default_or_themed_icon(icon) |
488 | 493 | end |
... | ... | @@ -602,7 +607,7 @@ module ApplicationHelper |
602 | 607 | end |
603 | 608 | |
604 | 609 | def gravatar_default |
605 | - (respond_to?(:theme_option) && theme_option.present? && theme_option['gravatar']) || NOOSFERO_CONF['gravatar'] | |
610 | + (respond_to?(:theme_option) && theme_option.present? && theme_option['gravatar']) || NOOSFERO_CONF['gravatar'] || 'mm' | |
606 | 611 | end |
607 | 612 | |
608 | 613 | attr_reader :environment |
... | ... | @@ -1281,9 +1286,9 @@ module ApplicationHelper |
1281 | 1286 | |
1282 | 1287 | def delete_article_message(article) |
1283 | 1288 | if article.folder? |
1284 | - _("Are you sure that you want to remove the folder \"#{article.name}\"? Note that all the items inside it will also be removed!") | |
1289 | + _("Are you sure that you want to remove the folder \"%s\"? Note that all the items inside it will also be removed!") % article.name | |
1285 | 1290 | else |
1286 | - _("Are you sure that you want to remove the item \"#{article.name}\"?") | |
1291 | + _("Are you sure that you want to remove the item \"%s\"?") % article.name | |
1287 | 1292 | end |
1288 | 1293 | end |
1289 | 1294 | |
... | ... | @@ -1402,4 +1407,14 @@ module ApplicationHelper |
1402 | 1407 | content_tag('ul', article.versions.map {|v| link_to("r#{v.version}", @page.url.merge(:version => v.version))}) |
1403 | 1408 | end |
1404 | 1409 | |
1410 | + def labelled_colorpicker_field(human_name, object_name, method, options = {}) | |
1411 | + options[:id] ||= 'text-field-' + FormsHelper.next_id_number | |
1412 | + content_tag('label', human_name, :for => options[:id], :class => 'formlabel') + | |
1413 | + colorpicker_field(object_name, method, options.merge(:class => 'colorpicker_field')) | |
1414 | + end | |
1415 | + | |
1416 | + def colorpicker_field(object_name, method, options = {}) | |
1417 | + text_field(object_name, method, options.merge(:class => 'colorpicker_field')) | |
1418 | + end | |
1419 | + | |
1405 | 1420 | end | ... | ... |
app/helpers/article_helper.rb
... | ... | @@ -83,6 +83,10 @@ module ArticleHelper |
83 | 83 | array.map { |object| {:id => object.id, :name => object.name} } |
84 | 84 | end |
85 | 85 | |
86 | + def prepare_to_token_input_by_label(array) | |
87 | + array.map { |object| {:label => object.name, :value => object.name} } | |
88 | + end | |
89 | + | |
86 | 90 | def cms_label_for_new_children |
87 | 91 | _('New article') |
88 | 92 | 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 => _('« Newer posts'), |
24 | 24 | :next_label => _('Older posts »'), |
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| | ... | ... |
app/helpers/categories_helper.rb
1 | 1 | module CategoriesHelper |
2 | 2 | |
3 | - | |
4 | - COLORS = [ | |
5 | - [ N_('Do not display at the menu'), nil ], | |
6 | - [ N_('Orange'), 1], | |
7 | - [ N_('Green'), 2], | |
8 | - [ N_('Purple'), 3], | |
9 | - [ N_('Red'), 4], | |
10 | - [ N_('Dark Green'), 5], | |
11 | - [ N_('Blue Oil'), 6], | |
12 | - [ N_('Blue'), 7], | |
13 | - [ N_('Brown'), 8], | |
14 | - [ N_('Light Green'), 9], | |
15 | - [ N_('Light Blue'), 10], | |
16 | - [ N_('Dark Blue'), 11], | |
17 | - [ N_('Blue Pool'), 12], | |
18 | - [ N_('Beige'), 13], | |
19 | - [ N_('Yellow'), 14], | |
20 | - [ N_('Light Brown'), 15] | |
21 | - ] | |
22 | - | |
23 | 3 | TYPES = [ |
24 | 4 | [ _('General Category'), Category.to_s ], |
25 | 5 | [ _('Product Category'), ProductCategory.to_s ], |
26 | 6 | [ _('Region'), Region.to_s ], |
27 | 7 | ] |
28 | 8 | |
29 | - def select_color_for_category | |
30 | - if @category.top_level? | |
31 | - labelled_form_field(_('Display at the menu?'), select('category', 'display_color', CategoriesHelper::COLORS.map {|item| [gettext(item[0]), item[1]] })) | |
32 | - else | |
33 | - "" | |
34 | - end | |
35 | - end | |
36 | - | |
37 | - def display_color_for_category(category) | |
38 | - color = category.display_color | |
39 | - if color.nil? | |
40 | - "" | |
41 | - else | |
42 | - "[" + gettext(CategoriesHelper::COLORS.find {|item| item[1] == color}.first) + "]" | |
43 | - end | |
44 | - end | |
45 | - | |
46 | 9 | def select_category_type(field) |
47 | 10 | value = params[field] |
48 | 11 | labelled_form_field(_('Type of category'), select_tag('type', options_for_select(TYPES, value))) |
49 | 12 | end |
50 | 13 | |
14 | + def category_color_style(category) | |
15 | + return '' if category.nil? or category.display_color.blank? | |
16 | + 'background-color: #'+category.display_color+';' | |
17 | + end | |
18 | + | |
51 | 19 | #FIXME make this test |
52 | 20 | def selected_category_link(cat) |
53 | 21 | js_remove = "jQuery('#selected-category-#{cat.id}').remove();" | ... | ... |
app/helpers/layout_helper.rb
app/helpers/profile_helper.rb
1 | 1 | module ProfileHelper |
2 | 2 | |
3 | - def display_field(title, profile, field, force = false) | |
3 | + COMMON_CATEGORIES = ActiveSupport::OrderedHash.new | |
4 | + COMMON_CATEGORIES[:content] = [:blogs, :image_galleries, :events, :tags] | |
5 | + COMMON_CATEGORIES[:interests] = [:interests] | |
6 | + COMMON_CATEGORIES[:general] = nil | |
7 | + | |
8 | + PERSON_CATEGORIES = ActiveSupport::OrderedHash.new | |
9 | + PERSON_CATEGORIES[:basic_information] = [:nickname, :sex, :birth_date, :location, :privacy_setting, :created_at] | |
10 | + PERSON_CATEGORIES[:contact] = [:contact_phone, :cell_phone, :comercial_phone, :contact_information, :email, :personal_website, :jabber_id] | |
11 | + PERSON_CATEGORIES[:location] = [:address, :address_reference, :zip_code, :city, :state, :district, :country, :nationality] | |
12 | + PERSON_CATEGORIES[:work] = [:organization, :organization_website, :professional_activity] | |
13 | + PERSON_CATEGORIES[:study] = [:schooling, :formation, :area_of_study] | |
14 | + PERSON_CATEGORIES[:network] = [:friends, :communities, :enterprises] | |
15 | + PERSON_CATEGORIES.merge!(COMMON_CATEGORIES) | |
16 | + | |
17 | + ORGANIZATION_CATEGORIES = ActiveSupport::OrderedHash.new | |
18 | + ORGANIZATION_CATEGORIES[:basic_information] = [:display_name, :created_at, :foundation_year, :type, :language, :members_count, :location, :address_reference, :historic_and_current_context, :admins] | |
19 | + ORGANIZATION_CATEGORIES[:contact] = [:contact_person, :contact_phone, :contact_email, :organization_website, :jabber_id] | |
20 | + ORGANIZATION_CATEGORIES[:economic] = [:business_name, :acronym, :economic_activity, :legal_form, :products, :activities_short_description, :management_information] | |
21 | + ORGANIZATION_CATEGORIES.merge!(COMMON_CATEGORIES) | |
22 | + | |
23 | + CATEGORY_MAP = ActiveSupport::OrderedHash.new | |
24 | + CATEGORY_MAP[:person] = PERSON_CATEGORIES | |
25 | + CATEGORY_MAP[:organization] = ORGANIZATION_CATEGORIES | |
26 | + | |
27 | + FORCE = { | |
28 | + :person => [:privacy_setting], | |
29 | + :organization => [:privacy_setting, :location], | |
30 | + } | |
31 | + | |
32 | + MULTIPLE = { | |
33 | + :person => [:blogs, :image_galleries, :interests], | |
34 | + :organization => [:blogs, :image_galleries, :interests], | |
35 | + } | |
36 | + | |
37 | + CUSTOM_LABELS = { | |
38 | + :zip_code => _('ZIP code'), | |
39 | + :email => _('e-Mail'), | |
40 | + :jabber_id => _('Jabber'), | |
41 | + :birth_date => _('Date of birth'), | |
42 | + :created_at => _('Profile created at'), | |
43 | + :members_count => _('Members'), | |
44 | + } | |
45 | + | |
46 | + EXCEPTION = { | |
47 | + :person => [:image, :preferred_domain, :description, :tag_list], | |
48 | + :organization => [:image, :preferred_domain, :description, :tag_list, :address, :zip_code, :city, :state, :country, :district] | |
49 | + } | |
50 | + | |
51 | + def general_fields | |
52 | + categorized_fields = CATEGORY_MAP[kind].values.flatten | |
53 | + profile.class.fields.map(&:to_sym) - categorized_fields - EXCEPTION[kind] | |
54 | + end | |
55 | + | |
56 | + def kind | |
57 | + if profile.kind_of?(Person) | |
58 | + :person | |
59 | + else | |
60 | + :organization | |
61 | + end | |
62 | + end | |
63 | + | |
64 | + def title(field, entry = nil) | |
65 | + return self.send("#{field}_custom_title", entry) if MULTIPLE[kind].include?(field) && entry.present? | |
66 | + CUSTOM_LABELS[field.to_sym] || field.to_s.humanize | |
67 | + end | |
68 | + | |
69 | + def display_field(field) | |
70 | + force = FORCE[kind].include?(field) | |
71 | + multiple = MULTIPLE[kind].include?(field) | |
4 | 72 | unless force || profile.may_display_field_to?(field, user) |
5 | 73 | return '' |
6 | 74 | end |
7 | - value = profile.send(field) | |
75 | + value = begin profile.send(field) rescue nil end | |
8 | 76 | if !value.blank? |
9 | - if block_given? | |
10 | - value = yield(value) | |
11 | - end | |
12 | - content_tag('tr', content_tag('td', title, :class => 'field-name') + content_tag('td', value)) | |
77 | + entries = multiple ? value : [] << value | |
78 | + entries.map do |entry| | |
79 | + content = self.send("treat_#{field}", entry) | |
80 | + content_tag('tr', content_tag('td', title(field, entry), :class => 'field-name') + content_tag('td', content)) | |
81 | + end.join("\n") | |
13 | 82 | else |
14 | 83 | '' |
15 | 84 | end |
16 | 85 | end |
17 | 86 | |
18 | - def display_contact(profile) | |
19 | - fields = [] | |
20 | - fields << display_field(_('Address:'), profile, :address).html_safe | |
21 | - fields << display_field(_('ZIP code:'), profile, :zip_code).html_safe | |
22 | - fields << display_field(_('Contact phone:'), profile, :contact_phone).html_safe | |
23 | - fields << display_field(_('e-Mail:'), profile, :email) { |email| link_to_email(email) }.html_safe | |
24 | - fields << display_field(_('Personal website:'), profile, :personal_website).html_safe | |
25 | - fields << display_field(_('Jabber:'), profile, :jabber_id).html_safe | |
26 | - if fields.reject!(&:blank?).empty? | |
27 | - '' | |
28 | - else | |
29 | - content_tag('tr', content_tag('th', _('Contact'), { :colspan => 2 })) + fields.join.html_safe | |
87 | + def treat_email(email) | |
88 | + link_to_email(email) | |
89 | + end | |
90 | + | |
91 | + def treat_organization_website(url) | |
92 | + link_to(url, url) | |
93 | + end | |
94 | + | |
95 | + def treat_sex(gender) | |
96 | + { 'male' => _('Male'), 'female' => _('Female') }[gender] | |
97 | + end | |
98 | + | |
99 | + def treat_date(date) | |
100 | + show_date(date.to_date) | |
101 | + end | |
102 | + alias :treat_birth_date :treat_date | |
103 | + alias :treat_created_at :treat_date | |
104 | + | |
105 | + def treat_friends(friends) | |
106 | + link_to friends.count, :controller => 'profile', :action => 'friends' | |
107 | + end | |
108 | + | |
109 | + def treat_communities(communities) | |
110 | + link_to communities.count, :controller => "profile", :action => 'communities' | |
111 | + end | |
112 | + | |
113 | + def treat_enterprises(enterprises) | |
114 | + if environment.disabled?('disable_asset_enterprises') | |
115 | + link_to enterprises.count, :controller => "profile", :action => 'enterprises' | |
30 | 116 | end |
31 | 117 | end |
32 | 118 | |
33 | - def display_work_info(profile) | |
34 | - organization = display_field(_('Organization:'), profile, :organization) | |
35 | - organization_site = display_field(_('Organization website:'), profile, :organization_website) { |url| link_to(url, url) } | |
36 | - if organization.blank? && organization_site.blank? | |
37 | - '' | |
119 | + def treat_members_count(count) | |
120 | + link_to count, :controller => 'profile', :action => 'members' | |
121 | + end | |
122 | + | |
123 | + def treat_products(products) | |
124 | + if profile.kind_of?(Enterprise) && profile.environment.enabled?('products_for_enterprises') | |
125 | + link_to _('Products/Services'), :controller => 'catalog', :action => 'index' | |
126 | + end | |
127 | + end | |
128 | + | |
129 | + def treat_admins(admins) | |
130 | + profile.admins.map { |admin| link_to(admin.short_name, admin.url)}.join(', ') | |
131 | + end | |
132 | + | |
133 | + def treat_blogs(blog) | |
134 | + link_to(n_('One post', '%{num} posts', blog.posts.published.count) % { :num => blog.posts.published.count }, blog.url) | |
135 | + end | |
136 | + | |
137 | + def treat_image_galleries(gallery) | |
138 | + link_to(n_('One picture', '%{num} pictures', gallery.images.published.count) % { :num => gallery.images.published.count }, gallery.url) | |
139 | + end | |
140 | + | |
141 | + def treat_events(events) | |
142 | + link_to events.published.count, :controller => 'events', :action => 'events' | |
143 | + end | |
144 | + | |
145 | + def treat_tags(tags) | |
146 | + tag_cloud @tags, :id, { :action => 'tags' }, :max_size => 18, :min_size => 10 | |
147 | + end | |
148 | + | |
149 | + def treat_interests(interest) | |
150 | + link_to interest.name, :controller => 'search', :action => 'category_index', :category_path => interest.explode_path | |
151 | + end | |
152 | + | |
153 | + def article_custom_title(article) | |
154 | + article.name | |
155 | + end | |
156 | + alias :blogs_custom_title :article_custom_title | |
157 | + alias :image_galleries_custom_title :article_custom_title | |
158 | + | |
159 | + def interests_custom_title(interest) | |
160 | + '' | |
161 | + end | |
162 | + | |
163 | + def method_missing(method, *args, &block) | |
164 | + if method.to_s =~ /^treat_(.+)$/ | |
165 | + args[0] | |
166 | + elsif method.to_s =~ /^display_(.+)$/ && CATEGORY_MAP[kind].has_key?($1.to_sym) | |
167 | + category = $1.to_sym | |
168 | + fields = category == :general ? general_fields : CATEGORY_MAP[kind][category] | |
169 | + contents = [] | |
170 | + | |
171 | + fields.each do |field| | |
172 | + contents << display_field(field).html_safe | |
173 | + end | |
174 | + | |
175 | + contents = contents.delete_if(&:blank?) | |
176 | + | |
177 | + unless contents.empty? | |
178 | + content_tag('tr', content_tag('th', title(category), { :colspan => 2 })) + contents.join.html_safe | |
179 | + else | |
180 | + '' | |
181 | + end | |
38 | 182 | else |
39 | - content_tag('tr', content_tag('th', _('Work'), { :colspan => 2 })) + organization + organization_site | |
183 | + super | |
40 | 184 | end |
41 | 185 | end |
42 | 186 | ... | ... |
... | ... | @@ -0,0 +1,51 @@ |
1 | +module TinymceHelper | |
2 | + include MacrosHelper | |
3 | + | |
4 | + def tinymce_js | |
5 | + output = '' | |
6 | + output += javascript_include_tag 'tinymce/js/tinymce/tinymce.min.js' | |
7 | + output += javascript_include_tag 'tinymce/js/tinymce/jquery.tinymce.min.js' | |
8 | + output += javascript_include_tag 'tinymce.js' | |
9 | + output += include_macro_js_files.to_s | |
10 | + output | |
11 | + end | |
12 | + | |
13 | + def tinymce_init_js options = {} | |
14 | + options.merge! :document_base_url => environment.top_url, | |
15 | + :content_css => "/stylesheets/tinymce.css,#{macro_css_files}", | |
16 | + :plugins => %w[compat3x advlist autolink lists link image charmap print preview hr anchor pagebreak | |
17 | + searchreplace wordcount visualblocks visualchars code fullscreen | |
18 | + insertdatetime media nonbreaking save table contextmenu directionality | |
19 | + emoticons template paste textcolor colorpicker textpattern], | |
20 | + :language => tinymce_language | |
21 | + | |
22 | + options[:toolbar1] = "insertfile undo redo | copy paste | bold italic underline | styleselect fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image" | |
23 | + if options[:mode] == 'simple' | |
24 | + options[:menubar] = false | |
25 | + else | |
26 | + options[:menubar] = 'edit insert view tools' | |
27 | + options[:toolbar2] = 'print preview code media | table' | |
28 | + | |
29 | + options[:toolbar2] += ' | macros' | |
30 | + macros_with_buttons.each do |macro| | |
31 | + options[:toolbar2] += " #{macro.identifier}" | |
32 | + end | |
33 | + end | |
34 | + | |
35 | + options[:macros_setup] = macros_with_buttons.map do |macro| | |
36 | + <<-EOS | |
37 | + ed.addButton('#{macro.identifier}', { | |
38 | + title: #{macro_title(macro).to_json}, | |
39 | + onclick: #{generate_macro_config_dialog macro}, | |
40 | + image : '#{macro.configuration[:icon_path]}' | |
41 | + }); | |
42 | + EOS | |
43 | + end | |
44 | + | |
45 | + #cleanup non tinymce options | |
46 | + options = options.except :mode | |
47 | + | |
48 | + "noosfero.tinymce.init(#{options.to_json})" | |
49 | + end | |
50 | + | |
51 | +end | ... | ... |
app/helpers/token_helper.rb
... | ... | @@ -18,6 +18,7 @@ module TokenHelper |
18 | 18 | options[:on_add] ||= 'null' |
19 | 19 | options[:on_delete] ||= 'null' |
20 | 20 | options[:on_ready] ||= 'null' |
21 | + options[:query_param] ||= 'q' | |
21 | 22 | |
22 | 23 | result = text_field_tag(name, nil, text_field_options.merge(html_options.merge({:id => element_id}))) |
23 | 24 | result += javascript_tag("jQuery('##{element_id}') |
... | ... | @@ -30,7 +31,7 @@ module TokenHelper |
30 | 31 | searchDelay: #{options[:search_delay].to_json}, |
31 | 32 | preventDuplicates: #{options[:prevent_duplicates].to_json}, |
32 | 33 | backspaceDeleteItem: #{options[:backspace_delete_item].to_json}, |
33 | - queryParam: #{name.to_json}, | |
34 | + queryParam: #{options[:query_param].to_json}, | |
34 | 35 | tokenLimit: #{options[:token_limit].to_json}, |
35 | 36 | onResult: #{options[:on_result]}, |
36 | 37 | onAdd: #{options[:on_add]}, |
... | ... | @@ -48,4 +49,4 @@ module TokenHelper |
48 | 49 | result |
49 | 50 | end |
50 | 51 | |
51 | -end | |
52 | 52 | \ No newline at end of file |
53 | +end | ... | ... |
app/models/article.rb
... | ... | @@ -157,14 +157,17 @@ class Article < ActiveRecord::Base |
157 | 157 | self.profile |
158 | 158 | end |
159 | 159 | |
160 | - def self.human_attribute_name(attrib, options = {}) | |
160 | + def self.human_attribute_name_with_customization(attrib, options={}) | |
161 | 161 | case attrib.to_sym |
162 | 162 | when :name |
163 | 163 | _('Title') |
164 | 164 | else |
165 | - _(self.superclass.human_attribute_name(attrib)) | |
165 | + _(self.human_attribute_name_without_customization(attrib)) | |
166 | 166 | end |
167 | 167 | end |
168 | + class << self | |
169 | + alias_method_chain :human_attribute_name, :customization | |
170 | + end | |
168 | 171 | |
169 | 172 | def css_class_list |
170 | 173 | [self.class.name.to_css_class] | ... | ... |
app/models/block.rb
... | ... | @@ -192,7 +192,7 @@ class Block < ActiveRecord::Base |
192 | 192 | |
193 | 193 | # Override in your subclasses. |
194 | 194 | # Define which events and context should cause the block cache to expire |
195 | - # Possible events are: :article, :profile, :friendship, :category | |
195 | + # Possible events are: :article, :profile, :friendship, :category, :role_assignment | |
196 | 196 | # Possible contexts are: :profile, :environment |
197 | 197 | def self.expire_on |
198 | 198 | { |
... | ... | @@ -234,4 +234,9 @@ class Block < ActiveRecord::Base |
234 | 234 | duplicated_block |
235 | 235 | end |
236 | 236 | |
237 | + def copy_from(block) | |
238 | + self.settings = block.settings | |
239 | + self.position = block.position | |
240 | + end | |
241 | + | |
237 | 242 | end | ... | ... |
app/models/box.rb
... | ... | @@ -28,9 +28,6 @@ class Box < ActiveRecord::Base |
28 | 28 | CategoriesBlock, |
29 | 29 | CommunitiesBlock, |
30 | 30 | EnterprisesBlock, |
31 | - # TODO EnvironmentStatisticsBlock is DEPRECATED and will be removed from | |
32 | - # the Noosfero core soon, see ActionItem3045 | |
33 | - EnvironmentStatisticsBlock, | |
34 | 31 | FansBlock, |
35 | 32 | FavoriteEnterprisesBlock, |
36 | 33 | FeedReaderBlock, |
... | ... | @@ -53,9 +50,6 @@ class Box < ActiveRecord::Base |
53 | 50 | CommunitiesBlock, |
54 | 51 | DisabledEnterpriseMessageBlock, |
55 | 52 | EnterprisesBlock, |
56 | - # TODO EnvironmentStatisticsBlock is DEPRECATED and will be removed from | |
57 | - # the Noosfero core soon, see ActionItem3045 | |
58 | - EnvironmentStatisticsBlock, | |
59 | 53 | FansBlock, |
60 | 54 | FavoriteEnterprisesBlock, |
61 | 55 | FeaturedProductsBlock, | ... | ... |
app/models/category.rb
... | ... | @@ -14,9 +14,6 @@ class Category < ActiveRecord::Base |
14 | 14 | validates_uniqueness_of :slug,:scope => [ :environment_id, :parent_id ], :message => N_('{fn} is already being used by another category.').fix_i18n |
15 | 15 | belongs_to :environment |
16 | 16 | |
17 | - validates_inclusion_of :display_color, :in => 1..15, :allow_nil => true | |
18 | - validates_uniqueness_of :display_color, :scope => :environment_id, :if => (lambda { |cat| ! cat.display_color.nil? }), :message => N_('{fn} was already assigned to another category.').fix_i18n | |
19 | - | |
20 | 17 | # Finds all top level categories for a given environment. |
21 | 18 | scope :top_level_for, lambda { |environment| |
22 | 19 | {:conditions => ['parent_id is null and environment_id = ?', environment.id ]} |
... | ... | @@ -42,6 +39,13 @@ class Category < ActiveRecord::Base |
42 | 39 | |
43 | 40 | acts_as_having_image |
44 | 41 | |
42 | + before_save :normalize_display_color | |
43 | + | |
44 | + def normalize_display_color | |
45 | + display_color.gsub!('#', '') if display_color | |
46 | + display_color = nil if display_color.blank? | |
47 | + end | |
48 | + | |
45 | 49 | scope :from_types, lambda { |types| |
46 | 50 | types.select{ |t| t.blank? }.empty? ? |
47 | 51 | { :conditions => { :type => types } } : |
... | ... | @@ -101,4 +105,12 @@ class Category < ActiveRecord::Base |
101 | 105 | self.children.find(:all, :conditions => {:display_in_menu => true}).empty? |
102 | 106 | end |
103 | 107 | |
108 | + def with_color | |
109 | + if display_color.blank? | |
110 | + parent.nil? ? nil : parent.with_color | |
111 | + else | |
112 | + self | |
113 | + end | |
114 | + end | |
115 | + | |
104 | 116 | end | ... | ... |
app/models/change_password.rb
... | ... | @@ -2,16 +2,19 @@ class ChangePassword < Task |
2 | 2 | |
3 | 3 | attr_accessor :password, :password_confirmation |
4 | 4 | |
5 | - def self.human_attribute_name(attrib, options = {}) | |
5 | + def self.human_attribute_name_with_customization(attrib, options={}) | |
6 | 6 | case attrib.to_sym |
7 | 7 | when :password |
8 | 8 | _('Password') |
9 | 9 | when :password_confirmation |
10 | 10 | _('Password Confirmation') |
11 | 11 | else |
12 | - _(self.superclass.human_attribute_name(attrib)) | |
12 | + _(self.human_attribute_name_without_customization(attrib)) | |
13 | 13 | end |
14 | 14 | end |
15 | + class << self | |
16 | + alias_method_chain :human_attribute_name, :customization | |
17 | + end | |
15 | 18 | |
16 | 19 | validates_presence_of :requestor |
17 | 20 | ... | ... |
app/models/domain.rb
app/models/environment.rb
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | # domains. |
4 | 4 | class Environment < ActiveRecord::Base |
5 | 5 | |
6 | - attr_accessible :name, :is_default, :signup_welcome_text_subject, :signup_welcome_text_body, :terms_of_use, :message_for_disabled_enterprise, :news_amount_by_folder, :default_language, :languages, :description, :organization_approval_method, :enabled_plugins, :enabled_features, :redirection_after_login, :redirection_after_signup, :contact_email, :theme, :reports_lower_bound, :noreply_email, :signup_welcome_screen_body | |
6 | + attr_accessible :name, :is_default, :signup_welcome_text_subject, :signup_welcome_text_body, :terms_of_use, :message_for_disabled_enterprise, :news_amount_by_folder, :default_language, :languages, :description, :organization_approval_method, :enabled_plugins, :enabled_features, :redirection_after_login, :redirection_after_signup, :contact_email, :theme, :reports_lower_bound, :noreply_email, :signup_welcome_screen_body, :members_whitelist_enabled, :members_whitelist | |
7 | 7 | |
8 | 8 | has_many :users |
9 | 9 | |
... | ... | @@ -124,6 +124,7 @@ class Environment < ActiveRecord::Base |
124 | 124 | 'organizations_are_moderated_by_default' => _("Organizations have moderated publication by default"), |
125 | 125 | 'enable_organization_url_change' => _("Allow organizations to change their URL"), |
126 | 126 | 'admin_must_approve_new_communities' => _("Admin must approve creation of communities"), |
127 | + 'admin_must_approve_new_users' => _("Admin must approve registration of new users"), | |
127 | 128 | 'show_balloon_with_profile_links_when_clicked' => _('Show a balloon with profile links when a profile image is clicked'), |
128 | 129 | 'xmpp_chat' => _('XMPP/Jabber based chat'), |
129 | 130 | 'show_zoom_button_on_article_images' => _('Show a zoom link on all article images'), |
... | ... | @@ -132,7 +133,8 @@ class Environment < ActiveRecord::Base |
132 | 133 | 'send_welcome_email_to_new_users' => _('Send welcome e-mail to new users'), |
133 | 134 | 'allow_change_of_redirection_after_login' => _('Allow users to set the page to redirect after login'), |
134 | 135 | 'display_my_communities_on_user_menu' => _('Display on menu the list of communities the user can manage'), |
135 | - 'display_my_enterprises_on_user_menu' => _('Display on menu the list of enterprises the user can manage') | |
136 | + 'display_my_enterprises_on_user_menu' => _('Display on menu the list of enterprises the user can manage'), | |
137 | + 'restrict_to_members' => _('Show content only to members') | |
136 | 138 | } |
137 | 139 | end |
138 | 140 | |
... | ... | @@ -175,9 +177,6 @@ class Environment < ActiveRecord::Base |
175 | 177 | |
176 | 178 | # "left" area |
177 | 179 | env.boxes[1].blocks << LoginBlock.new |
178 | - # TODO EnvironmentStatisticsBlock is DEPRECATED and will be removed from | |
179 | - # the Noosfero core soon, see ActionItem3045 | |
180 | - env.boxes[1].blocks << EnvironmentStatisticsBlock.new | |
181 | 180 | env.boxes[1].blocks << RecentDocumentsBlock.new |
182 | 181 | |
183 | 182 | # "right" area |
... | ... | @@ -303,6 +302,17 @@ class Environment < ActiveRecord::Base |
303 | 302 | settings[:signup_welcome_screen_body].present? |
304 | 303 | end |
305 | 304 | |
305 | + settings_items :members_whitelist_enabled, :type => :boolean, :default => false | |
306 | + settings_items :members_whitelist, :type => Array, :default => [] | |
307 | + | |
308 | + def in_whitelist?(person) | |
309 | + !members_whitelist_enabled || members_whitelist.include?(person.id) | |
310 | + end | |
311 | + | |
312 | + def members_whitelist=(members) | |
313 | + settings[:members_whitelist] = members.split(',').map(&:to_i) | |
314 | + end | |
315 | + | |
306 | 316 | def news_amount_by_folder=(amount) |
307 | 317 | settings[:news_amount_by_folder] = amount.to_i |
308 | 318 | end |
... | ... | @@ -650,6 +660,7 @@ class Environment < ActiveRecord::Base |
650 | 660 | url = 'http://' |
651 | 661 | url << (Noosfero.url_options.key?(:host) ? Noosfero.url_options[:host] : default_hostname) |
652 | 662 | url << ':' << Noosfero.url_options[:port].to_s if Noosfero.url_options.key?(:port) |
663 | + url << Noosfero.root('') | |
653 | 664 | url |
654 | 665 | end |
655 | 666 | |
... | ... | @@ -794,7 +805,7 @@ class Environment < ActiveRecord::Base |
794 | 805 | end |
795 | 806 | |
796 | 807 | def notification_emails |
797 | - [noreply_email.blank? ? nil : noreply_email].compact + admins.map(&:email) | |
808 | + [contact_email].select(&:present?) + admins.map(&:email) | |
798 | 809 | end |
799 | 810 | |
800 | 811 | after_create :create_templates | ... | ... |
app/models/environment_statistics_block.rb
... | ... | @@ -1,33 +0,0 @@ |
1 | -# TODO EnvironmentStatisticsBlock is DEPRECATED and will be removed from | |
2 | -# the Noosfero core soon, see ActionItem3045 | |
3 | - | |
4 | -class EnvironmentStatisticsBlock < Block | |
5 | - | |
6 | - def self.description | |
7 | - _('Environment stastistics (DEPRECATED)') | |
8 | - end | |
9 | - | |
10 | - def default_title | |
11 | - _('Statistics for %s') % owner.name | |
12 | - end | |
13 | - | |
14 | - def help | |
15 | - _('This block presents some statistics about your environment.') | |
16 | - end | |
17 | - | |
18 | - def content(args={}) | |
19 | - users = owner.people.visible.count | |
20 | - enterprises = owner.enterprises.visible.count | |
21 | - communities = owner.communities.visible.count | |
22 | - | |
23 | - info = [] | |
24 | - info << (n_('One user', '%{num} users', users) % { :num => users }) | |
25 | - unless owner.enabled?('disable_asset_enterprises') | |
26 | - info << (n_('One enterprise', '%{num} enterprises', enterprises) % { :num => enterprises }) | |
27 | - end | |
28 | - info << (n_('One community', '%{num} communities', communities) % { :num => communities }) | |
29 | - | |
30 | - block_title(title) + content_tag('ul', info.map {|item| content_tag('li', item) }.join("\n")) | |
31 | - end | |
32 | - | |
33 | -end |
app/models/external_feed.rb
... | ... | @@ -30,6 +30,7 @@ class ExternalFeed < ActiveRecord::Base |
30 | 30 | article.source = link |
31 | 31 | article.profile = blog.profile |
32 | 32 | article.parent = blog |
33 | + article.author_name = self.feed_title | |
33 | 34 | unless blog.children.exists?(:slug => article.slug) |
34 | 35 | article.save! |
35 | 36 | article.delay.create_activity | ... | ... |
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/feed_reader_block.rb
app/models/highlights_block.rb
app/models/link_list_block.rb
... | ... | @@ -78,16 +78,17 @@ class LinkListBlock < Block |
78 | 78 | address |
79 | 79 | end |
80 | 80 | if add !~ /^[a-z]+:\/\// && add !~ /^\// |
81 | - 'http://' + add | |
81 | + '//' + add | |
82 | 82 | else |
83 | + if root = Noosfero.root | |
84 | + if !add.starts_with?(root) | |
85 | + add = root + add | |
86 | + end | |
87 | + end | |
83 | 88 | add |
84 | 89 | end |
85 | 90 | end |
86 | 91 | |
87 | - def editable? | |
88 | - true | |
89 | - end | |
90 | - | |
91 | 92 | def icons_options |
92 | 93 | ICONS.map do |i| |
93 | 94 | "<span title=\"#{i[1]}\" class=\"icon-#{i[0]}\" onclick=\"changeIcon(this, '#{i[0]}')\"></span>".html_safe |
... | ... | @@ -100,4 +101,5 @@ class LinkListBlock < Block |
100 | 101 | sanitizer = HTML::WhiteListSanitizer.new |
101 | 102 | sanitizer.sanitize(text) |
102 | 103 | end |
104 | + | |
103 | 105 | end | ... | ... |
app/models/location_block.rb
app/models/main_block.rb
... | ... | @@ -0,0 +1,59 @@ |
1 | +class ModerateUserRegistration < Task | |
2 | + | |
3 | + settings_items :user_id, :type => String | |
4 | + settings_items :name, :type => String | |
5 | + settings_items :author_name, :type => String | |
6 | + settings_items :email, :type => String | |
7 | + | |
8 | + after_create :schedule_spam_checking | |
9 | + | |
10 | + alias :environment :target | |
11 | + alias :environment= :target= | |
12 | + | |
13 | + def schedule_spam_checking | |
14 | + self.delay.check_for_spam | |
15 | + end | |
16 | + | |
17 | + include Noosfero::Plugin::HotSpot | |
18 | + | |
19 | + def sender | |
20 | + "#{name} (#{email})" | |
21 | + end | |
22 | + | |
23 | + def perform | |
24 | + user=environment.users.find_by_id(user_id) | |
25 | + user.activate | |
26 | + end | |
27 | + | |
28 | + def title | |
29 | + _("New user") | |
30 | + end | |
31 | + | |
32 | + def subject | |
33 | + name | |
34 | + end | |
35 | + | |
36 | + def information | |
37 | + { :message => _('%{sender} wants to register.'), | |
38 | + :variables => {:sender => sender} } | |
39 | + end | |
40 | + | |
41 | + def icon | |
42 | + result = {:type => :defined_image, :src => '/images/icons-app/person-minor.png', :name => name} | |
43 | + end | |
44 | + | |
45 | + def target_notification_description | |
46 | + _('%{sender} tried to register.') % | |
47 | + {:sender => sender} | |
48 | + end | |
49 | + | |
50 | + def target_notification_message | |
51 | + target_notification_description + "\n\n" + | |
52 | + _('You need to login on %{system} in order to approve or reject this user.') % { :environment => self.environment } | |
53 | + end | |
54 | + | |
55 | + def target_notification_message | |
56 | + _("User \"%{user}\" just requested to register. You have to approve or reject it through the \"Pending Validations\" section in your control panel.\n") % { :user => self.name } | |
57 | + end | |
58 | + | |
59 | +end | |
0 | 60 | \ No newline at end of file | ... | ... |
app/models/organization.rb
... | ... | @@ -135,7 +135,11 @@ class Organization < Profile |
135 | 135 | end |
136 | 136 | |
137 | 137 | def notification_emails |
138 | - [contact_email.blank? ? nil : contact_email].compact + admins.map(&:email) | |
138 | + emails = [contact_email].select(&:present?) + admins.map(&:email) | |
139 | + if emails.empty? | |
140 | + emails << environment.contact_email | |
141 | + end | |
142 | + emails | |
139 | 143 | end |
140 | 144 | |
141 | 145 | def already_request_membership?(person) | ... | ... |
app/models/profile.rb
... | ... | @@ -346,16 +346,17 @@ class Profile < ActiveRecord::Base |
346 | 346 | end |
347 | 347 | |
348 | 348 | def copy_blocks_from(profile) |
349 | + template_boxes = profile.boxes.select{|box| box.position} | |
349 | 350 | self.boxes.destroy_all |
350 | - profile.boxes.each do |box| | |
351 | - new_box = Box.new | |
351 | + self.boxes = template_boxes.size.times.map { Box.new } | |
352 | + | |
353 | + template_boxes.each_with_index do |box, i| | |
354 | + new_box = self.boxes[i] | |
352 | 355 | new_box.position = box.position |
353 | - self.boxes << new_box | |
354 | 356 | box.blocks.each do |block| |
355 | 357 | new_block = block.class.new(:title => block[:title]) |
356 | - new_block.settings = block.settings | |
357 | - new_block.position = block.position | |
358 | - self.boxes[-1].blocks << new_block | |
358 | + new_block.copy_from(block) | |
359 | + new_box.blocks << new_block | |
359 | 360 | end |
360 | 361 | end |
361 | 362 | end | ... | ... |
app/models/profile_image_block.rb
app/models/profile_info_block.rb
app/models/profile_search_block.rb
app/models/rss_feed.rb
app/models/task.rb
... | ... | @@ -73,10 +73,6 @@ class Task < ActiveRecord::Base |
73 | 73 | end |
74 | 74 | end |
75 | 75 | |
76 | - def self.all_types | |
77 | - %w[Invitation EnterpriseActivation AddMember Ticket SuggestArticle AddFriend CreateCommunity AbuseComplaint ApproveComment ApproveArticle CreateEnterprise ChangePassword EmailActivation InviteFriend InviteMember] | |
78 | - end | |
79 | - | |
80 | 76 | # this method finished the task. It calls #perform, which must be overriden |
81 | 77 | # by subclasses. At the end a message (as returned by #finish_message) is |
82 | 78 | # sent to the requestor with #notify_requestor. |
... | ... | @@ -254,6 +250,10 @@ class Task < ActiveRecord::Base |
254 | 250 | { :conditions => [environment_condition, profile_condition].compact.join(' OR ') } |
255 | 251 | } |
256 | 252 | |
253 | + def self.pending_types_for(profile) | |
254 | + Task.to(profile).pending.select('distinct type').map { |t| [t.class.name, t.title] } | |
255 | + end | |
256 | + | |
257 | 257 | def opened? |
258 | 258 | status == Task::Status::ACTIVE || status == Task::Status::HIDDEN |
259 | 259 | end | ... | ... |
app/models/user.rb
... | ... | @@ -5,7 +5,7 @@ require 'user_activation_job' |
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') |
... | ... | @@ -16,15 +16,18 @@ class User < ActiveRecord::Base |
16 | 16 | end |
17 | 17 | |
18 | 18 | # FIXME ugly workaround |
19 | - def self.human_attribute_name(attrib, options={}) | |
19 | + def self.human_attribute_name_with_customization(attrib, options={}) | |
20 | 20 | case attrib.to_sym |
21 | 21 | when :login |
22 | 22 | return [_('Username'), _('Email')].join(' / ') |
23 | 23 | when :email |
24 | 24 | return _('e-Mail') |
25 | - else _(self.superclass.human_attribute_name(attrib)) | |
25 | + else _(self.human_attribute_name_without_customization(attrib)) | |
26 | 26 | end |
27 | 27 | end |
28 | + class << self | |
29 | + alias_method_chain :human_attribute_name, :customization | |
30 | + end | |
28 | 31 | |
29 | 32 | before_create do |user| |
30 | 33 | if user.environment.nil? |
... | ... | @@ -47,8 +50,12 @@ class User < ActiveRecord::Base |
47 | 50 | |
48 | 51 | user.person = p |
49 | 52 | end |
50 | - if user.environment.enabled?('skip_new_user_email_confirmation') | |
51 | - user.activate | |
53 | + if user.environment.enabled?('skip_new_user_email_confirmation') | |
54 | + if user.environment.enabled?('admin_must_approve_new_users') | |
55 | + create_moderate_task | |
56 | + else | |
57 | + user.activate | |
58 | + end | |
52 | 59 | end |
53 | 60 | end |
54 | 61 | after_create :deliver_activation_code |
... | ... | @@ -137,6 +144,15 @@ class User < ActiveRecord::Base |
137 | 144 | end |
138 | 145 | end |
139 | 146 | |
147 | + def create_moderate_task | |
148 | + @task = ModerateUserRegistration.new | |
149 | + @task.user_id = self.id | |
150 | + @task.name = self.name | |
151 | + @task.email = self.email | |
152 | + @task.target = self.environment | |
153 | + @task.save | |
154 | + end | |
155 | + | |
140 | 156 | def activated? |
141 | 157 | self.activation_code.nil? && !self.activated_at.nil? |
142 | 158 | end | ... | ... |
app/sweepers/profile_sweeper.rb
... | ... | @@ -8,9 +8,6 @@ class ProfileSweeper # < ActiveRecord::Observer |
8 | 8 | end |
9 | 9 | |
10 | 10 | def after_create(profile) |
11 | - # TODO EnvironmentStatisticsBlock is DEPRECATED and will be removed from | |
12 | - # the Noosfero core soon, see ActionItem3045 | |
13 | - expire_statistics_block_cache(profile) | |
14 | 11 | end |
15 | 12 | |
16 | 13 | protected |
... | ... | @@ -31,13 +28,6 @@ protected |
31 | 28 | expire_blogs(profile) if profile.organization? |
32 | 29 | end |
33 | 30 | |
34 | - # TODO EnvironmentStatisticsBlock is DEPRECATED and will be removed from | |
35 | - # the Noosfero core soon, see ActionItem3045 | |
36 | - def expire_statistics_block_cache(profile) | |
37 | - blocks = profile.environment.blocks.select { |b| b.kind_of?(EnvironmentStatisticsBlock) } | |
38 | - BlockSweeper.expire_blocks(blocks) | |
39 | - end | |
40 | - | |
41 | 31 | def expire_blogs(profile) |
42 | 32 | profile.blogs.select{|b| !b.empty?}.each do |blog| |
43 | 33 | pages = blog.posts.count / blog.posts_per_page + 1 | ... | ... |
app/sweepers/role_assignment_sweeper.rb
... | ... | @@ -14,19 +14,21 @@ protected |
14 | 14 | |
15 | 15 | def expire_caches(role_assignment) |
16 | 16 | expire_cache(role_assignment.accessor) |
17 | - expire_cache(role_assignment.resource) if role_assignment.resource.respond_to?(:cache_keys) | |
17 | + expire_cache(role_assignment.resource) if role_assignment.resource.kind_of?(Profile) | |
18 | 18 | end |
19 | 19 | |
20 | 20 | def expire_cache(profile) |
21 | 21 | per_page = Noosfero::Constants::PROFILE_PER_PAGE |
22 | - profile.cache_keys(:per_page => per_page).each { |ck| | |
23 | - expire_timeout_fragment(ck) | |
24 | - } | |
22 | + | |
23 | + profile.cache_keys(:per_page => per_page).each { |ck| expire_timeout_fragment(ck) } | |
24 | + expire_timeout_fragment(profile.members_cache_key(:per_page => per_page)) | |
25 | 25 | |
26 | 26 | profile.blocks_to_expire_cache.each { |block| |
27 | 27 | blocks = profile.blocks.select{|b| b.kind_of?(block)} |
28 | 28 | BlockSweeper.expire_blocks(blocks) |
29 | 29 | } |
30 | + | |
31 | + expire_blocks_cache(profile, [:role_assignment]) | |
30 | 32 | end |
31 | 33 | |
32 | 34 | end | ... | ... |
app/views/account/signup.html.erb
... | ... | @@ -2,18 +2,36 @@ |
2 | 2 | <div id='thanks-for-signing'> |
3 | 3 | <% if environment.has_custom_welcome_screen? %> |
4 | 4 | <%= environment.settings[:signup_welcome_screen_body].html_safe %> |
5 | - <% else %> | |
6 | - <h1><%= _("Welcome to %s!") % environment.name %></h1> | |
7 | - <h3><%= _("Thanks for signing up, we're thrilled to have you on our social network!") %></h3> | |
8 | - <p><%= _("Firstly, some tips for getting started:") %></p> | |
9 | - <h4><%= _("Confirm your account!") %></h4> | |
5 | + <% elsif environment.enabled?('admin_must_approve_new_users')%> | |
6 | + <h1><%= _("Welcome to %s!") % environment.name %></h1> | |
7 | + <h3><%= _("Thanks for signing up, we're thrilled to have you on our social network!") %></h3> | |
8 | + <p><%= _("Firstly, some tips for getting started:") %></p> | |
9 | + <% unless environment.enabled?('skip_new_user_email_confirmation') %> | |
10 | + <h4><%= _("Confirm your account and wait for admin approvement!") %></h4> | |
10 | 11 | <p><%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %></p> |
11 | - <p><%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> | |
12 | - <h4><%= _("What to do next?") %></h4> | |
13 | - <p><%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %></p> | |
14 | - <p><%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %></p> | |
15 | - <p><%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %></p> | |
16 | - <p><%= _("Start exploring and have fun!") %></p> | |
12 | + <p><%= _("You won't appear as %s until your account is confirmed and approved.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> | |
13 | + <% else %> | |
14 | + <h4><%= _("Wait for admin approvement!") %></h4> | |
15 | + <p><%= _("The administrators will evaluate your signup request for approvement.") %></p> | |
16 | + <p><%= _("You won't appear as %s until your account is approved.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> | |
17 | + <% end %> | |
18 | + <h4><%= _("What to do next?") %></h4> | |
19 | + <p><%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %></p> | |
20 | + <p><%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %></p> | |
21 | + <p><%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %></p> | |
22 | + <p><%= _("Start exploring and have fun!") %></p> | |
23 | + <% else %> | |
24 | + <h1><%= _("Welcome to %s!") % environment.name %></h1> | |
25 | + <h3><%= _("Thanks for signing up, we're thrilled to have you on our social network!") %></h3> | |
26 | + <p><%= _("Firstly, some tips for getting started:") %></p> | |
27 | + <h4><%= _("Confirm your account!") %></h4> | |
28 | + <p><%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %></p> | |
29 | + <p><%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %></p> | |
30 | + <h4><%= _("What to do next?") %></h4> | |
31 | + <p><%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %></p> | |
32 | + <p><%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %></p> | |
33 | + <p><%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %></p> | |
34 | + <p><%= _("Start exploring and have fun!") %></p> | |
17 | 35 | <% end %> |
18 | 36 | </div> |
19 | 37 | <% else %> | ... | ... |
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/catalog/index.html.erb
... | ... | @@ -14,8 +14,8 @@ |
14 | 14 | |
15 | 15 | <ul id="product-list"> |
16 | 16 | <% @products.each do |product| %> |
17 | - <% extra_content = @plugins.dispatch(:catalog_item_extras, product).collect { |content| instance_eval(&content) } %> | |
18 | - <% extra_content_list = @plugins.dispatch(:catalog_list_item_extras, product).collect { |content| instance_eval(&content) } %> | |
17 | + <% extra_content = @plugins.dispatch(:catalog_item_extras, product).collect { |content| instance_exec(&content) } %> | |
18 | + <% extra_content_list = @plugins.dispatch(:catalog_list_item_extras, product).collect { |content| instance_exec(&content) } %> | |
19 | 19 | |
20 | 20 | <% status = [] %> |
21 | 21 | <% status << 'not-available' if !product.available %> | ... | ... |
app/views/categories/_category.html.erb
1 | 1 | <li> |
2 | 2 | <div class='treeitem'> |
3 | - <%= display_color_for_category(category) %> | |
4 | - <%= category.name %> | |
3 | + <% unless category_color_style(category).empty? %> | |
4 | + <span class="color_marker" style="<%= category_color_style(category) %>" ></span> | |
5 | + <% end %> | |
6 | + <span><%= category.name %></span> | |
7 | + | |
5 | 8 | <% if category.children.count > 0 %> |
6 | 9 | <div class='button' id="category-loading-<%= category.id %>" style="position: relative;"> |
7 | 10 | <a href="#" id="show-button-<%= category.id %>" class="show-button" onclick="return false;" data-category="<%= category.id %>"><%= _('Show') %></a> | ... | ... |
app/views/categories/_form.html.erb
1 | +<%= stylesheet_link_tag 'spectrum.css' %> | |
2 | +<%= javascript_include_tag "spectrum.js" %> | |
3 | +<%= javascript_include_tag "colorpicker-noosfero.js" %> | |
4 | + | |
1 | 5 | <%= error_messages_for 'category' %> |
2 | 6 | |
3 | 7 | <%= labelled_form_for 'category', :html => { :multipart => true} do |f| %> |
... | ... | @@ -13,12 +17,13 @@ |
13 | 17 | <% end %> |
14 | 18 | <% end %> |
15 | 19 | |
16 | - <%= select_color_for_category if !environment.enabled?('disable_categories_menu') %> | |
17 | - | |
18 | 20 | <%= required f.text_field('name') %> |
19 | 21 | |
20 | 22 | <%= labelled_check_box(_('Display in the menu'), 'category[display_in_menu]', '1', @category.display_in_menu) %> |
21 | 23 | |
24 | + <%= labelled_colorpicker_field(_('Pick a color'), :category, 'display_color' ) unless environment.enabled?('disable_categories_menu')%> | |
25 | + <span id="color_preview" class = "color_marker" style="<%= category_color_style(@category) %>" ></span> | |
26 | + | |
22 | 27 | <%= f.fields_for :image_builder, @category.image do |i| %> |
23 | 28 | <%= file_field_or_thumbnail(_('Image:'), @category.image, i) %> |
24 | 29 | <% end %> | ... | ... |
app/views/cms/edit.html.erb
... | ... | @@ -31,9 +31,18 @@ |
31 | 31 | |
32 | 32 | <%= select_categories(:article, _('Categorize your article')) %> |
33 | 33 | |
34 | + <br /> | |
35 | + | |
34 | 36 | <%= f.text_field('tag_list', :size => 64) %> |
35 | 37 | <%= content_tag( 'small', _('Separate tags with commas') ) %> |
36 | 38 | |
39 | + <script> | |
40 | + jQuery('#article_tag_list').inputosaurus({ | |
41 | + autoCompleteSource: <%= "'/myprofile/#{profile.identifier}/cms/search_tags'," %> | |
42 | + activateFinalResult : true | |
43 | + }) | |
44 | + </script> | |
45 | + | |
37 | 46 | <div id='edit-article-options'> |
38 | 47 | <%= options_for_article(@article, @tokenized_children) %> |
39 | 48 | </div> | ... | ... |
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/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/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/features/index.html.erb
... | ... | @@ -37,6 +37,18 @@ Check all the features you want to enable for your environment, uncheck all the |
37 | 37 | <%= select_organization_approval_method('environment', 'organization_approval_method') %> |
38 | 38 | <hr/> |
39 | 39 | |
40 | +<h3><%= _('Members Whitelist') %></h3> | |
41 | + <div class="option"> | |
42 | + <%= check_box :environment, :members_whitelist_enabled %> | |
43 | + <label><%= _('Enable whitelist') %></label> | |
44 | + </div> | |
45 | + <div class="input"> | |
46 | + <div class="info"><%= _('Allow these people to access this environment:') %></div> | |
47 | + <% tokenized_members = prepare_to_token_input(environment.people.find(:all, :conditions => {:id => environment.members_whitelist})) %> | |
48 | + <%= token_input_field_tag('environment[members_whitelist]', 'search-members', {:action => 'search_members'}, {:focus => false, :hint_text => _('Type in a search term for a user'), :pre_populate => tokenized_members}) %> | |
49 | + </div> | |
50 | +<hr/> | |
51 | + | |
40 | 52 | <div> |
41 | 53 | <% button_bar do %> |
42 | 54 | <%= submit_button('save', _('Save changes')) %> | ... | ... |
app/views/layouts/_javascript.html.erb
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | 'jquery-ui-1.10.4/js/jquery-ui-1.10.4.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate', |
5 | 5 | 'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput', |
6 | 6 | 'add-and-join', 'report-abuse', 'catalog', 'manage-products', 'autogrow', |
7 | -'jquery-timepicker-addon/dist/jquery-ui-timepicker-addon', 'application.js', 'rails.js', :cache => 'cache/application' %> | |
7 | +'jquery-timepicker-addon/dist/jquery-ui-timepicker-addon', 'application.js', 'rails.js', 'inputosaurus.js', :cache => 'cache/application' %> | |
8 | 8 | |
9 | 9 | <% language = FastGettext.locale %> |
10 | 10 | <% %w{messages methods}.each do |type| %> | ... | ... |
app/views/layouts/application-ng.html.erb
... | ... | @@ -19,6 +19,9 @@ |
19 | 19 | <meta property="og:site_name" content="<%= profile ? profile.name : @environment.name %>"> |
20 | 20 | <meta property="og:description" content="<%= @page ? truncate(strip_tags(@page.body.to_s), :length => 200) : @environment.name %>"> |
21 | 21 | |
22 | + <!-- site root --> | |
23 | + <meta property="noosfero:root" content="<%= Noosfero.root %>"/> | |
24 | + | |
22 | 25 | <% if @page %> |
23 | 26 | <meta property="article:published_time" content="<%= show_date(@page.published_at) %>"> |
24 | 27 | <% @page.body_images_paths.each do |img| %> | ... | ... |
app/views/manage_products/_edit_description.html.erb
1 | 1 | <%= render :file => 'shared/tiny_mce', :locals => {:mode => 'simple'} %> |
2 | 2 | <%= remote_form_for(@product, |
3 | 3 | :loading => "small_loading('product-description-form')", |
4 | - :before => ("tinyMCE.triggerSave()" unless Rails.env == 'test'), | |
5 | 4 | :update => 'product-description', |
6 | 5 | :url => {:controller => 'manage_products', :action => 'edit', :id => @product, :field => 'description'}, |
7 | 6 | :html => {:id => 'product-description-form', :method => 'post'}) do |f| %> | ... | ... |
app/views/manage_products/show.html.erb
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | <%= render :partial => 'manage_products/display_image' %> |
14 | 14 | </div> |
15 | 15 | <div id='product-extra-content'> |
16 | - <% extra_content = @plugins.dispatch(:product_info_extras, @product).collect { |content| instance_eval(&content) } %> | |
16 | + <% extra_content = @plugins.dispatch(:product_info_extras, @product).collect { |content| instance_exec(&content) } %> | |
17 | 17 | <%= extra_content.join("\n") %> |
18 | 18 | </div> |
19 | 19 | <div id='product-info'> | ... | ... |
app/views/profile/_common.html.erb
1 | 1 | <% unless @action %> |
2 | 2 | <% cache_timeout(profile.cache_key + '-profile-general-info', 4.hours) do %> |
3 | - <tr> | |
4 | - <th colspan='2'> | |
5 | - <%= _('Content') %> | |
6 | - </th> | |
7 | - </tr> | |
8 | - | |
9 | - <% profile.blogs.each do |blog| %> | |
10 | - <tr> | |
11 | - <td><%= blog.name + ':' %></td> | |
12 | - <td> | |
13 | - <%= link_to(n_('One post', '%{num} posts', blog.posts.published.count) % { :num => blog.posts.published.count }, blog.url) %> | |
14 | - </td> | |
15 | - </tr> | |
16 | - <% end %> | |
17 | - <% profile.image_galleries.each do |gallery| %> | |
18 | - <tr> | |
19 | - <td><%= gallery.name + ':' %></td> | |
20 | - <td> | |
21 | - <%= link_to(n_('One picture', '%{num} pictures', gallery.images.published.count) % { :num => gallery.images.published.count }, gallery.url) %> | |
22 | - </td> | |
23 | - </tr> | |
24 | - <% end %> | |
25 | - | |
26 | - <tr> | |
27 | - <td><%= _('Events:') %></td> | |
28 | - <td> | |
29 | - <%= link_to profile.events.published.count, :controller => 'events', :action => 'events' %> | |
30 | - </td> | |
31 | - </tr> | |
32 | - <tr> | |
33 | - <td> | |
34 | - <%= _('Tags:') %> | |
35 | - </td> | |
36 | - <td> | |
37 | - <%= tag_cloud @tags, :id, { :action => 'tags' }, :max_size => 18, :min_size => 10%> | |
38 | - </td> | |
39 | - </tr> | |
3 | + <%= display_content %> | |
40 | 4 | |
41 | 5 | <% if !environment.enabled?('disable_categories') && !profile.interests.empty? %> |
42 | - <tr> | |
43 | - <th colspan='2'><%= _('Interests') %></th> | |
44 | - </tr> | |
45 | - <% profile.interests.each do |item| %> | |
46 | - <tr> | |
47 | - <td></td> | |
48 | - <td><%= link_to item.name, :controller => 'search', :action => 'category_index', :category_path => item.explode_path %></td> | |
49 | - </tr> | |
50 | - <% end %> | |
6 | + <%= display_interests %> | |
51 | 7 | <% end %> |
8 | + | |
9 | + <%= display_general %> | |
52 | 10 | <% end %> |
53 | 11 | <% end %> | ... | ... |
app/views/profile/_organization_profile.html.erb
1 | 1 | <table> |
2 | - <tr> | |
3 | - <th colspan='2'><%= _('Basic information')%></th> | |
4 | - </tr> | |
5 | - | |
6 | - <tr> | |
7 | - <td class='field-name'><%= _('Members') %></td> | |
8 | - <td> | |
9 | - <%= link_to profile.members_count, :controller => 'profile', :action => 'members' %> | |
10 | - </td> | |
11 | - </tr> | |
12 | - | |
13 | - <%= display_field(_('Type:'), profile, :privacy_setting, true) %> | |
14 | - | |
15 | - <%= display_field(_('Location:'), profile, :location, true) %> | |
16 | - | |
17 | - <tr> | |
18 | - <td class='field-name'><%= _('Profile created at:') %></td> | |
19 | - <td><%= show_date(profile.created_at) %></td> | |
20 | - </tr> | |
21 | - | |
22 | - <% if profile.kind_of?(Enterprise) && profile.environment.enabled?('products_for_enterprises') %> | |
23 | - <tr> | |
24 | - <td></td> | |
25 | - <td> | |
26 | - <%= link_to _('Products/Services'), :controller => 'catalog', :action => 'index' %> | |
27 | - </td> | |
28 | - </tr> | |
29 | - <% end %> | |
30 | - | |
31 | - <tr> | |
32 | - <td class='field-name'><%= _('Administrators:') %></td> | |
33 | - <td> | |
34 | - <%= profile.admins.map { |admin| link_to(admin.short_name, admin.url)}.join(', ') %> | |
35 | - </td> | |
36 | - </tr> | |
37 | - | |
2 | + <%= display_basic_information %> | |
3 | + <%= display_contact %> | |
4 | + <%= display_economic %> | |
38 | 5 | <%= render :partial => 'common' %> |
39 | 6 | </table> | ... | ... |
app/views/profile/_person_profile.html.erb
1 | 1 | <table> |
2 | - <tr> | |
3 | - <th colspan='2'><%= _('Basic information')%></th> | |
4 | - </tr> | |
5 | - <%= display_field(_('Sex:'), profile, :sex) { |gender| { 'male' => _('Male'), 'female' => _('Female') }[gender] } %> | |
6 | - <%= display_field(_('Date of birth:'), profile, :birth_date) { |date| show_date(date) }%> | |
7 | - <%= display_field _('Location:'), profile, :location %> | |
8 | - | |
9 | - <%= display_field(_('Type:'), profile, :privacy_setting, true) %> | |
10 | - | |
11 | - <tr> | |
12 | - <td class='field-name'><%= _('Profile created at:') %></td> | |
13 | - <td><%= show_date(profile.created_at) %></td> | |
14 | - </tr> | |
15 | - | |
16 | - <%= display_contact profile %> | |
2 | + <%= display_basic_information %> | |
3 | + <%= display_contact %> | |
4 | + <%= display_location %> | |
17 | 5 | |
18 | 6 | <% cache_timeout(profile.relationships_cache_key, 4.hours) do %> |
19 | - <%= display_work_info profile %> | |
20 | - | |
21 | - <tr> | |
22 | - <th colspan='2'><%= _('Network')%></th> | |
23 | - </tr> | |
24 | - <tr> | |
25 | - <td><%= _('Friends') + ':' %></td> | |
26 | - <td><%= link_to profile.friends.count, { :controller => 'profile', :action => 'friends' } %></td> | |
27 | - </tr> | |
28 | - <tr> | |
29 | - <td><%= _('Communities') + ':' %></td> | |
30 | - <td><%= link_to profile.communities.count, :controller => "profile", :action => 'communities' %></td> | |
31 | - </tr> | |
32 | - <% if environment.disabled?('disable_asset_enterprises') %> | |
33 | - <tr id="person-profile-network-enterprises"> | |
34 | - <td><%= _('Enterprises') + ':' %></td> | |
35 | - <td><%= link_to profile.enterprises.count, :controller => "profile", :action => 'enterprises' %></td> | |
36 | - </tr> | |
37 | - <% end %> | |
7 | + <%= display_work %> | |
8 | + <%= display_study %> | |
9 | + <%= display_network %> | |
38 | 10 | |
39 | 11 | <%= render :partial => 'common' %> |
40 | - | |
41 | 12 | <% end %> |
42 | 13 | </table> |
43 | 14 | ... | ... |
app/views/profile_editor/_person_form.html.erb
... | ... | @@ -25,6 +25,7 @@ |
25 | 25 | <%= optional_field(@person, 'address', labelled_form_field(_('Address (street and number)'), text_field(:profile_data, :address, :rel => _('Address')))) %> |
26 | 26 | <%= optional_field(@person, 'address_reference', labelled_form_field(_('Address reference'), text_field(:profile_data, :address_reference, :rel => _('Address reference')))) %> |
27 | 27 | <%= optional_field(@person, 'district', labelled_form_field(_('District'), text_field(:profile_data, :district, :rel => _('District')))) %> |
28 | +<%= optional_field(@person, 'image', labelled_form_field(_('Image'), file_field(:file, :image, :rel => _('Image')))) %> | |
28 | 29 | |
29 | 30 | <% optional_field(@person, 'schooling') do %> |
30 | 31 | <div class="formfieldline"> | ... | ... |
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/shared/tiny_mce.html.erb
1 | -<% extend MacrosHelper %> | |
2 | -<%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %> | |
3 | -<%= include_macro_js_files %> | |
4 | -<script type="text/javascript"> | |
5 | - var myplugins = "searchreplace,print,table,contextmenu,-macrosPlugin"; | |
6 | - var first_line, second_line; | |
7 | - var mode = '<%= mode ||= false %>' | |
8 | - <% if mode %> | |
9 | - first_line = "fontsizeselect,bold,italic,underline,bullist,numlist,justifyleft,justifycenter,justifyright,link,unlink" | |
10 | - second_line = "" | |
11 | - <% else %> | |
12 | - first_line = "print,separator,copy,paste,separator,undo,redo,separator,search,replace,separator,forecolor,fontsizeselect,formatselect" | |
13 | - second_line = "bold,italic,underline,strikethrough,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code,macros" | |
14 | - <% macros_with_buttons.each do |macro| %> | |
15 | - second_line += ',<%=macro.identifier %>' | |
16 | - <% end %> | |
17 | - <% end %> | |
18 | - | |
19 | - if (tinymce.isIE) { | |
20 | - // the paste plugin is only useful in Internet Explorer | |
21 | - myplugins = "paste," + myplugins; | |
22 | - } | |
1 | +<% | |
2 | +extend TinymceHelper | |
3 | +mode ||= false | |
4 | +%> | |
23 | 5 | |
6 | +<%= tinymce_js %> | |
7 | +<script type="text/javascript"> | |
24 | 8 | tinymce.create('tinymce.plugins.MacrosPlugin', { |
25 | 9 | createControl: function(n, cm) { |
26 | 10 | switch (n) { |
... | ... | @@ -49,56 +33,21 @@ tinymce.create('tinymce.plugins.MacrosPlugin', { |
49 | 33 | } |
50 | 34 | }); |
51 | 35 | |
36 | +function tinymce_macros_setup(editor) { | |
37 | + <% macros_with_buttons.each do |macro| %> | |
38 | + editor.addButton('<%= macro.identifier %>', { | |
39 | + title: <%= macro_title(macro).to_json %>, | |
40 | + onclick: <%= generate_macro_config_dialog(macro) %>, | |
41 | + image : '<%= macro.configuration[:icon_path]%>' | |
42 | + }); | |
43 | + <% end %> | |
44 | +} | |
45 | + | |
52 | 46 | // Register plugin with a short name |
53 | 47 | tinymce.PluginManager.add('macrosPlugin', tinymce.plugins.MacrosPlugin); |
54 | 48 | |
55 | -tinyMCE.init({ | |
56 | - mode : "textareas", | |
57 | - editor_selector : "mceEditor", | |
58 | - theme : "advanced", | |
59 | - relative_urls : false, | |
60 | - remove_script_host : false, | |
61 | - document_base_url : <%= environment.top_url.to_json %>, | |
62 | - plugins: myplugins, | |
63 | - theme_advanced_toolbar_location : "top", | |
64 | - theme_advanced_layout_manager: 'SimpleLayout', | |
65 | - theme_advanced_buttons1 : first_line, | |
66 | - theme_advanced_buttons2 : second_line, | |
67 | - theme_advanced_buttons3 : "", | |
68 | - theme_advanced_blockformats :"p,address,pre,h2,h3,h4,h5,h6", | |
69 | - paste_auto_cleanup_on_paste : true, | |
70 | - paste_insert_word_content_callback : "convertWord", | |
71 | - paste_use_dialog: false, | |
72 | - apply_source_formatting : true, | |
73 | - extended_valid_elements : "applet[style|archive|codebase|code|height|width],comment,iframe[src|style|allowtransparency|frameborder|width|height|scrolling],embed[title|src|type|height|width],audio[controls|autoplay],video[controls|autoplay],source[src|type]", | |
74 | - content_css: '/stylesheets/tinymce.css,<%= macro_css_files %>', | |
75 | - language: <%= tinymce_language.inspect %>, | |
76 | - entity_encoding: 'raw', | |
77 | - setup : function(ed) { | |
78 | - <% macros_with_buttons.each do |macro| %> | |
79 | - ed.addButton('<%= macro.identifier %>', { | |
80 | - title: <%= macro_title(macro).to_json %>, | |
81 | - onclick: <%= generate_macro_config_dialog(macro) %>, | |
82 | - image : '<%= macro.configuration[:icon_path]%>' | |
83 | - }); | |
84 | - <% end %> | |
85 | - } | |
49 | +jQuery(document).ready(function () { | |
50 | + <%= tinymce_init_js :mode => mode %> | |
86 | 51 | }); |
87 | - | |
88 | -function convertWord(type, content) { | |
89 | - switch (type) { | |
90 | - // Gets executed before the built in logic performes it's cleanups | |
91 | - case "before": | |
92 | - //content = content.toLowerCase(); // Some dummy logic | |
93 | - break; | |
94 | - | |
95 | - // Gets executed after the built in logic performes it's cleanups | |
96 | - case "after": | |
97 | - content = content.replace(/<!--\s*-->/, ''); | |
98 | - break; | |
99 | - } | |
100 | - | |
101 | - return content; | |
102 | -} | |
103 | - | |
104 | 52 | </script> |
53 | + | ... | ... |
app/views/tasks/index.html.erb
... | ... | @@ -3,10 +3,9 @@ |
3 | 3 | <h1><%= _("%s's pending tasks") % profile.name %></h1> |
4 | 4 | <p> |
5 | 5 | |
6 | -<% type_collection = [[nil, _('All')]] %> | |
7 | -<% type_collection += Task.all_types.sort_by {|klass| klass.constantize.new.title}.map{|s| [s, s.constantize.new.title] } %> | |
8 | - | |
9 | - | |
6 | +<% | |
7 | + type_collection = [[nil, _('All')]] + @task_types | |
8 | +%> | |
10 | 9 | |
11 | 10 | <% if !@failed.blank? %> |
12 | 11 | <div id="errorExplanation"> |
... | ... | @@ -39,7 +38,7 @@ |
39 | 38 | |
40 | 39 | <ul class='task-list'> |
41 | 40 | <p> |
42 | - <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => 'document.location.href = "?filter_type="+this.value')%> | |
41 | + <%= labelled_select(_('Filter')+': ', :filter_type, :first, :last, @filter, type_collection, :onchange => "document.location.href = '?filter_type='+this.value") %> | |
43 | 42 | </p> |
44 | 43 | <p> |
45 | 44 | <%= labelled_select(_("Set all to: "), 'set-decisions', 'first', 'last', nil, [['',""],['accept',_("Accept")],['reject',_("Reject")],['skip',_("Skip")]], :id => "up-set-all-tasks-to") %> | ... | ... |
config/application.rb
... | ... | @@ -108,13 +108,15 @@ module Noosfero |
108 | 108 | |
109 | 109 | # Your secret key for verifying cookie session data integrity. |
110 | 110 | # If you change this key, all old sessions will become invalid! |
111 | - # Make sure the secret is at least 30 characters and all random, | |
111 | + # Make sure the secret is at least 30 characters and all random, | |
112 | 112 | # no regular words or you'll be exposed to dictionary attacks. |
113 | 113 | config.secret_token = noosfero_session_secret |
114 | 114 | config.action_dispatch.session = { |
115 | 115 | :key => '_noosfero_session', |
116 | 116 | } |
117 | 117 | |
118 | + config.i18n.load_path += Dir.glob "#{Rails.root}/{baseplugins,config/plugins/*}/locales/*.{rb,yml}" | |
119 | + | |
118 | 120 | Noosfero::Plugin.setup(config) |
119 | 121 | |
120 | 122 | end | ... | ... |
config/cucumber.yml
1 | 1 | <% base_requires = '-r features/support -r features/step_definitions' %> |
2 | -<% default_options = "--color --format progress --strict --tags ~@selenium --tags ~@selenium-fixme --tags ~@fixme --exclude features/support/selenium.rb #{base_requires}" %> | |
2 | +<% default_options = "--format progress --strict --tags ~@selenium --tags ~@selenium-fixme --tags ~@fixme --exclude features/support/selenium.rb #{base_requires}" %> | |
3 | +<% | |
4 | + default_options += ' --color' if $stdout.isatty | |
5 | +%> | |
3 | 6 | <% selenium_options = "--strict --tags @selenium #{base_requires}" %> |
4 | 7 | |
5 | 8 | default: <%= default_options %> | ... | ... |
config/initializers/activities_counter_cache.rb
1 | -if Delayed::Backend::ActiveRecord::Job.table_exists? | |
1 | +if Delayed::Backend::ActiveRecord::Job.table_exists? && | |
2 | + Delayed::Backend::ActiveRecord::Job.attribute_names.include?('queue') | |
2 | 3 | job = Delayed::Backend::ActiveRecord::Job.all :conditions => ['handler LIKE ?', "%ActivitiesCounterCacheJob%"] |
3 | 4 | if job.blank? |
4 | 5 | Delayed::Backend::ActiveRecord::Job.enqueue(ActivitiesCounterCacheJob.new, {:priority => -3}) | ... | ... |
config/initializers/log_memory_consumption.rb
... | ... | @@ -1,5 +0,0 @@ |
1 | -if Delayed::Backend::ActiveRecord::Job.table_exists? | |
2 | - jobs = Delayed::Backend::ActiveRecord::Job.all :conditions => ['handler LIKE ?', "%LogMemoryConsumptionJob%"] | |
3 | - jobs.map(&:destroy) if jobs.present? | |
4 | - Delayed::Backend::ActiveRecord::Job.enqueue(LogMemoryConsumptionJob.new) | |
5 | -end |
... | ... | @@ -0,0 +1,9 @@ |
1 | +if defined? PhusionPassenger | |
2 | + | |
3 | + # from http://russbrooks.com/2010/10/20/rails-cache-memcache-on-passenger-with-smart-spawning | |
4 | + PhusionPassenger.on_event :starting_worker_process do |forked| | |
5 | + if forked | |
6 | + Rails.cache.instance_variable_get(:@data).reset if Rails.cache.class == ActiveSupport::Cache::MemCacheStore | |
7 | + end | |
8 | + end | |
9 | +end | ... | ... |
config/initializers/person_notification.rb
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/20140708115518_index_domains_filtered_fields.rb
0 → 100644
... | ... | @@ -0,0 +1,10 @@ |
1 | +class IndexDomainsFilteredFields < ActiveRecord::Migration | |
2 | + | |
3 | + def self.up | |
4 | + add_index :domains, [:name] | |
5 | + add_index :domains, [:is_default] | |
6 | + add_index :domains, [:owner_id, :owner_type] | |
7 | + add_index :domains, [:owner_id, :owner_type, :is_default] | |
8 | + end | |
9 | + | |
10 | +end | ... | ... |
db/migrate/20140708121356_index_articles_filtered_fields.rb
0 → 100644
... | ... | @@ -0,0 +1,12 @@ |
1 | +class IndexArticlesFilteredFields < ActiveRecord::Migration | |
2 | + def self.up | |
3 | + %w[articles article_versions].each do |table| | |
4 | + add_index table, [:path] | |
5 | + add_index table, [:path, :profile_id] | |
6 | + end | |
7 | + add_index :articles, [:type] | |
8 | + add_index :articles, [:type, :parent_id] | |
9 | + add_index :articles, [:type, :profile_id] | |
10 | + end | |
11 | + | |
12 | +end | ... | ... |
db/migrate/20140724134601_fix_yaml_encoding.rb
db/migrate/20140724180943_add_index_to_blog_posts_sort.rb
0 → 100644
... | ... | @@ -0,0 +1,13 @@ |
1 | +class AddIndexToBlogPostsSort < ActiveRecord::Migration | |
2 | + def self.up | |
3 | + %w[articles article_versions].each do |table| | |
4 | + add_index table, [:published_at, :id] | |
5 | + end | |
6 | + end | |
7 | + | |
8 | + def self.down | |
9 | + %w[articles article_versions].each do |table| | |
10 | + remove_index table, [:published_at, :id] | |
11 | + end | |
12 | + end | |
13 | +end | ... | ... |
db/migrate/20140807134625_change_category_display_color_to_string.rb
0 → 100644
... | ... | @@ -0,0 +1,36 @@ |
1 | +class ChangeCategoryDisplayColorToString < ActiveRecord::Migration | |
2 | + | |
3 | + COLORS = ['ffa500', '00FF00', 'a020f0', 'ff0000', '006400', '191970', '0000ff', 'a52a2a', '32cd32', 'add8e6', '483d8b', 'b8e9ee', 'f5f5dc', 'ffff00', 'f4a460'] | |
4 | + | |
5 | + def self.up | |
6 | + change_table :categories do |t| | |
7 | + t.string :display_color_tmp, :limit => 6 | |
8 | + end | |
9 | + | |
10 | + COLORS.each_with_index do |color, i| | |
11 | + Category.update_all({:display_color_tmp => color}, {:display_color => i+1}) | |
12 | + end | |
13 | + | |
14 | + change_table :categories do |t| | |
15 | + t.remove :display_color | |
16 | + t.rename :display_color_tmp, :display_color | |
17 | + end | |
18 | + end | |
19 | + | |
20 | + def self.down | |
21 | + puts "WARNING: only old defined colors will be reverted" | |
22 | + | |
23 | + change_table :categories do |t| | |
24 | + t.integer :display_color_tmp | |
25 | + end | |
26 | + | |
27 | + COLORS.each_with_index do |color, i| | |
28 | + Category.update_all({:display_color_tmp => i+1}, {:display_color => color}) | |
29 | + end | |
30 | + | |
31 | + change_table :categories do |t| | |
32 | + t.remove :display_color | |
33 | + t.rename :display_color_tmp, :display_color | |
34 | + end | |
35 | + end | |
36 | +end | ... | ... |
db/migrate/20140827191326_remove_environment_statistics_block.rb
0 → 100644
... | ... | @@ -0,0 +1,9 @@ |
1 | +class RemoveEnvironmentStatisticsBlock < ActiveRecord::Migration | |
2 | + def self.up | |
3 | + update("UPDATE blocks SET type = 'StatisticsBlock' WHERE type = 'EnvironmentStatisticsBlock'") | |
4 | + end | |
5 | + | |
6 | + def self.down | |
7 | + say("Nothing to undo (cannot recover the data)") | |
8 | + end | |
9 | +end | ... | ... |
db/schema.rb
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | # |
12 | 12 | # It's strongly recommended to check this file into your version control system. |
13 | 13 | |
14 | -ActiveRecord::Schema.define(:version => 20140724134601) do | |
14 | +ActiveRecord::Schema.define(:version => 20140827191326) do | |
15 | 15 | |
16 | 16 | create_table "abuse_reports", :force => true do |t| |
17 | 17 | t.integer "reporter_id" |
... | ... | @@ -95,12 +95,15 @@ ActiveRecord::Schema.define(:version => 20140724134601) do |
95 | 95 | t.integer "license_id" |
96 | 96 | t.integer "image_id" |
97 | 97 | t.integer "position" |
98 | - t.integer "created_by_id" | |
99 | 98 | t.integer "spam_comments_count", :default => 0 |
100 | 99 | t.integer "author_id" |
100 | + t.integer "created_by_id" | |
101 | 101 | end |
102 | 102 | |
103 | 103 | add_index "article_versions", ["article_id"], :name => "index_article_versions_on_article_id" |
104 | + add_index "article_versions", ["path", "profile_id"], :name => "index_article_versions_on_path_and_profile_id" | |
105 | + add_index "article_versions", ["path"], :name => "index_article_versions_on_path" | |
106 | + add_index "article_versions", ["published_at", "id"], :name => "index_article_versions_on_published_at_and_id" | |
104 | 107 | |
105 | 108 | create_table "articles", :force => true do |t| |
106 | 109 | t.string "name" |
... | ... | @@ -143,9 +146,9 @@ ActiveRecord::Schema.define(:version => 20140724134601) do |
143 | 146 | t.integer "license_id" |
144 | 147 | t.integer "image_id" |
145 | 148 | t.integer "position" |
146 | - t.integer "created_by_id" | |
147 | 149 | t.integer "spam_comments_count", :default => 0 |
148 | 150 | t.integer "author_id" |
151 | + t.integer "created_by_id" | |
149 | 152 | end |
150 | 153 | |
151 | 154 | add_index "articles", ["comments_count"], :name => "index_articles_on_comments_count" |
... | ... | @@ -153,9 +156,15 @@ ActiveRecord::Schema.define(:version => 20140724134601) do |
153 | 156 | add_index "articles", ["hits"], :name => "index_articles_on_hits" |
154 | 157 | add_index "articles", ["name"], :name => "index_articles_on_name" |
155 | 158 | add_index "articles", ["parent_id"], :name => "index_articles_on_parent_id" |
159 | + add_index "articles", ["path", "profile_id"], :name => "index_articles_on_path_and_profile_id" | |
160 | + add_index "articles", ["path"], :name => "index_articles_on_path" | |
156 | 161 | add_index "articles", ["profile_id"], :name => "index_articles_on_profile_id" |
162 | + add_index "articles", ["published_at", "id"], :name => "index_articles_on_published_at_and_id" | |
157 | 163 | add_index "articles", ["slug"], :name => "index_articles_on_slug" |
158 | 164 | add_index "articles", ["translation_of_id"], :name => "index_articles_on_translation_of_id" |
165 | + add_index "articles", ["type", "parent_id"], :name => "index_articles_on_type_and_parent_id" | |
166 | + add_index "articles", ["type", "profile_id"], :name => "index_articles_on_type_and_profile_id" | |
167 | + add_index "articles", ["type"], :name => "index_articles_on_type" | |
159 | 168 | |
160 | 169 | create_table "articles_categories", :id => false, :force => true do |t| |
161 | 170 | t.integer "article_id" |
... | ... | @@ -194,19 +203,19 @@ ActiveRecord::Schema.define(:version => 20140724134601) do |
194 | 203 | create_table "categories", :force => true do |t| |
195 | 204 | t.string "name" |
196 | 205 | t.string "slug" |
197 | - t.text "path", :default => "" | |
198 | - t.integer "display_color" | |
206 | + t.text "path", :default => "" | |
199 | 207 | t.integer "environment_id" |
200 | 208 | t.integer "parent_id" |
201 | 209 | t.string "type" |
202 | 210 | t.float "lat" |
203 | 211 | t.float "lng" |
204 | - t.boolean "display_in_menu", :default => false | |
205 | - t.integer "children_count", :default => 0 | |
206 | - t.boolean "accept_products", :default => true | |
212 | + t.boolean "display_in_menu", :default => false | |
213 | + t.integer "children_count", :default => 0 | |
214 | + t.boolean "accept_products", :default => true | |
207 | 215 | t.integer "image_id" |
208 | 216 | t.string "acronym" |
209 | 217 | t.string "abbreviation" |
218 | + t.string "display_color", :limit => 6 | |
210 | 219 | end |
211 | 220 | |
212 | 221 | create_table "categories_profiles", :id => false, :force => true do |t| |
... | ... | @@ -277,6 +286,11 @@ ActiveRecord::Schema.define(:version => 20140724134601) do |
277 | 286 | t.string "google_maps_key" |
278 | 287 | end |
279 | 288 | |
289 | + add_index "domains", ["is_default"], :name => "index_domains_on_is_default" | |
290 | + add_index "domains", ["name"], :name => "index_domains_on_name" | |
291 | + add_index "domains", ["owner_id", "owner_type", "is_default"], :name => "index_domains_on_owner_id_and_owner_type_and_is_default" | |
292 | + add_index "domains", ["owner_id", "owner_type"], :name => "index_domains_on_owner_id_and_owner_type" | |
293 | + | |
280 | 294 | create_table "environments", :force => true do |t| |
281 | 295 | t.string "name" |
282 | 296 | t.string "contact_email" | ... | ... |
debian/changelog
1 | +noosfero (1.0~rc3) wheezy-test; urgency=low | |
2 | + | |
3 | + * Third release candidate to Noosfero 1.0 | |
4 | + | |
5 | + -- Antonio Terceiro <terceiro@debian.org> Fri, 12 Sep 2014 16:20:58 -0300 | |
6 | + | |
7 | +noosfero (1.0~rc2) wheezy-test; urgency=low | |
8 | + | |
9 | + * Second 1.0 release candidate | |
10 | + | |
11 | + -- Antonio Terceiro <terceiro@debian.org> Fri, 12 Sep 2014 13:01:11 -0300 | |
12 | + | |
13 | +noosfero (1.0~rc1) wheezy-test; urgency=low | |
14 | + | |
15 | + * First 1.0 release candidate | |
16 | + | |
17 | + -- Rodrigo Souto <vagrant@wheezy-base> Fri, 15 Aug 2014 16:35:35 -0300 | |
18 | + | |
1 | 19 | noosfero (0.99.0~rc20140618202455) wheezy-test; urgency=low |
2 | 20 | |
3 | 21 | * Another rc with rails3 |
4 | 22 | |
5 | 23 | -- Rodrigo Souto <rodrigo@colivre.coop.br> Wed, 18 Jun 2014 20:25:01 +0000 |
6 | 24 | |
25 | +noosfero (0.47.4) unstable; urgency=low | |
26 | + | |
27 | + * Bugfixes and performance optimizations | |
28 | + | |
29 | + -- Rodrigo Souto <rodrigo@colivre.coop.br> Thu, 21 Aug 2014 19:25:37 +0000 | |
30 | + | |
7 | 31 | noosfero (0.47.3) unstable; urgency=low |
8 | 32 | |
9 | 33 | * Bugfixes release | ... | ... |
debian/control
... | ... | @@ -9,7 +9,7 @@ Build-Depends: |
9 | 9 | ruby-gettext, |
10 | 10 | ruby-sqlite3, |
11 | 11 | rake, |
12 | - rails3 (>= 3.2.6-1~), | |
12 | + rails3 (>= 3.2.19-1~), | |
13 | 13 | ruby-rspec, |
14 | 14 | ruby-rspec-rails, |
15 | 15 | ruby-will-paginate, |
... | ... | @@ -30,12 +30,14 @@ Vcs-Browser: http://git.colivre.coop.br/?p=noosfero.git |
30 | 30 | |
31 | 31 | Package: noosfero |
32 | 32 | Architecture: all |
33 | +Pre-Depends: ruby1.8 (>= 1.8.7.358) | |
33 | 34 | Depends: |
34 | 35 | rails3 (>= 3.2.6-1~), |
35 | - ruby, | |
36 | - ruby1.9.3, | |
36 | + ruby (>= 1:1.9.3), | |
37 | 37 | rake, |
38 | 38 | ruby-dalli, |
39 | + ruby-exception-notification, | |
40 | + ruby-gettext, | |
39 | 41 | ruby-fast-gettext, |
40 | 42 | ruby-pg, |
41 | 43 | ruby-rmagick, | ... | ... |
debian/docs
debian/noosfero.install
debian/noosfero.links
... | ... | @@ -15,3 +15,4 @@ var/lib/noosfero-data/public/thumbnails usr/share/noosfero/public/th |
15 | 15 | usr/share/noosfero/public/designs/themes/noosfero usr/share/noosfero/public/designs/themes/default |
16 | 16 | usr/share/noosfero/public/designs/icons/tango usr/share/noosfero/public/designs/icons/default |
17 | 17 | usr/share/noosfero/script/noosfero-plugins usr/sbin/noosfero-plugins |
18 | +usr/share/noosfero/Gemfile.lock /dev/null | ... | ... |
debian/rules
etc/init.d/noosfero
... | ... | @@ -45,7 +45,7 @@ if [ -z "$NOOSFERO_DIR" ] || [ -z "$NOOSFERO_USER" ]; then |
45 | 45 | fi |
46 | 46 | |
47 | 47 | if test -x /usr/sbin/noosfero-check-dbconfig ; then |
48 | - if ! noosfero-check-dbconfig; then | |
48 | + if ! /usr/sbin/noosfero-check-dbconfig; then | |
49 | 49 | echo "Noosfero database access not configured, service disabled." |
50 | 50 | exit 0 |
51 | 51 | fi | ... | ... |