decidim 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim might be problematic. Click here for more details.

Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.json +2 -5
  3. data/.mention-bot +2 -1
  4. data/.yardopts +8 -0
  5. data/Gemfile.lock +64 -62
  6. data/README.md +11 -9
  7. data/decidim-admin/app/assets/javascripts/decidim/admin/sort_steps.js.es6 +3 -3
  8. data/decidim-admin/app/assets/stylesheets/decidim/admin/_email_preview.scss +5 -0
  9. data/decidim-admin/app/assets/stylesheets/decidim/admin/application.scss +1 -0
  10. data/decidim-admin/app/commands/decidim/admin/create_newsletter.rb +30 -0
  11. data/decidim-admin/app/commands/decidim/admin/deliver_newsletter.rb +29 -0
  12. data/decidim-admin/app/commands/decidim/admin/destroy_participatory_process_step.rb +9 -0
  13. data/decidim-admin/app/commands/decidim/admin/update_newsletter.rb +33 -0
  14. data/decidim-admin/app/constraints/decidim/admin/organization_dashboard_constraint.rb +1 -1
  15. data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +2 -2
  16. data/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb +115 -0
  17. data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +4 -4
  18. data/decidim-admin/app/forms/decidim/admin/newsletter_form.rb +15 -0
  19. data/decidim-admin/app/jobs/decidim/admin/newsletter_delivery_job.rb +18 -0
  20. data/decidim-admin/app/jobs/decidim/admin/newsletter_job.rb +32 -0
  21. data/decidim-admin/app/models/decidim/admin/abilities/admin_user.rb +4 -0
  22. data/decidim-admin/app/models/decidim/admin/abilities/base.rb +4 -0
  23. data/decidim-admin/app/models/decidim/admin/abilities/collaborator_user.rb +19 -0
  24. data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin.rb +1 -1
  25. data/decidim-admin/app/queries/decidim/admin/manageable_participatory_processes_for_user.rb +1 -1
  26. data/decidim-admin/app/views/decidim/admin/newsletters/_form.html.erb +5 -0
  27. data/decidim-admin/app/views/decidim/admin/newsletters/edit.html.erb +11 -0
  28. data/decidim-admin/app/views/decidim/admin/newsletters/index.html.erb +47 -0
  29. data/decidim-admin/app/views/decidim/admin/newsletters/new.html.erb +11 -0
  30. data/decidim-admin/app/views/decidim/admin/newsletters/show.html.erb +14 -0
  31. data/decidim-admin/app/views/decidim/admin/participatory_process_steps/_form.html.erb +1 -1
  32. data/decidim-admin/app/views/decidim/admin/participatory_processes/_form.html.erb +1 -1
  33. data/decidim-admin/app/views/decidim/admin/static_pages/_form.html.erb +1 -1
  34. data/decidim-admin/app/views/layouts/decidim/admin/_sidebar.html.erb +1 -0
  35. data/decidim-admin/config/locales/ca.yml +40 -0
  36. data/decidim-admin/config/locales/en.yml +40 -0
  37. data/decidim-admin/config/locales/es.yml +40 -0
  38. data/decidim-admin/config/routes.rb +7 -0
  39. data/decidim-admin/decidim-admin.gemspec +0 -1
  40. data/decidim-admin/lib/decidim/admin/engine.rb +1 -0
  41. data/decidim-admin/lib/decidim/admin/features/base_controller.rb +5 -1
  42. data/decidim-admin/spec/commands/create_newsletter_spec.rb +62 -0
  43. data/decidim-admin/spec/commands/deliver_newsletter_spec.rb +45 -0
  44. data/decidim-admin/spec/commands/destroy_participatory_process_step_spec.rb +12 -0
  45. data/decidim-admin/spec/commands/update_newsletter_spec.rb +64 -0
  46. data/decidim-admin/spec/features/admin_manages_newsletters_spec.rb +147 -0
  47. data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +1 -5
  48. data/decidim-admin/spec/features/static_pages_spec.rb +16 -0
  49. data/decidim-admin/spec/forms/newsletter_form_spec.rb +47 -0
  50. data/decidim-admin/spec/jobs/newsletter_delivery_job_spec.rb +25 -0
  51. data/decidim-admin/spec/jobs/newsletter_job_spec.rb +29 -0
  52. data/decidim-admin/spec/models/abilities/collaborator_user_spec.rb +66 -0
  53. data/decidim-admin/spec/organization_dashboard_constraint_spec.rb +55 -0
  54. data/decidim-admin/spec/queries/manageable_participatory_processes_for_user_spec.rb +8 -0
  55. data/decidim-admin/spec/shared/manage_processes_examples.rb +1 -5
  56. data/decidim-api/lib/decidim/api.rb +2 -7
  57. data/decidim-api/lib/decidim/api/{types/mutation.rb → mutation_type.rb} +0 -0
  58. data/decidim-api/lib/decidim/api/{types/query.rb → query_type.rb} +0 -0
  59. data/decidim-budgets/app/assets/javascripts/decidim/budgets/projects.js.es6 +4 -4
  60. data/decidim-budgets/app/commands/decidim/budgets/add_line_item.rb +4 -2
  61. data/decidim-budgets/app/commands/decidim/budgets/checkout.rb +7 -3
  62. data/decidim-budgets/app/models/decidim/budgets/order.rb +16 -1
  63. data/decidim-budgets/app/models/decidim/budgets/project.rb +16 -0
  64. data/decidim-budgets/app/views/decidim/budgets/line_items/update_budget.js.erb +7 -7
  65. data/decidim-budgets/app/views/decidim/budgets/projects/_budget_confirm.html.erb +27 -25
  66. data/decidim-budgets/app/views/decidim/budgets/projects/_budget_summary.html.erb +4 -13
  67. data/decidim-budgets/app/views/decidim/budgets/projects/_order_progress.html.erb +23 -21
  68. data/decidim-budgets/app/views/decidim/budgets/projects/_order_selected_projects.html.erb +25 -23
  69. data/decidim-budgets/app/views/decidim/budgets/projects/_order_total_budget.html.erb +3 -1
  70. data/decidim-budgets/app/views/decidim/budgets/projects/_project.html.erb +32 -30
  71. data/decidim-budgets/app/views/decidim/budgets/projects/_projects.html.erb +1 -3
  72. data/decidim-budgets/app/views/decidim/budgets/projects/index.html.erb +0 -4
  73. data/decidim-budgets/app/views/decidim/budgets/projects/show.html.erb +5 -6
  74. data/decidim-budgets/config/i18n-tasks.yml +1 -0
  75. data/decidim-budgets/config/locales/ca.yml +7 -2
  76. data/decidim-budgets/config/locales/en.yml +17 -6
  77. data/decidim-budgets/config/locales/es.yml +7 -2
  78. data/decidim-budgets/lib/decidim/budgets/feature.rb +2 -2
  79. data/decidim-budgets/spec/commands/add_line_item_spec.rb +16 -3
  80. data/decidim-budgets/spec/commands/cancel_order_spec.rb +7 -1
  81. data/decidim-budgets/spec/commands/checkout_spec.rb +9 -2
  82. data/decidim-budgets/spec/commands/remove_line_item_spec.rb +16 -5
  83. data/decidim-budgets/spec/features/orders_spec.rb +8 -2
  84. data/decidim-budgets/spec/models/order_spec.rb +31 -2
  85. data/decidim-budgets/spec/shared/admin_shared_context.rb +1 -1
  86. data/decidim-comments/README.md +1 -1
  87. data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
  88. data/decidim-comments/app/frontend/comments/add_comment_form.component.jsx +156 -93
  89. data/decidim-comments/app/frontend/comments/add_comment_form.component.test.jsx +36 -23
  90. data/decidim-comments/app/frontend/comments/add_comment_form.mutation.graphql +5 -3
  91. data/decidim-comments/app/frontend/comments/add_comment_form_commentable.fragment.graphql +4 -0
  92. data/decidim-comments/app/frontend/comments/add_comment_form_session.fragment.graphql +6 -0
  93. data/decidim-comments/app/frontend/comments/comment.component.jsx +11 -13
  94. data/decidim-comments/app/frontend/comments/comment.component.test.jsx +22 -21
  95. data/decidim-comments/app/frontend/comments/comment.fragment.graphql +4 -4
  96. data/decidim-comments/app/frontend/comments/comment_data.fragment.graphql +4 -3
  97. data/decidim-comments/app/frontend/comments/comment_order_selector.component.jsx +1 -1
  98. data/decidim-comments/app/frontend/comments/comment_thread.component.jsx +3 -3
  99. data/decidim-comments/app/frontend/comments/comment_thread.component.test.jsx +3 -3
  100. data/decidim-comments/app/frontend/comments/comment_thread.fragment.graphql +1 -1
  101. data/decidim-comments/app/frontend/comments/comments.component.jsx +47 -39
  102. data/decidim-comments/app/frontend/comments/comments.component.test.jsx +51 -38
  103. data/decidim-comments/app/frontend/comments/comments.query.graphql +10 -4
  104. data/decidim-comments/app/frontend/comments/down_vote_button.component.jsx +6 -3
  105. data/decidim-comments/app/frontend/comments/up_vote_button.component.jsx +7 -4
  106. data/decidim-comments/app/frontend/support/generate_comments_data.js +4 -4
  107. data/decidim-comments/app/models/decidim/comments/comment.rb +7 -9
  108. data/decidim-comments/app/queries/decidim/comments/{comments_with_replies.rb → sorted_comments.rb} +3 -8
  109. data/decidim-comments/app/types/decidim/comments/commentable_interface.rb +44 -0
  110. data/decidim-comments/app/types/decidim/comments/commentable_mutation_type.rb +29 -0
  111. data/decidim-comments/app/types/decidim/comments/commentable_type.rb +14 -0
  112. data/decidim-comments/config/locales/ca.yml +3 -1
  113. data/decidim-comments/config/locales/en.yml +5 -2
  114. data/decidim-comments/config/locales/es.yml +3 -1
  115. data/decidim-comments/lib/decidim/comments.rb +4 -0
  116. data/decidim-comments/{app/types/decidim/comments → lib/decidim/comments/api}/add_comment_type.rb +0 -0
  117. data/decidim-comments/{app/types/decidim/comments → lib/decidim/comments/api}/comment_mutation_type.rb +0 -0
  118. data/decidim-comments/{app/types/decidim/comments → lib/decidim/comments/api}/comment_type.rb +11 -17
  119. data/decidim-comments/lib/decidim/comments/commentable.rb +45 -0
  120. data/decidim-comments/lib/decidim/comments/comments_helper.rb +15 -10
  121. data/decidim-comments/lib/decidim/comments/mutation_extensions.rb +8 -16
  122. data/decidim-comments/lib/decidim/comments/query_extensions.rb +5 -8
  123. data/decidim-comments/lib/decidim/comments/test/factories.rb +3 -3
  124. data/decidim-comments/spec/commands/vote_comment_spec.rb +3 -1
  125. data/decidim-comments/spec/features/comments_spec.rb +28 -14
  126. data/decidim-comments/spec/features/notifications_spec.rb +1 -1
  127. data/decidim-comments/spec/helpers/comments_helper_spec.rb +4 -27
  128. data/decidim-comments/spec/models/comment_spec.rb +7 -11
  129. data/decidim-comments/spec/models/comment_vote_spec.rb +3 -1
  130. data/decidim-comments/spec/models/seed_spec.rb +3 -4
  131. data/decidim-comments/spec/queries/{comments_with_replies_spec.rb → sorted_comments_spec.rb} +12 -29
  132. data/decidim-comments/spec/types/comment_type_spec.rb +23 -17
  133. data/decidim-comments/spec/types/commentable_mutation_type_spec.rb +34 -0
  134. data/decidim-comments/spec/types/commentable_type_spec.rb +48 -0
  135. data/decidim-comments/spec/types/mutation_type_spec.rb +5 -22
  136. data/decidim-comments/spec/types/query_type_spec.rb +0 -24
  137. data/decidim-dev/config/i18n-tasks.yml +4 -0
  138. data/decidim-dev/decidim-dev.gemspec +1 -1
  139. data/decidim-dev/lib/decidim/dev/test/rspec_support/action_mailer.rb +10 -4
  140. data/decidim-dev/lib/decidim/dev/test/rspec_support/feature.rb +6 -5
  141. data/decidim-dev/lib/decidim/dev/test/rspec_support/i18n.rb +0 -1
  142. data/decidim-meetings/app/assets/javascripts/decidim/meetings/map.js.es6.erb +8 -3
  143. data/decidim-meetings/app/assets/stylesheets/decidim/meetings/map.css +3 -1
  144. data/decidim-meetings/app/controllers/decidim/meetings/meetings_controller.rb +2 -2
  145. data/decidim-meetings/app/forms/decidim/meetings/admin/close_meeting_form.rb +2 -1
  146. data/decidim-meetings/app/helpers/decidim/meetings/map_helper.rb +1 -0
  147. data/decidim-meetings/app/services/decidim/meetings/meeting_search.rb +7 -3
  148. data/decidim-meetings/app/views/decidim/meetings/meetings/_datetime.html.erb +1 -1
  149. data/decidim-meetings/app/views/decidim/meetings/meetings/_filters.html.erb +5 -5
  150. data/decidim-meetings/app/views/decidim/meetings/meetings/_linked_meetings.html.erb +1 -1
  151. data/decidim-meetings/app/views/decidim/meetings/meetings/index.html.erb +1 -5
  152. data/decidim-meetings/app/views/decidim/meetings/meetings/show.html.erb +16 -9
  153. data/decidim-meetings/config/locales/ca.yml +2 -3
  154. data/decidim-meetings/config/locales/en.yml +2 -3
  155. data/decidim-meetings/config/locales/es.yml +2 -3
  156. data/decidim-meetings/spec/features/explore_meetings_spec.rb +75 -24
  157. data/decidim-meetings/spec/forms/close_meeting_form_spec.rb +1 -1
  158. data/decidim-meetings/spec/services/meeting_search_spec.rb +15 -12
  159. data/decidim-meetings/vendor/assets/javascripts/leaflet.markercluster.js +7 -0
  160. data/decidim-meetings/vendor/assets/stylesheets/MarkerCluster.Default.css +60 -0
  161. data/decidim-meetings/vendor/assets/stylesheets/MarkerCluster.css +14 -0
  162. data/decidim-pages/app/models/decidim/pages/page.rb +22 -0
  163. data/decidim-pages/app/views/decidim/pages/application/show.html.erb +2 -6
  164. data/decidim-pages/config/locales/ca.yml +2 -2
  165. data/decidim-pages/config/locales/en.yml +2 -2
  166. data/decidim-pages/config/locales/es.yml +2 -2
  167. data/decidim-pages/lib/decidim/pages/feature.rb +2 -2
  168. data/decidim-pages/spec/features/page_show_spec.rb +0 -33
  169. data/decidim-proposals/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +2 -0
  170. data/decidim-proposals/app/controllers/decidim/proposals/admin/proposals_controller.rb +2 -0
  171. data/decidim-proposals/app/models/decidim/proposals/abilities/admin_user.rb +45 -0
  172. data/decidim-proposals/app/models/decidim/proposals/abilities/process_admin_user.rb +57 -0
  173. data/decidim-proposals/app/models/decidim/proposals/proposal.rb +21 -0
  174. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/_form.html.erb +1 -1
  175. data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +16 -10
  176. data/decidim-proposals/app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb +4 -4
  177. data/decidim-proposals/app/views/decidim/proposals/proposals/_filters.html.erb +7 -3
  178. data/decidim-proposals/app/views/decidim/proposals/proposals/_proposal.html.erb +2 -6
  179. data/decidim-proposals/app/views/decidim/proposals/proposals/_remaining_votes_count.html.erb +3 -1
  180. data/decidim-proposals/app/views/decidim/proposals/proposals/_tags.html.erb +1 -1
  181. data/decidim-proposals/app/views/decidim/proposals/proposals/_vote_button.html.erb +23 -21
  182. data/decidim-proposals/app/views/decidim/proposals/proposals/_votes_count.html.erb +9 -6
  183. data/decidim-proposals/app/views/decidim/proposals/proposals/_votes_limit.html.erb +1 -3
  184. data/decidim-proposals/app/views/decidim/proposals/proposals/index.html.erb +0 -4
  185. data/decidim-proposals/app/views/decidim/proposals/proposals/new.html.erb +1 -1
  186. data/decidim-proposals/app/views/decidim/proposals/proposals/show.html.erb +2 -6
  187. data/decidim-proposals/config/locales/ca.yml +8 -1
  188. data/decidim-proposals/config/locales/en.yml +8 -1
  189. data/decidim-proposals/config/locales/es.yml +8 -1
  190. data/decidim-proposals/lib/decidim/proposals/admin_engine.rb +7 -0
  191. data/decidim-proposals/lib/decidim/proposals/feature.rb +6 -2
  192. data/decidim-proposals/spec/features/proposals_spec.rb +226 -40
  193. data/decidim-proposals/spec/models/decidim/proposals/abilities/admin_user_spec.rb +62 -0
  194. data/decidim-proposals/spec/models/decidim/proposals/abilities/process_admin_user_spec.rb +63 -0
  195. data/decidim-proposals/spec/shared/manage_proposals_examples.rb +161 -50
  196. data/decidim-results/app/models/decidim/results/result.rb +21 -0
  197. data/decidim-results/app/views/decidim/results/results/index.html.erb +0 -4
  198. data/decidim-results/app/views/decidim/results/results/show.html.erb +2 -8
  199. data/decidim-results/config/i18n-tasks.yml +1 -0
  200. data/decidim-results/config/locales/ca.yml +5 -2
  201. data/decidim-results/config/locales/en.yml +5 -2
  202. data/decidim-results/config/locales/es.yml +5 -2
  203. data/decidim-results/lib/decidim/results/feature.rb +2 -2
  204. data/decidim-results/spec/services/result_stats_calculator_spec.rb +2 -2
  205. data/decidim-results/spec/shared/admin_shared_context.rb +1 -1
  206. data/decidim-system/config/i18n-tasks.yml +1 -1
  207. data/package.json +50 -51
  208. data/yarn.lock +198 -151
  209. metadata +69 -36
  210. data/decidim-admin/spec/features/admin_access_control.rb +0 -52
  211. data/decidim-api/lib/decidim/api/types/author_interface.rb +0 -13
  212. data/decidim-api/lib/decidim/api/types/localized_string.rb +0 -13
  213. data/decidim-api/lib/decidim/api/types/translated_field.rb +0 -44
  214. data/decidim-api/spec/types/localized_string_type_spec.rb +0 -31
  215. data/decidim-api/spec/types/translated_field_type_spec.rb +0 -69
  216. data/decidim-comments/app/frontend/comments/add_comment_form.fragment.graphql +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e97ff36fe9b8afb5d18cd99bda0548b74fc4a76
