parlement 0.5 → 0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. data/CHANGES +26 -0
  2. data/README +2 -1
  3. data/app/controllers/account_controller.rb +27 -18
  4. data/app/controllers/application.rb +1 -3
  5. data/app/controllers/elt_controller.rb +92 -42
  6. data/app/helpers/elt_helper.rb +7 -18
  7. data/app/models/elt.rb +76 -22
  8. data/app/models/mail.rb +13 -10
  9. data/app/models/mail_notify.rb +11 -27
  10. data/app/models/person.rb +1 -1
  11. data/app/views/account/_login.rhtml +14 -9
  12. data/app/views/account/_show.rhtml +23 -9
  13. data/app/views/elt/_choice.rhtml +32 -0
  14. data/app/views/elt/_elt.rhtml +90 -78
  15. data/app/views/elt/_list.rhtml +83 -50
  16. data/app/views/elt/_listByDate.rhtml +60 -0
  17. data/app/views/elt/_listByVote.rhtml +71 -0
  18. data/app/views/elt/choices.rhtml +29 -0
  19. data/app/views/elt/new.rhtml +11 -26
  20. data/app/views/elt/rss.rxml +14 -12
  21. data/app/views/elt/show.rhtml +23 -29
  22. data/app/views/elt/vote_rss.rxml +40 -0
  23. data/app/views/layouts/top.rhtml +5 -13
  24. data/config/environment.rb +3 -1
  25. data/config/routes.rb +4 -0
  26. data/db/development_structure.sql +5 -2
  27. data/db/migrate/002_nested_set.rb +22 -0
  28. data/db/migrate/003_elt_children_count.rb +12 -0
  29. data/public/images/ParlementLogo.png +0 -0
  30. data/public/images/indicator.gif +0 -0
  31. data/public/javascripts/behaviour.js +254 -0
  32. data/public/javascripts/mybehaviour.js +96 -0
  33. data/public/javascripts/slider.js +188 -163
  34. data/test/fixtures/elts.yml +19 -0
  35. data/test/fixtures/mail/mail_ruby +4 -0
  36. data/test/fixtures/mail/mail_rubyChild +1 -1
  37. data/test/fixtures/mail/mail_rubyChild2 +1 -1
  38. data/test/functional/account_controller_test.rb +24 -0
  39. data/test/functional/elt_controller_test.rb +64 -4
  40. data/test/unit/elt_test.rb +28 -4
  41. data/test/unit/mail_notify_test.rb +7 -5
  42. data/test/unit/mail_test.rb +1 -1
  43. data/vendor/plugins/google_analytics/README +19 -0
  44. data/vendor/plugins/google_analytics/Rakefile +22 -0
  45. data/vendor/plugins/google_analytics/init.rb +3 -0
  46. data/vendor/plugins/google_analytics/lib/rubaidh/google_analytics.rb +70 -0
  47. data/vendor/plugins/google_analytics/test/google_analytics_test.rb +8 -0
  48. data/vendor/plugins/output_compression/README +4 -0
  49. data/vendor/plugins/output_compression/Rakefile +22 -0
  50. data/vendor/plugins/output_compression/init.rb +2 -0
  51. data/vendor/plugins/output_compression/lib/output_compression.rb +66 -0
  52. data/vendor/plugins/output_compression/tasks/output_compression_tasks.rake +4 -0
  53. data/vendor/plugins/output_compression/test/output_compression_test.rb +8 -0
  54. metadata +32 -4
  55. data/public/images/smile.svg +0 -257
  56. data/public/javascripts/borders.js +0 -687
