decidim-initiatives 0.19.1 → 0.23.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -0
- data/app/assets/config/admin_decidim_initiatives_manifest.js +2 -1
- data/app/assets/images/decidim/gamification/badges/initiatives.svg +1 -87
- data/app/assets/images/decidim/initiatives/icon.svg +1 -3
- data/app/assets/javascripts/decidim/initiatives/admin/initiatives_types.js.es6 +38 -0
- data/app/assets/stylesheet/decidim/initiatives/initiatives-votes.css.scss +0 -1
- data/app/assets/stylesheet/decidim/initiatives/initiatives.scss +6 -8
- data/app/assets/stylesheet/decidim/initiatives/popularity_item.css.scss +0 -1
- data/app/assets/stylesheet/decidim/initiatives/print-initiative.css.scss +0 -3
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +4 -3
- data/app/cells/decidim/initiatives/initiative_m/footer.erb +1 -1
- data/app/cells/decidim/initiatives/initiative_m_cell.rb +25 -0
- data/app/cells/decidim/initiatives_votes/vote/show.erb +12 -9
- data/app/cells/decidim/initiatives_votes/vote_cell.rb +7 -0
- data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +8 -2
- data/app/commands/decidim/initiatives/admin/send_initiative_to_technical_validation.rb +17 -0
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +29 -10
- data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +10 -6
- data/app/commands/decidim/initiatives/attachment_methods.rb +37 -0
- data/app/commands/decidim/initiatives/create_initiative.rb +25 -3
- data/app/commands/decidim/initiatives/unvote_initiative.rb +4 -10
- data/app/commands/decidim/initiatives/vote_initiative.rb +47 -31
- data/app/controllers/concerns/decidim/initiatives/admin/filterable.rb +51 -0
- data/app/controllers/concerns/decidim/initiatives/orderable.rb +3 -1
- data/app/controllers/concerns/decidim/initiatives/single_initiative_type.rb +26 -0
- data/app/controllers/decidim/initiatives/admin/answers_controller.rb +2 -3
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +28 -15
- data/app/controllers/decidim/initiatives/create_initiative_controller.rb +43 -9
- data/app/controllers/decidim/initiatives/initiative_signatures_controller.rb +19 -23
- data/app/controllers/decidim/initiatives/initiative_votes_controller.rb +11 -5
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +28 -13
- data/app/controllers/decidim/initiatives/initiatives_type_scopes_controller.rb +9 -1
- data/app/controllers/decidim/initiatives/versions_controller.rb +20 -0
- data/app/controllers/decidim/initiatives/{initiative_widgets_controller.rb → widgets_controller.rb} +2 -2
- data/app/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event.rb +21 -0
- data/app/events/decidim/initiatives/admin/support_threshold_reached_event.rb +13 -0
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +50 -8
- data/app/forms/decidim/initiatives/admin/initiative_type_form.rb +28 -6
- data/app/forms/decidim/initiatives/admin/initiative_type_scope_form.rb +0 -1
- data/app/forms/decidim/initiatives/initiative_form.rb +69 -2
- data/app/forms/decidim/initiatives/vote_form.rb +133 -76
- data/app/helpers/decidim/initiatives/application_helper.rb +104 -0
- data/app/helpers/decidim/initiatives/create_initiative_helper.rb +10 -11
- data/app/helpers/decidim/initiatives/initiative_helper.rb +13 -0
- data/app/helpers/decidim/initiatives/initiatives_helper.rb +10 -0
- data/app/jobs/decidim/initiatives/export_initiatives_job.rb +25 -0
- data/app/mailers/decidim/initiatives/initiatives_mailer.rb +0 -21
- data/app/models/concerns/decidim/initiatives/has_area.rb +30 -0
- data/app/models/decidim/initiative.rb +200 -51
- data/app/models/decidim/initiatives_type.rb +14 -14
- data/app/models/decidim/initiatives_type_scope.rb +9 -2
- data/app/models/decidim/initiatives_vote.rb +19 -23
- data/app/permissions/decidim/initiatives/admin/permissions.rb +21 -10
- data/app/permissions/decidim/initiatives/permissions.rb +38 -14
- data/app/presenters/decidim/initiatives/initiative_stats_presenter.rb +1 -5
- data/app/queries/decidim/initiatives/admin/manageable_initiatives.rb +7 -39
- data/app/serializers/decidim/initiatives/initiative_serializer.rb +32 -0
- data/app/services/decidim/initiatives/diff_renderer.rb +18 -0
- data/app/services/decidim/initiatives/initiative_search.rb +59 -15
- data/app/services/decidim/initiatives/status_change_notifier.rb +4 -5
- data/app/types/decidim/initiatives/initiative_api_type.rb +26 -0
- data/app/types/decidim/initiatives/initiative_committee_member_type.rb +18 -0
- data/app/types/decidim/initiatives/initiative_type.rb +42 -0
- data/app/views/decidim/initiatives/admin/answers/_info_initiative.html.erb +1 -1
- data/app/views/decidim/initiatives/admin/exports/_dropdown.html.erb +8 -0
- data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +60 -15
- data/app/views/decidim/initiatives/admin/initiatives/_initiative_attachments.erb +43 -0
- data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb +12 -9
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +10 -45
- data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +55 -12
- data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +28 -25
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +61 -16
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +17 -10
- data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +2 -1
- data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +1 -1
- data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +1 -2
- data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +1 -1
- data/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb +1 -1
- data/app/views/decidim/initiatives/initiative_signatures/update_buttons_and_counters.js.erb +1 -1
- data/app/views/decidim/initiatives/initiative_votes/update_buttons_and_counters.js.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_author.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_filters.html.erb +16 -28
- data/app/views/decidim/initiatives/initiatives/_index_header.html.erb +39 -5
- data/app/views/decidim/initiatives/initiatives/_initiatives.html.erb +11 -1
- data/app/views/decidim/initiatives/initiatives/_interactions.html.erb +2 -3
- data/app/views/decidim/initiatives/initiatives/_progress_bar.html.erb +24 -9
- data/app/views/decidim/initiatives/initiatives/_tags.html.erb +4 -1
- data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +1 -13
- data/app/views/decidim/initiatives/initiatives/index.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/show.html.erb +5 -6
- data/app/views/decidim/initiatives/initiatives_type_scopes/search.html.erb +1 -1
- data/app/views/decidim/initiatives/versions/index.html.erb +8 -0
- data/app/views/decidim/initiatives/versions/show.html.erb +10 -0
- data/app/views/layouts/decidim/_initiative_creation_header.html.erb +3 -1
- data/app/views/layouts/decidim/_initiative_header.html.erb +2 -1
- data/app/views/layouts/decidim/_initiative_signature_creation_header.html.erb +1 -1
- data/app/views/layouts/decidim/admin/initiative.html.erb +1 -1
- data/app/views/layouts/decidim/initiative.html.erb +1 -0
- data/app/views/layouts/decidim/initiative_creation.html.erb +1 -2
- data/app/views/layouts/decidim/initiative_signature_creation.html.erb +2 -2
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +17 -21
- data/config/locales/bg-BG.yml +13 -0
- data/config/locales/bg.yml +13 -0
- data/config/locales/ca.yml +101 -22
- data/config/locales/cs.yml +111 -32
- data/config/locales/da-DK.yml +1 -0
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +75 -21
- data/config/locales/el-GR.yml +1 -0
- data/config/locales/el.yml +525 -0
- data/config/locales/en.yml +103 -24
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +100 -21
- data/config/locales/es-PY.yml +100 -21
- data/config/locales/es.yml +104 -25
- data/config/locales/et-EE.yml +1 -0
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +4 -21
- data/config/locales/fi-plain.yml +100 -21
- data/config/locales/fi.yml +118 -39
- data/config/locales/fr-CA.yml +557 -0
- data/config/locales/fr.yml +102 -23
- data/config/locales/ga-IE.yml +1 -0
- data/config/locales/gl.yml +4 -21
- data/config/locales/hr-HR.yml +1 -0
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +31 -24
- data/config/locales/id-ID.yml +4 -21
- data/config/locales/is-IS.yml +251 -0
- data/config/locales/is.yml +251 -0
- data/config/locales/it.yml +117 -61
- data/config/locales/ja-JP.yml +529 -0
- data/config/locales/ja.yml +549 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt-LT.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/lv.yml +525 -0
- data/config/locales/mt-MT.yml +1 -0
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +77 -21
- data/config/locales/no.yml +368 -9
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +260 -189
- data/config/locales/pt-BR.yml +5 -22
- data/config/locales/pt.yml +231 -179
- data/config/locales/ro-RO.yml +533 -0
- data/config/locales/ru.yml +4 -21
- data/config/locales/sk-SK.yml +468 -0
- data/config/locales/sk.yml +458 -0
- data/config/locales/sl.yml +24 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +8 -0
- data/config/locales/sv.yml +102 -31
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +4 -21
- data/config/locales/uk.yml +4 -21
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +549 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20190925145648_add_promoting_committee_option.rb +7 -0
- data/db/migrate/20191002082220_move_signature_type_to_initative_type.rb +38 -0
- data/db/migrate/20191106144259_add_settings_to_initiatives_types.rb +8 -0
- data/db/migrate/20191107134847_add_scopes_to_initiatives_votes.rb +28 -0
- data/db/migrate/20191116170841_allow_multiple_initiative_votes_counter_caches.rb +32 -0
- data/db/migrate/20191118105634_allow_multiple_offline_votes.rb +34 -0
- data/db/migrate/20200320105920_index_foreign_keys_in_decidim_initiatives.rb +8 -0
- data/db/migrate/20200320105921_index_foreign_keys_in_decidim_initiatives_votes.rb +8 -0
- data/db/migrate/20200417120551_add_custom_signature_end_time_option.rb +7 -0
- data/db/migrate/20200424110930_add_attachments_enabled_option.rb +7 -0
- data/db/migrate/20200514085422_add_area_to_initiatives.rb +7 -0
- data/db/migrate/20200514102631_add_area_enabled_option_to_initiatives.rb +7 -0
- data/db/migrate/20200528151456_remove_user_groups_from_initiative_votes.rb +7 -0
- data/db/migrate/20200827154214_add_commentable_counter_cache_to_initiatives.rb +9 -0
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/lib/decidim/api/initiative_type_interface.rb +13 -0
- data/lib/decidim/initiatives.rb +0 -14
- data/lib/decidim/initiatives/admin_engine.rb +6 -1
- data/lib/decidim/initiatives/api.rb +7 -0
- data/lib/decidim/initiatives/engine.rb +11 -2
- data/lib/decidim/initiatives/participatory_space.rb +20 -1
- data/lib/decidim/initiatives/query_extensions.rb +40 -0
- data/lib/decidim/initiatives/test/factories.rb +69 -8
- data/lib/decidim/initiatives/version.rb +1 -1
- data/lib/tasks/decidim_initiatives.rake +1 -3
- metadata +96 -20
- data/app/views/decidim/initiatives/initiative_widgets/show.html.erb +0 -4
- data/app/views/decidim/initiatives/initiatives/_supports.html.erb +0 -22
- data/app/views/decidim/initiatives/initiatives/signature_identities.html.erb +0 -42
- data/app/views/decidim/initiatives/initiatives_mailer/notify_validating_request.html.erb +0 -3
@@ -1,22 +0,0 @@
|
|
1
|
-
<% if initiative.votes.supports.any? %>
|
2
|
-
<div class="row">
|
3
|
-
<div class="columns large-12">
|
4
|
-
<div class="section committee">
|
5
|
-
<h4 class="section-heading"><%= t(".title") %></h4>
|
6
|
-
</div>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div class="columns large-12 supports-list">
|
10
|
-
<% initiative.votes.supports.each do |s| %>
|
11
|
-
<div class="author author--inline">
|
12
|
-
<span class="author__avatar author__avatar--small">
|
13
|
-
<%= image_tag s.user_group.avatar_url %>
|
14
|
-
</span>
|
15
|
-
<span class="author__name">
|
16
|
-
<%= s.user_group.name %>
|
17
|
-
</span>
|
18
|
-
</div>
|
19
|
-
<% end %>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
<% end %>
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<div class="reveal__header">
|
2
|
-
<h1 class="reveal__title"><%= t ".select_identity" %></h1>
|
3
|
-
</div>
|
4
|
-
|
5
|
-
<%= render partial: "decidim/initiatives/initiatives/vote_button",
|
6
|
-
locals: {
|
7
|
-
initiative: current_initiative,
|
8
|
-
vote_label: current_user.name,
|
9
|
-
unvote_label: current_user.name,
|
10
|
-
verification_label: current_user.name,
|
11
|
-
steps: signature_has_steps?
|
12
|
-
} unless current_initiative.offline? %>
|
13
|
-
|
14
|
-
<% Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.each do |g| %>
|
15
|
-
<br>
|
16
|
-
<% if @voted_groups.include? g.id %>
|
17
|
-
<%= button_to(
|
18
|
-
g.name,
|
19
|
-
initiative_initiative_vote_path(initiative_slug: current_initiative.slug, group_id: g.id),
|
20
|
-
method: :delete,
|
21
|
-
remote: true,
|
22
|
-
data: { disable: true },
|
23
|
-
class: "button expanded light button--sc success"
|
24
|
-
) %>
|
25
|
-
<% else %>
|
26
|
-
<% if signature_has_steps? %>
|
27
|
-
<%= link_to(
|
28
|
-
g.name,
|
29
|
-
initiative_initiative_signatures_path(initiative_slug: current_initiative.slug, group_id: g.id),
|
30
|
-
class: "button expanded light button--sc"
|
31
|
-
) %>
|
32
|
-
<% else %>
|
33
|
-
<%= button_to(
|
34
|
-
g.name,
|
35
|
-
initiative_initiative_signatures_path(initiative_slug: current_initiative.slug, group_id: g.id),
|
36
|
-
remote: true,
|
37
|
-
data: { disable: true },
|
38
|
-
class: "button expanded light button--sc"
|
39
|
-
) %>
|
40
|
-
<% end %>
|
41
|
-
<% end %>
|
42
|
-
<% end %>
|