4
- data.tar.gz: 0b67d32ec3db0da5638529ca288650b33a7eb9bb
3
+ metadata.gz: f0650c5fa86e8491975b0ce535548bf27e6ca68d
4
+ data.tar.gz: bcdc62b3e72403c1e2c154908031a3134bba3fcb
5
5
  SHA512:
6
- metadata.gz: 40eb6e5b1dac004d17df2bc5a55432b6ee03277de42a6af69f7788a238a66ae0bbd370cf7c93ff15b75afc7ab8f174239395aba0c625d774fcacace98e6a7d12
7
- data.tar.gz: d1087f76397658a05d5c114fde4ac42e649e41a5a2d30f7a55c1fc9edc39a5f3740d44067ce5d1ccd5ea270250b40f5c1b8080b316db96bdabdd2dd7c8c7bcec
6
+ metadata.gz: 8524cd3cb1f583967a8e61b07ea590a1d8b64c62f3e5515240d5949202afab84f65ee758525d6ac238b3cb7a1032803e54eea581170316bff98240255b1b1e8d
7
+ data.tar.gz: 75924358d263b545a82862b73c0f610b3d2685edbc0bf98858cd88c5b7da71d0eac560199e41b15075ce1bdf17687e94cb8afbbe9c382c56398b21fe9e759295
data/.eslintrc.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "browser": true,
4
4
  "es6": true