@@ -1,257 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
3
- <svg
4
- xmlns:dc="http://purl.org/dc/elements/1.1/"
5
- xmlns:cc="http://web.resource.org/cc/"
6
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7
- xmlns:svg="http://www.w3.org/2000/svg"
8
- xmlns="http://www.w3.org/2000/svg"
9
- xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
10
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11
- id="svg215"
12
- sodipodi:version="0.32"
13
- width="210mm"
14
- height="297mm"
15
- sodipodi:docbase="/home/manu/develop/parlement/trunk/public/images"
16
- sodipodi:docname="smile.svg"
17
- inkscape:version="0.42"
18
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/smile.png"
19
- inkscape:export-xdpi="90.000000"
20
- inkscape:export-ydpi="90.000000">
21
- <metadata
22
- id="metadata6761">
23
- <rdf:RDF>
24
- <cc:Work
25
- rdf:about="">
26
- <dc:format>image/svg+xml</dc:format>
27
- <dc:type
28
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
29
- </cc:Work>
30
- </rdf:RDF>
31
- </metadata>
32
- <defs
33
- id="defs217">
34
- <linearGradient
35
- id="linearGradient8766">
36
- <stop
37
- id="stop8768"
38
- offset="0.0000000"
39
- style="stop-color:#ff8000;stop-opacity:1.0000000;" />
40
- <stop
41
- id="stop8770"
42
- offset="1"
43
- style="stop-color:#99ff99;stop-opacity:0;" />
44
- </linearGradient>
45
- <marker
46
- inkscape:stockid="CurveIn"
47
- orient="auto"
48
- refY="0.0"
49
- refX="0.0"
50
- id="CurveIn"
51
- style="overflow:visible">
52
- <path
53
- sodipodi:nodetypes="ccc"
54
- id="path942"
55
- d="M 4.6254930,-5.0456926 C 1.8654930,-5.0456926 -0.37450702,-2.8056926 -0.37450702,-0.045692580 C -0.37450702,2.7143074 1.8654930,4.9543074 4.6254930,4.9543074"
56
- style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none;fill:none"
57
- transform="scale(0.6)" />
58
- </marker>
59
- </defs>
60
- <sodipodi:namedview
61
- id="base"
62
- showgrid="false"
63
- snaptogrid="true"
64
- inkscape:zoom="1.2771158"
65
- inkscape:cx="382.00882"
66
- inkscape:cy="816.03241"
67
- inkscape:window-width="868"
68
- inkscape:window-height="514"
69
- inkscape:window-x="400"
70
- inkscape:window-y="118"
71
- inkscape:current-layer="svg215" />
72
- <path
73
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
74
- d="M 177.165 343.701 L 177.165 414.567 "
75
- id="path204"
76
- transform="translate(336.614,-177.166)"
77
- inkscape:export-xdpi="90.000000"
78
- inkscape:export-ydpi="90.000000" />
79
- <path
80
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
81
- d="M 283.465 361.417 L 248.032 396.85 "
82
- id="path224"
83
- transform="translate(301.181,-194.882)"
84
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
85
- inkscape:export-xdpi="90.000000"
86
- inkscape:export-ydpi="90.000000" />
87
- <path
88
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
89
- d="M 177.165 396.85 L 141.732 361.417 "
90
- id="path225"
91
- transform="translate(301.181,-194.882)"
92
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
93
- inkscape:export-xdpi="90.000000"
94
- inkscape:export-ydpi="90.000000" />
95
- <path
96
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
97
- d="M 177.165 467.717 L 248.032 467.717 "
98
- id="path227"
99
- transform="translate(301.181,-194.882)"
100
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
101
- inkscape:export-xdpi="90.000000"
102
- inkscape:export-ydpi="90.000000" />
103
- <path
104
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
105
- d="M 283.465 503.15 L 318.898 467.717 "
106
- id="path228"
107
- transform="translate(301.181,-194.882)"
108
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
109
- inkscape:export-xdpi="90.000000"
110
- inkscape:export-ydpi="90.000000" />
111
- <path
112
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
113
- d="M 141.732 503.15 L 106.299 467.717 "
114
- id="path229"
115
- transform="translate(301.181,-194.882)"
116
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
117
- inkscape:export-xdpi="90.000000"
118
- inkscape:export-ydpi="90.000000" />
119
- <path
120
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
121
- d="M 212.598 503.15 L 212.598 574.016 "
122
- id="path230"
123
- transform="translate(301.181,-194.882)"
124
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
125
- inkscape:export-xdpi="90.000000"
126
- inkscape:export-ydpi="90.000000" />
127
- <path
128
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
129
- d="M 177.165 538.583 L 248.032 538.583 "
130
- id="path231"
131
- transform="translate(301.181,-194.882)"
132
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
133
- inkscape:export-xdpi="90.000000"
134
- inkscape:export-ydpi="90.000000" />
135
- <path
136
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
137
- d="M 248.032 538.583 L 283.465 503.15 "
138
- id="path232"
139
- transform="translate(301.181,-194.882)"
140
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
141
- inkscape:export-xdpi="90.000000"
142
- inkscape:export-ydpi="90.000000" />
143
- <path
144
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
145
- d="M 283.465 574.016 L 318.898 538.583 "
146
- id="path233"
147
- transform="translate(301.181,-194.882)"
148
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
149
- inkscape:export-xdpi="90.000000"
150
- inkscape:export-ydpi="90.000000" />
151
- <path
152
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
153
- d="M 177.165 538.583 L 141.732 503.15 "
154
- id="path234"
155
- transform="translate(301.181,-194.882)"
156
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
157
- inkscape:export-xdpi="90.000000"
158
- inkscape:export-ydpi="90.000000" />
159
- <path
160
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
161
- d="M 106.299 538.583 L 141.732 574.016 "
162
- id="path235"
163
- transform="translate(301.181,-194.882)"
164
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
165
- inkscape:export-xdpi="90.000000"
166
- inkscape:export-ydpi="90.000000" />
167
- <path
168
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
169
- d="M 177.165 343.701 L 177.165 414.567 "
170
- id="path248"
171
- transform="translate(336.614,-248.032)"
172
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
173
- inkscape:export-xdpi="90.000000"
174
- inkscape:export-ydpi="90.000000" />
175
- <path
176
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
177
- d="M 283.465 361.417 L 248.032 396.85 "
178
- id="path249"
179
- transform="translate(230.314,-265.748)"
180
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
181
- inkscape:export-xdpi="90.000000"
182
- inkscape:export-ydpi="90.000000" />
183
- <path
184
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
185
- d="M 177.165 396.85 L 141.732 361.417 "
186
- id="path250"
187
- transform="translate(372.047,-265.748)"
188
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
189
- inkscape:export-xdpi="90.000000"
190
- inkscape:export-ydpi="90.000000" />
191
- <path
192
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
193
- d="M 177.165 467.717 L 248.032 467.717 "
194
- id="path251"
195
- transform="translate(301.18,-336.615)"
196
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
197
- inkscape:export-xdpi="90.000000"
198
- inkscape:export-ydpi="90.000000" />
199
- <path
200
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
201
- d="M 283.465 503.15 L 318.898 467.717 "
202
- id="path252"
203
- transform="translate(230.313,-336.615)"
204
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
205
- inkscape:export-xdpi="90.000000"
206
- inkscape:export-ydpi="90.000000" />
207
- <path
208
- style="fill:#000000;fill-rule:evenodd;stroke:#ff8000;stroke-opacity:1.0000000;stroke-width:10.000000;stroke-linejoin:miter;stroke-linecap:round;fill-opacity:1.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;marker-start:none;opacity:1.0000000"
209
- d="M 141.732 503.15 L 106.299 467.717 "
210
- id="path253"
211
- transform="translate(372.047,-336.615)"
212
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/path204.png"
213
- inkscape:export-xdpi="90.000000"
214
- inkscape:export-ydpi="90.000000" />
215
- <path
216
- style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ff8000;stroke-width:15.000000;stroke-linecap:round;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
217
- d="M 256.69732,167.48340 L 256.69732,238.34940"
218
- id="path10442"
219
- inkscape:export-xdpi="90.000000"
220
- inkscape:export-ydpi="90.000000"
221
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/smile.png" />
222
- <path
223
- style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ff8000;stroke-width:15.000000;stroke-linecap:round;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
224
- d="M 327.56432,167.48340 L 292.13132,202.91640"
225
- id="path10444"
226
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/smile.png"
227
- inkscape:export-xdpi="90.000000"
228
- inkscape:export-ydpi="90.000000" />
229
- <path
230
- style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ff8000;stroke-width:15.000000;stroke-linecap:round;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
231
- d="M 221.26432,202.91640 L 185.83132,167.48340"
232
- id="path10446"
233
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/smile.png"
234
- inkscape:export-xdpi="90.000000"
235
- inkscape:export-ydpi="90.000000" />
236
- <path
237
- style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ff8000;stroke-width:15.000000;stroke-linecap:round;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
238
- d="M 221.26432,273.78340 L 292.13132,273.78340"
239
- id="path10448"
240
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/smile.png"
241
- inkscape:export-xdpi="90.000000"
242
- inkscape:export-ydpi="90.000000" />
243
- <path
244
- style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ff8000;stroke-width:15.000000;stroke-linecap:round;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
245
- d="M 327.56432,309.21640 L 362.99732,273.78340"
246
- id="path10450"
247
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/smile.png"
248
- inkscape:export-xdpi="90.000000"
249
- inkscape:export-ydpi="90.000000" />
250
- <path
251
- style="opacity:1.0000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ff8000;stroke-width:15.000000;stroke-linecap:round;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
252
- d="M 185.83132,309.21640 L 150.39832,273.78340"
253
- id="path10452"
254
- inkscape:export-filename="/home/manu/develop/parlement/trunk/public/images/smile.png"
255
- inkscape:export-xdpi="90.000000"
256
- inkscape:export-ydpi="90.000000" />
257
- </svg>