5
5
  },
6
- "extends": ["airbnb", "eslint:recommended", "plugin:react/recommended"],
6
+ "extends": ["eslint:recommended", "plugin:react/recommended"],
7
7
  "parser": "babel-eslint",
8
8
  "parserOptions": {
9
9
  "ecmaFeatures": {
@@ -121,7 +121,7 @@
121
121
  "new-parens": "error",
122
122
  "newline-after-var": "off",
123
123
  "newline-before-return": "off",
124
- "newline-per-chained-call": "error",
124
+ "newline-per-chained-call": "off",
125
125
  "no-alert": "error",
126
126
  "no-array-constructor": "error",
127
127
  "no-bitwise": "error",
@@ -132,7 +132,6 @@
132
132
  "no-div-regex": "error",
133
133
  "no-duplicate-imports": "error",
134
134
  "no-else-return": "error",
135
- "no-empty-function": "error",
136
135
  "no-eq-null": "error",
137
136
  "no-eval": "error",
138
137
  "no-extend-native": "error",
@@ -180,7 +179,6 @@
180
179
  "no-restricted-properties": "error",
181
180
  "no-restricted-syntax": "error",
182
181
  "no-return-assign": "error",
183
- "no-return-await": "error",
184
182
  "no-script-url": "error",
185
183
  "no-self-compare": "error",
186
184
  "no-sequences": "error",
@@ -206,7 +204,6 @@
206
204
  "no-useless-constructor": "error",
207
205
  "no-useless-escape": "error",
208
206
  "no-useless-rename": "error",
209
- "no-useless-return": "error",
210
207
  "no-var": "error",
211
208
  "no-void": "error",
212
209
  "no-warning-comments": "error",
data/.mention-bot CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
+ "maxReviewers": 2,
2
3
  "findPotentialReviewers": true,
3
4
  "userBlacklist": ["decidim-bot"],
4
- "actions": ["opened", "labeled", "unlabeled", "edited"],
5
+ "actions": ["labeled"],
5
6
  "skipAlreadyMentionedPR": true,
6
7
  "withLabel": "in-review",
7
8
  "createReviewRequest": true
data/.yardopts ADDED
@@ -0,0 +1,8 @@
1
+ decidim-*/app/**/*.rb
2
+ decidim-*/lib/**/*.rb
3
+ decidim-*/README.md
4
+ app/**/*.rb
5
+ lib/**/*.rb
6
+ docs/*.md
7
+ README.md
8
+ LICENSE-AGPLv3.txt
data/Gemfile.lock CHANGED
@@ -1,34 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decidim (0.0.4)
5
- decidim-admin (= 0.0.4)
6
- decidim-api (= 0.0.4)
7
- decidim-budgets (= 0.0.4)
8
- decidim-comments (= 0.0.4)
9
- decidim-core (= 0.0.4)
10
- decidim-meetings (= 0.0.4)
11
- decidim-pages (= 0.0.4)
12
- decidim-proposals (= 0.0.4)
13
- decidim-results (= 0.0.4)
14
- decidim-system (= 0.0.4)
4
+ decidim (0.0.5)
5
+ decidim-admin (= 0.0.5)
6
+ decidim-api (= 0.0.5)
7
+ decidim-budgets (= 0.0.5)
8
+ decidim-comments (= 0.0.5)
9
+ decidim-core (= 0.0.5)
10
+ decidim-meetings (= 0.0.5)
11
+ decidim-pages (= 0.0.5)
12
+ decidim-proposals (= 0.0.5)
13
+ decidim-results (= 0.0.5)
14
+ decidim-system (= 0.0.5)
15
15
  rails (~> 5.0.0, >= 5.0.0.1)
16
16
  rails-i18n (~> 5.0.0, >= 5.0.0.1)
17
- decidim-budgets (0.0.4)
18
- decidim-comments (= 0.0.4)
19
- decidim-core (= 0.0.4)
17
+ decidim-budgets (0.0.5)
18
+ decidim-comments (= 0.0.5)
19
+ decidim-core (= 0.0.5)
20
20
  kaminari (~> 1.0.0.rc1)
21
21
  rectify (~> 0.8)
22
22
  searchlight (~> 4.1.0)
23
- decidim-proposals (0.0.4)
24
- decidim-comments (= 0.0.4)
25
- decidim-core (= 0.0.4)
23
+ decidim-proposals (0.0.5)
24
+ decidim-comments (= 0.0.5)
25
+ decidim-core (= 0.0.5)
26
26
  kaminari (~> 1.0.1)
27
27
  rectify (~> 0.8.0)
28
28
  social-share-button (~> 0.8.8)
29
- decidim-results (0.0.4)
30
- decidim-comments (= 0.0.4)
31
- decidim-core (= 0.0.4)
29
+ decidim-results (0.0.5)
30
+ decidim-comments (= 0.0.5)
31
+ decidim-core (= 0.0.5)
32
32
  kaminari (~> 1.0.0.rc1)
33
33
  rectify (~> 0.8)
34
34
  searchlight (~> 4.1.0)
@@ -36,11 +36,10 @@ PATH
36
36
  PATH
37
37
  remote: decidim-admin
38
38
  specs:
39
- decidim-admin (0.0.4)
39
+ decidim-admin (0.0.5)
40
40
  active_link_to (~> 1.0.0)
41
- cancancan (~> 1.15.0)
42
41
  carrierwave (~> 1.0.0.rc)
43
- decidim-core (= 0.0.4)
42
+ decidim-core (= 0.0.5)
44
43
  devise (~> 4.2)
45
44
  devise-i18n (~> 1.1.0)
46
45
  devise_invitable (~> 1.7.0)
@@ -53,7 +52,7 @@ PATH
53
52
  PATH
54
53
  remote: decidim-api
55
54
  specs:
56
- decidim-api (0.0.4)
55
+ decidim-api (0.0.5)
57
56
  graphiql-rails (~> 1.4.1)
58
57
  graphql (~> 1.4.2)
59
58
  rack-cors (~> 0.4.0)
@@ -63,38 +62,39 @@ PATH
63
62
  PATH
64
63
  remote: decidim-comments
65
64
  specs:
66
- decidim-comments (0.0.4)
67
- decidim-core (= 0.0.4)
65
+ decidim-comments (0.0.5)
66
+ decidim-core (= 0.0.5)
68
67
  jquery-rails (~> 4.0)
69
68
  rails (~> 5.0.0, >= 5.0.0.1)
70
69
 
71
70
  PATH
72
71
  remote: decidim-core
73
72
  specs:
74
- decidim-core (0.0.4)
73
+ decidim-core (0.0.5)
75
74
  active_link_to (~> 1.0.0)
76
- cancancan (~> 1.15.0)
75
+ cancancan (~> 1.16.0)
77
76
  carrierwave (~> 1.0.0)
78
77
  date_validator (~> 0.9.0)
79
- decidim-api (= 0.0.4)
78
+ decidim-api (= 0.0.5)
80
79
  devise (~> 4.2)
81
80
  devise-i18n (~> 1.1.0)
82
81
  file_validators (~> 2.1.0)
83
82
  foundation-rails (~> 6.3.0.0)
84
83
  foundation_rails_helper (~> 3.0.0.rc)
85
84
  high_voltage (~> 3.0.0)
85
+ invisible_captcha (~> 0.9.2)
86
86
  jquery-rails (~> 4.2.2)
87
- mini_magick (~> 4.6.0)
88
- omniauth (~> 1.4.0)
87
+ mini_magick (~> 4.6.1)
88
+ nokogiri (~> 1.7.0.1)
89
+ omniauth (~> 1.5.0)
89
90
  omniauth-facebook (~> 4.0.0)
90
91
  omniauth-google-oauth2 (~> 0.4.1)
91
- omniauth-twitter (~> 1.3.0)
92
+ omniauth-twitter (~> 1.4.0)
92
93
  pg (~> 0.19.0)
94
+ premailer-rails (~> 1.9.5)
93
95
  rails (~> 5.0.0, >= 5.0.0.1)
94
96
  rectify (~> 0.8.0)
95
97
  redis (~> 3.3.3)
96
- roadie (~> 3.2.1)
97
- roadie-rails (~> 1.0)
98
98
  sassc-rails (~> 1.3.0)
99
99
  sprockets-es6 (~> 0.9.2)
100
100
  truncato (~> 0.7.9)
@@ -103,17 +103,17 @@ PATH
103
103
  PATH
104
104
  remote: decidim-dev
105
105
  specs:
106
- decidim-dev (0.0.4)
106
+ decidim-dev (0.0.5)
107
107
  byebug
108
108
  capybara (~> 2.12.0)
109
109
  capybara-screenshot (~> 1.0.14)
110
110
  codecov (~> 0.1.9)
111
111
  database_cleaner (~> 1.5.0)
112
112
  db-query-matchers (~> 0.7.0)
113
- decidim (= 0.0.4)
113
+ decidim (= 0.0.5)
114
114
  factory_girl_rails
115
115
  faker (~> 1.7.3)
116
- i18n-tasks (= 0.9.8)
116
+ i18n-tasks (= 0.9.12)
117
117
  launchy
118
118
  letter_opener_web (~> 1.3.0)
119
119
  listen (~> 3.1.0)
@@ -128,9 +128,9 @@ PATH
128
128
  PATH
129
129
  remote: decidim-meetings
130
130
  specs:
131
- decidim-meetings (0.0.4)
131
+ decidim-meetings (0.0.5)
132
132
  date_validator (~> 0.9)
133
- decidim-core (= 0.0.4)
133
+ decidim-core (= 0.0.5)
134
134
  geocoder (~> 1.4.2)
135
135
  httparty (~> 0.14.0)
136
136
  jquery-tmpl-rails (~> 1.1.0)
@@ -141,17 +141,17 @@ PATH
141
141
  PATH
142
142
  remote: decidim-pages
143
143
  specs:
144
- decidim-pages (0.0.4)
145
- decidim-comments (= 0.0.4)
146
- decidim-core (= 0.0.4)
144
+ decidim-pages (0.0.5)
145
+ decidim-comments (= 0.0.5)
146
+ decidim-core (= 0.0.5)
147
147
  rectify (~> 0.8.0)
148
148
 
149
149
  PATH
150
150
  remote: decidim-system
151
151
  specs:
152
- decidim-system (0.0.4)
152
+ decidim-system (0.0.5)
153
153
  active_link_to (~> 1.0.0)
154
- decidim-core (= 0.0.4)
154
+ decidim-core (= 0.0.5)
155
155
  devise (~> 4.2)
156
156
  devise-i18n (~> 1.1.0)
157
157
  devise_invitable (~> 1.7.0)
@@ -218,8 +218,8 @@ GEM
218
218
  bcrypt (3.1.11)
219
219
  builder (3.2.3)
220
220
  byebug (9.0.6)
221
- cancancan (1.15.0)
222
- capybara (2.12.0)
221
+ cancancan (1.16.0)
222
+ capybara (2.12.1)
223
223
  addressable
224
224
  mime-types (>= 1.16)
225
225
  nokogiri (>= 1.3.3)
@@ -308,14 +308,14 @@ GEM
308
308
  rails
309
309
  graphql (1.4.3)
310
310
  hashdiff (0.3.2)
311
- hashie (3.5.1)
311
+ hashie (3.5.3)
312
312
  high_voltage (3.0.0)
313
313
  highline (1.7.8)
314
314
  htmlentities (4.3.4)
315
315
  httparty (0.14.0)
316
316
  multi_xml (>= 0.5.2)
317
317
  i18n (0.8.0)
318
- i18n-tasks (0.9.8)
318
+ i18n-tasks (0.9.12)
319
319
  activesupport (>= 4.0.2)
320
320
  ast (>= 2.1.0)
321
321
  easy_translate (>= 0.5.0)
@@ -326,6 +326,8 @@ GEM
326
326
  term-ansicolor (>= 1.3.2)
327
327
  terminal-table (>= 1.5.1)
328
328
  ice_nine (0.11.2)
329
+ invisible_captcha (0.9.2)
330
+ rails (>= 3.2.0)
329
331
  jquery-rails (4.2.2)
330
332
  rails-dom-testing (>= 1, < 3)
331
333
  railties (>= 4.2.0)
@@ -366,7 +368,7 @@ GEM
366
368
  mime-types (3.1)
367
369
  mime-types-data (~> 3.2015)
368
370
  mime-types-data (3.2016.0521)
369
- mini_magick (4.6.0)
371
+ mini_magick (4.6.1)
370
372
  mini_portile2 (2.1.0)
371
373
  minitest (5.10.1)
372
374
  multi_json (1.12.1)
@@ -382,9 +384,9 @@ GEM
382
384
  multi_json (~> 1.3)
383
385
  multi_xml (~> 0.5)
384
386
  rack (>= 1.2, < 3)
385
- omniauth (1.4.1)
386
- hashie (>= 1.2, < 4)
387
- rack (>= 1.0, < 3)
387
+ omniauth (1.5.0)
388
+ hashie (~> 3.5.0, < 4)
389
+ rack (>= 1.6.2, < 3)
388
390
  omniauth-facebook (4.0.0)
389
391
  omniauth-oauth2 (~> 1.2)
390
392
  omniauth-google-oauth2 (0.4.1)
@@ -398,7 +400,7 @@ GEM
398
400
  omniauth-oauth2 (1.4.0)
399
401
  oauth2 (~> 1.0)
400
402
  omniauth (~> 1.2)
401
- omniauth-twitter (1.3.0)
403
+ omniauth-twitter (1.4.0)
402
404
  omniauth-oauth (~> 1.1)
403
405
  rack
404
406
  orm_adapter (0.5.0)
@@ -410,6 +412,12 @@ GEM
410
412
  cliver (~> 0.3.1)
411
413
  websocket-driver (>= 0.2.0)
412
414
  powerpack (0.1.1)
415
+ premailer (1.9.2)
416
+ css_parser (>= 1.4.8)
417
+ htmlentities (>= 4.0.0)
418
+ premailer-rails (1.9.5)
419
+ actionmailer (>= 3, < 6)
420
+ premailer (~> 1.7, >= 1.7.9)
413
421
  public_suffix (2.0.5)
414
422
  rack (2.0.1)
415
423
  rack-cors (0.4.1)
@@ -436,7 +444,7 @@ GEM
436
444
  nokogiri (~> 1.6)
437
445
  rails-html-sanitizer (1.0.3)
438
446
  loofah (~> 2.0)
439
- rails-i18n (5.0.2)
447
+ rails-i18n (5.0.3)
440
448
  i18n (~> 0.7)
441
449
  railties (~> 5.0)
442
450
  railties (5.0.1)
@@ -459,12 +467,6 @@ GEM
459
467
  redis (3.3.3)
460
468
  responders (2.3.0)
461
469
  railties (>= 4.2.0, < 5.1)
462
- roadie (3.2.1)
463
- css_parser (~> 1.4.5)
464
- nokogiri (>= 1.5.0, < 1.8.0)
465
- roadie-rails (1.1.1)
466
- railties (>= 3.0, < 5.1)
467
- roadie (~> 3.1)
468
470
  rspec (3.5.0)
469
471
  rspec-core (~> 3.5.0)
470
472
  rspec-expectations (~> 3.5.0)
@@ -576,8 +578,8 @@ DEPENDENCIES
576
578
  decidim-dev!
577
579
  decidim-meetings!
578
580
  decidim-pages!
579
- decidim-proposals (= 0.0.4)
580
- decidim-results (= 0.0.4)
581
+ decidim-proposals (= 0.0.5)
582
+ decidim-results (= 0.0.5)
581
583
  decidim-system!
582
584
  rake (~> 12.0.0)
583
585
  rspec (~> 3.0)
data/README.md CHANGED
@@ -1,22 +1,24 @@
1
- # Decidim [![Gem](https://img.shields.io/gem/v/decidim.svg)](https://rubygems.org/gems/decidim) [![Gem](https://img.shields.io/gem/dt/decidim.svg)](https://rubygems.org/gems/decidim) [![License: AGPL v3](https://img.shields.io/github/license/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/blob/master/LICENSE-AGPLv3.txt)
1
+ # Decidim [![Gem](https://img.shields.io/gem/v/decidim.svg)](https://rubygems.org/gems/decidim) [![Gem](https://img.shields.io/gem/dt/decidim.svg)](https://rubygems.org/gems/decidim) [![GitHub contributors](https://img.shields.io/github/contributors/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/graphs/contributors) [![License: AGPL v3](https://img.shields.io/github/license/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/blob/master/LICENSE-AGPLv3.txt)
2
+
3
+ [![Demo](https://img.shields.io/badge/demo-staging-orange.svg?style=flat)](http://staging.decidim.codegram.com)
4
+ [[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/AjuntamentdeBarcelona/decidim/master)](http://www.rubydoc.info/github/AjuntamentdeBarcelona/decidim/master)
5
+ [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)]()
2
6
 
3
- [[Documentation](https://github.com/AjuntamentdeBarcelona/decidim/tree/master/docs)] - [[Demo](http://staging.decidim.codegram.com)]
4
7
 
5
8
  ### Code quality
6
9
  [![Build Status](https://img.shields.io/travis/AjuntamentdeBarcelona/decidim/master.svg)](https://travis-ci.org/AjuntamentdeBarcelona/decidim)
7
10
  [![Code Climate](https://img.shields.io/codeclimate/github/AjuntamentdeBarcelona/decidim.svg)](https://codeclimate.com/github/AjuntamentdeBarcelona/decidim/trends)
8
- [![Issue Count](https://img.shields.io/codeclimate/issues/github/AjuntamentdeBarcelona/decidim.svg)](https://codeclimate.com/github/AjuntamentdeBarcelona/decidim/issues)
9
11
  [![codecov](https://img.shields.io/codecov/c/github/AjuntamentdeBarcelona/decidim.svg)](https://codecov.io/gh/AjuntamentdeBarcelona/decidim)
10
12
  [![Dependency Status](https://img.shields.io/gemnasium/AjuntamentdeBarcelona/decidim.svg)](https://gemnasium.com/github.com/AjuntamentdeBarcelona/decidim)
11
13
  [![Crowdin](https://d322cqt584bo4o.cloudfront.net/decidim/localized.svg)](https://crowdin.com/project/decidim/invite)
12
14
  [![Inline docs](http://inch-ci.org/github/AjuntamentdeBarcelona/decidim.svg?branch=master)](http://inch-ci.org/github/AjuntamentdeBarcelona/decidim)
13
15
 
14
- ### Project management
15
- [![GitHub pull requests](https://img.shields.io/github/issues-pr/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/pulls)
16
- [![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/pulls?utf8=%E2%9C%93&q=is%3Apr%20is%3Aclosed)
17
- [![GitHub issues](https://img.shields.io/github/issues/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/issues)
18
- [![GitHub closed issues](https://img.shields.io/github/issues-closed/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed)
19
- [![GitHub contributors](https://img.shields.io/github/contributors/AjuntamentdeBarcelona/decidim.svg)](https://github.com/AjuntamentdeBarcelona/decidim/graphs/contributors)
16
+ ### Project management [[See on Waffle.io]](https://waffle.io/AjuntamentdeBarcelona/decidim)
17
+ [![Stories in Discussion](https://img.shields.io/waffle/label/AjuntamentdeBarcelona/decidim/discussion.svg)](https://github.com/AjuntamentdeBarcelona/decidim/issues?q=is%3Aopen+is%3Aissue+label%3Adiscussion)
18
+ [![Stories in Ready](https://img.shields.io/waffle/label/AjuntamentdeBarcelona/decidim/ready.svg)](https://github.com/AjuntamentdeBarcelona/decidim/issues?q=is%3Aopen+is%3Aissue+label%3Aready)
19
+ [![Bugs](https://img.shields.io/waffle/label/AjuntamentdeBarcelona/decidim/bug.svg)](https://github.com/AjuntamentdeBarcelona/decidim/issues?q=is%3Aopen+is%3Aissue+label%3Abug)
20
+ [![In Progress](https://img.shields.io/waffle/label/AjuntamentdeBarcelona/decidim/in-progress.svg)](https://github.com/AjuntamentdeBarcelona/decidim/issues?q=is%3Aopen+is%3Aissue+label%3Ain-progress)
21
+ [![In Review](https://img.shields.io/waffle/label/AjuntamentdeBarcelona/decidim/in-review.svg)](https://github.com/AjuntamentdeBarcelona/decidim/issues?q=is%3Aopen+is%3Aissue+label%3Ain-review)
20
22
 
21
23
  ---
22
24
 
@@ -13,9 +13,9 @@ const sortSteps = () => {
13
13
  sortable('#steps tbody', {
14
14
  placeholder: $('<tr style="border-style: dashed; border-color: #000"><td colspan="4">&nbsp;</td></tr>')[0]
15
15
  })[0].addEventListener('sortupdate', (event) => {
16
- const order = $(event.target).children()
17
- .map((index, child) => $(child).data('id'))
18
- .toArray();
16
+ const order = $(event.target).children().
17
+ map((index, child) => $(child).data('id')).
18
+ toArray();
19
19
 
20
20
  $.ajax({
21
21
  method: 'POST',
@@ -0,0 +1,5 @@
1
+ .email-preview{
2
+ border: 0;
3
+ width: 100%;
4
+ height: 70vh;
5
+ }
@@ -6,6 +6,7 @@
6
6
  @import "actions";
7
7
  @import "forms";
8
8
  @import "icons";
9
+ @import "email_preview";
9
10
 
10
11
  @import "decidim/editor";
11
12
  @import "decidim/utils/fontface";
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+ module Decidim
3
+ module Admin
4
+ # Creates a newsletter and assigns the right author and
5
+ # organization.
6
+ class CreateNewsletter < Rectify::Command
7
+ # Initializes the command.
8
+ #
9
+ # form - The source fo data for this newsletter.
10
+ # user - The User that authored this newsletter.
11
+ def initialize(form, user)
12
+ @form = form
13
+ @user = user
14
+ end
15
+
16
+ def call
17
+ return broadcast(:invalid) unless @form.valid?
18
+
19
+ newsletter = Newsletter.create!(
20
+ subject: @form.subject,
21
+ body: @form.body,
22
+ author: @user,
23
+ organization: @user.organization
24
+ )
25
+
26
+ broadcast(:ok, newsletter)
27
+ end
28
+ end
29
+ end
30
+ end