decidim-initiatives 0.27.10 → 0.28.0.rc4
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.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives_cell.rb +17 -18
- data/app/cells/decidim/initiatives/initiative_cell.rb +6 -1
- data/app/cells/decidim/initiatives/initiative_dropdown_metadata_cell.rb +19 -0
- data/app/cells/decidim/initiatives/initiative_g_cell.rb +31 -0
- data/app/cells/decidim/initiatives/initiative_metadata_g_cell.rb +62 -0
- data/app/cells/decidim/initiatives/initiative_s_cell.rb +15 -0
- data/app/cells/decidim/initiatives_votes/vote/show.erb +25 -19
- data/app/cells/decidim/initiatives_votes/vote_cell.rb +3 -1
- data/app/commands/decidim/initiatives/admin/accept_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/create_initiative_type.rb +1 -1
- data/app/commands/decidim/initiatives/admin/create_initiative_type_scope.rb +1 -1
- data/app/commands/decidim/initiatives/admin/discard_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/publish_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/reject_initiative.rb +40 -0
- data/app/commands/decidim/initiatives/admin/send_initiative_to_technical_validation.rb +2 -2
- data/app/commands/decidim/initiatives/admin/unpublish_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_answer.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_type.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiative_type_scope.rb +1 -1
- data/app/commands/decidim/initiatives/admin/update_initiatives_settings.rb +1 -1
- data/app/commands/decidim/initiatives/attachment_methods.rb +2 -24
- data/app/commands/decidim/initiatives/create_initiative.rb +19 -14
- data/app/commands/decidim/initiatives/send_initiative_to_technical_validation.rb +2 -2
- data/app/commands/decidim/initiatives/spawn_committee_request.rb +1 -1
- data/app/commands/decidim/initiatives/unvote_initiative.rb +1 -1
- data/app/commands/decidim/initiatives/update_initiative.rb +9 -2
- data/app/commands/decidim/initiatives/validate_mobile_phone.rb +2 -2
- data/app/commands/decidim/initiatives/vote_initiative.rb +5 -5
- data/app/constraints/decidim/initiatives/current_initiative.rb +1 -1
- data/app/controllers/concerns/decidim/initiatives/admin/filterable.rb +2 -2
- data/app/controllers/concerns/decidim/initiatives/needs_initiative.rb +1 -1
- data/app/controllers/decidim/initiatives/admin/answers_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/committee_requests_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/components_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/initiative_attachments_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_controller.rb +17 -6
- data/app/controllers/decidim/initiatives/admin/initiatives_permissions_controller.rb +3 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_settings_controller.rb +2 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_type_scopes_controller.rb +30 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_types_controller.rb +14 -0
- data/app/controllers/decidim/initiatives/admin/initiatives_types_permissions_controller.rb +21 -0
- data/app/controllers/decidim/initiatives/admin/moderations/reports_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/admin/moderations_controller.rb +4 -2
- data/app/controllers/decidim/initiatives/application_controller.rb +0 -1
- data/app/controllers/decidim/initiatives/authorization_create_modals_controller.rb +25 -0
- data/app/controllers/decidim/initiatives/authorization_sign_modals_controller.rb +2 -2
- data/app/controllers/decidim/initiatives/committee_requests_controller.rb +0 -2
- data/app/controllers/decidim/initiatives/create_initiative_controller.rb +62 -115
- data/app/controllers/decidim/initiatives/initiative_signatures_controller.rb +113 -81
- data/app/controllers/decidim/initiatives/initiative_types_controller.rb +7 -0
- data/app/controllers/decidim/initiatives/initiatives_controller.rb +37 -17
- data/app/controllers/decidim/initiatives/versions_controller.rb +0 -1
- data/app/events/decidim/initiatives/admin/initiative_sent_to_technical_validation_event.rb +2 -2
- data/app/events/decidim/initiatives/admin/support_threshold_reached_event.rb +1 -1
- data/app/events/decidim/initiatives/approve_membership_request_event.rb +16 -13
- data/app/events/decidim/initiatives/create_initiative_event.rb +10 -7
- data/app/events/decidim/initiatives/endorse_initiative_event.rb +1 -1
- data/app/events/decidim/initiatives/extend_initiative_event.rb +1 -1
- data/app/events/decidim/initiatives/initiative_sent_to_technical_validation_event.rb +2 -2
- data/app/events/decidim/initiatives/milestone_completed_event.rb +1 -1
- data/app/events/decidim/initiatives/revoke_membership_request_event.rb +16 -13
- data/app/events/decidim/initiatives/spawn_committee_request_event.rb +16 -13
- data/app/forms/decidim/initiatives/admin/initiative_form.rb +1 -1
- data/app/forms/decidim/initiatives/initiative_form.rb +22 -31
- data/app/forms/decidim/initiatives/previous_form.rb +4 -0
- data/app/forms/decidim/initiatives/vote_form.rb +11 -11
- data/app/helpers/decidim/initiatives/admin/initiatives_helper.rb +1 -1
- data/app/helpers/decidim/initiatives/application_helper.rb +5 -62
- data/app/helpers/decidim/initiatives/initiative_helper.rb +48 -5
- data/app/helpers/decidim/initiatives/initiatives_helper.rb +33 -12
- data/app/jobs/decidim/initiatives/export_initiatives_job.rb +1 -1
- data/app/models/decidim/initiative.rb +16 -14
- data/app/models/decidim/initiatives_vote.rb +1 -1
- data/app/packs/entrypoints/decidim_initiatives.js +3 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_initiatives.svg +42 -1
- data/app/packs/src/decidim/initiatives/application.js +0 -1
- data/app/packs/src/decidim/initiatives/scoped_type.js +1 -1
- data/app/packs/stylesheets/decidim/initiatives/initiatives-votes.scss +21 -21
- data/app/packs/stylesheets/decidim/initiatives/print-initiative.scss +47 -35
- data/app/packs/stylesheets/initiatives.scss +171 -0
- data/app/permissions/decidim/initiatives/permissions.rb +3 -13
- data/app/presenters/decidim/initiatives/admin_log/initiative_presenter.rb +2 -2
- data/app/presenters/decidim/initiatives/admin_log/initiatives_settings_presenter.rb +2 -2
- data/app/presenters/decidim/initiatives/admin_log/initiatives_type_presenter.rb +2 -2
- data/app/queries/decidim/initiatives/organization_prioritized_initiatives.rb +1 -1
- data/app/queries/decidim/initiatives/similar_initiatives.rb +2 -2
- data/app/queries/decidim/initiatives/support_period_finished_initiatives.rb +1 -1
- data/app/queries/decidim/initiatives/user_authorizations.rb +1 -1
- data/app/services/decidim/initiatives/pdf_signature_example.rb +44 -52
- data/app/views/decidim/initiatives/_modal.html.erb +15 -0
- data/app/views/decidim/initiatives/admin/answers/_info_initiative.html.erb +21 -19
- data/app/views/decidim/initiatives/admin/answers/edit.html.erb +41 -27
- data/app/views/decidim/initiatives/admin/committee_requests/index.html.erb +41 -48
- data/app/views/decidim/initiatives/admin/exports/_dropdown.html.erb +8 -7
- data/app/views/decidim/initiatives/admin/initiatives/_form.html.erb +111 -95
- data/app/views/decidim/initiatives/admin/initiatives/_initiative_attachments.erb +7 -7
- data/app/views/decidim/initiatives/admin/initiatives/_signatures.html.erb +87 -0
- data/app/views/decidim/initiatives/admin/initiatives/edit.html.erb +72 -60
- data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.html.erb +8 -0
- data/app/views/decidim/initiatives/admin/initiatives/export_pdf_signatures.pdf.erb +5 -78
- data/app/views/decidim/initiatives/admin/initiatives/index.html.erb +76 -75
- data/app/views/decidim/initiatives/admin/initiatives_settings/_form.html.erb +7 -8
- data/app/views/decidim/initiatives/admin/initiatives_settings/edit.html.erb +17 -5
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/_form.html.erb +11 -6
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/edit.html.erb +16 -22
- data/app/views/decidim/initiatives/admin/initiatives_type_scopes/new.html.erb +17 -15
- data/app/views/decidim/initiatives/admin/initiatives_types/_form.html.erb +93 -76
- data/app/views/decidim/initiatives/admin/initiatives_types/_initiative_type_scopes.html.erb +35 -33
- data/app/views/decidim/initiatives/admin/initiatives_types/edit.html.erb +16 -12
- data/app/views/decidim/initiatives/admin/initiatives_types/index.html.erb +39 -48
- data/app/views/decidim/initiatives/admin/initiatives_types/new.html.erb +16 -9
- data/app/views/decidim/initiatives/committee_requests/new.html.erb +21 -19
- data/app/views/decidim/initiatives/create_initiative/_share_committee_link.html.erb +15 -20
- data/app/views/decidim/initiatives/create_initiative/fill_data.html.erb +62 -100
- data/app/views/decidim/initiatives/create_initiative/finish.html.erb +24 -28
- data/app/views/decidim/initiatives/create_initiative/promotal_committee.html.erb +15 -17
- data/app/views/decidim/initiatives/create_initiative/select_initiative_type.html.erb +32 -46
- data/app/views/decidim/initiatives/initiative_signatures/_wizard_steps.html.erb +15 -19
- data/app/views/decidim/initiatives/initiative_signatures/fill_personal_data.html.erb +25 -36
- data/app/views/decidim/initiatives/initiative_signatures/finish.html.erb +5 -16
- data/app/views/decidim/initiatives/initiative_signatures/sms_code.html.erb +8 -19
- data/app/views/decidim/initiatives/initiative_signatures/sms_phone_number.html.erb +8 -20
- data/app/views/decidim/initiatives/initiatives/_committee_members.html.erb +48 -66
- data/app/views/decidim/initiatives/initiatives/_form.html.erb +49 -95
- data/app/views/decidim/initiatives/initiatives/_initiative_badge.html.erb +3 -5
- data/app/views/decidim/initiatives/initiatives/_initiative_hero.html.erb +13 -0
- data/app/views/decidim/initiatives/initiatives/_initiatives.html.erb +6 -15
- data/app/views/decidim/initiatives/initiatives/_interactions.html.erb +1 -1
- data/app/views/decidim/initiatives/initiatives/_new_initiative_button.html.erb +28 -0
- data/app/views/decidim/initiatives/initiatives/_progress_bar.html.erb +2 -6
- data/app/views/decidim/initiatives/initiatives/_result.html.erb +15 -21
- data/app/views/decidim/initiatives/initiatives/_send_to_technical_validation.html.erb +3 -3
- data/app/views/decidim/initiatives/initiatives/_tags_type.html.erb +1 -0
- data/app/views/decidim/initiatives/initiatives/_vote_button.html.erb +9 -9
- data/app/views/decidim/initiatives/initiatives/_vote_cabin.html.erb +7 -7
- data/app/views/decidim/initiatives/initiatives/edit.html.erb +63 -68
- data/app/views/decidim/initiatives/initiatives/index.html.erb +17 -18
- data/app/views/decidim/initiatives/initiatives/index.js.erb +0 -5
- data/app/views/decidim/initiatives/initiatives/print.html.erb +123 -120
- data/app/views/decidim/initiatives/initiatives/show.html.erb +188 -72
- data/app/views/decidim/initiatives/initiatives_mailer/notify_creation.html.erb +2 -2
- data/app/views/decidim/initiatives/initiatives_type_scopes/search.html.erb +2 -1
- data/app/views/decidim/initiatives/versions/show.html.erb +15 -6
- data/app/views/layouts/decidim/_initiative_creation_header.html.erb +17 -28
- data/app/views/layouts/decidim/_initiative_header.html.erb +3 -23
- data/app/views/layouts/decidim/_initiative_header_steps.html.erb +4 -12
- data/app/views/layouts/decidim/_initiative_signature_creation_header.html.erb +5 -26
- data/app/views/layouts/decidim/admin/initiative.html.erb +12 -13
- data/app/views/layouts/decidim/admin/initiatives.html.erb +40 -11
- data/app/views/layouts/decidim/initiative.html.erb +16 -11
- data/app/views/layouts/decidim/initiative_creation.html.erb +7 -18
- data/app/views/layouts/decidim/initiative_head.html.erb +15 -0
- data/app/views/layouts/decidim/initiative_signature_creation.html.erb +3 -11
- data/config/assets.rb +0 -1
- data/config/initializers/wicked_pdf.rb +1 -1
- data/config/locales/ar.yml +1 -96
- data/config/locales/bg.yml +0 -642
- data/config/locales/ca.yml +76 -115
- data/config/locales/cs.yml +70 -109
- data/config/locales/de.yml +78 -117
- data/config/locales/el.yml +1 -98
- data/config/locales/en.yml +69 -108
- data/config/locales/es-MX.yml +65 -104
- data/config/locales/es-PY.yml +65 -104
- data/config/locales/es.yml +73 -112
- data/config/locales/eu.yml +66 -105
- data/config/locales/fi-plain.yml +67 -106
- data/config/locales/fi.yml +68 -107
- data/config/locales/fr-CA.yml +69 -108
- data/config/locales/fr.yml +67 -106
- data/config/locales/ga-IE.yml +0 -35
- data/config/locales/gl.yml +1 -89
- data/config/locales/hu.yml +25 -114
- data/config/locales/id-ID.yml +1 -89
- data/config/locales/is-IS.yml +1 -60
- data/config/locales/it.yml +6 -111
- data/config/locales/ja.yml +65 -111
- data/config/locales/lb.yml +6 -88
- data/config/locales/lt.yml +52 -103
- data/config/locales/lv.yml +1 -99
- data/config/locales/nl.yml +6 -104
- data/config/locales/no.yml +6 -114
- data/config/locales/pl.yml +6 -158
- data/config/locales/pt-BR.yml +23 -146
- data/config/locales/pt.yml +6 -111
- data/config/locales/ro-RO.yml +13 -108
- data/config/locales/ru.yml +1 -68
- data/config/locales/sk.yml +1 -85
- data/config/locales/sl.yml +3 -5
- data/config/locales/sv.yml +25 -120
- data/config/locales/tr-TR.yml +9 -110
- data/config/locales/uk.yml +1 -68
- data/config/locales/zh-CN.yml +6 -102
- data/config/locales/zh-TW.yml +31 -95
- data/db/migrate/20171017091734_add_scopes_for_all_initiative_types.rb +1 -1
- data/db/migrate/20171017095143_update_initiative_scoped_type.rb +1 -1
- data/db/migrate/20191002082220_move_signature_type_to_initative_type.rb +1 -1
- data/lib/decidim/api/initiative_committee_member_type.rb +2 -2
- data/lib/decidim/initiatives/admin_engine.rb +13 -93
- data/lib/decidim/initiatives/content_blocks/registry_manager.rb +22 -0
- data/lib/decidim/initiatives/engine.rb +45 -23
- data/lib/decidim/initiatives/menu.rb +150 -0
- data/lib/decidim/initiatives/participatory_space.rb +6 -91
- data/lib/decidim/initiatives/query_extensions.rb +5 -5
- data/lib/decidim/initiatives/seeds.rb +95 -0
- data/lib/decidim/initiatives/test/factories.rb +43 -48
- data/lib/decidim/initiatives/version.rb +1 -1
- data/lib/decidim/initiatives.rb +1 -1
- data/lib/tasks/decidim_initiatives.rake +2 -2
- data/lib/tasks/initiatives/upgrade/decidim_initiatives_upgrade_tasks.rake +1 -1
- metadata +51 -81
- data/app/cells/decidim/initiatives/content_blocks/highlighted_initiatives/show.erb +0 -28
- data/app/cells/decidim/initiatives/initiative_m/author.erb +0 -10
- data/app/cells/decidim/initiatives/initiative_m/footer.erb +0 -28
- data/app/cells/decidim/initiatives/initiative_m/tags.erb +0 -9
- data/app/cells/decidim/initiatives/initiative_m_cell.rb +0 -77
- data/app/controllers/decidim/initiatives/widgets_controller.rb +0 -44
- data/app/packs/stylesheets/decidim/initiatives/admin.scss +0 -33
- data/app/packs/stylesheets/decidim/initiatives/initiatives.scss +0 -64
- data/app/packs/stylesheets/decidim/initiatives/popularity_item.scss +0 -76
- data/app/packs/stylesheets/decidim/initiatives/statistics.scss +0 -15
- data/app/views/decidim/initiatives/create_initiative/_finish_help.html.erb +0 -2
- data/app/views/decidim/initiatives/create_initiative/previous_form.html.erb +0 -40
- data/app/views/decidim/initiatives/create_initiative/show_similar_initiatives.html.erb +0 -23
- data/app/views/decidim/initiatives/initiatives/_author.html.erb +0 -35
- data/app/views/decidim/initiatives/initiatives/_count.html.erb +0 -1
- data/app/views/decidim/initiatives/initiatives/_filters.html.erb +0 -33
- data/app/views/decidim/initiatives/initiatives/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/initiatives/initiatives/_index_header.html.erb +0 -44
- data/app/views/decidim/initiatives/initiatives/_tags.html.erb +0 -7
- data/app/views/decidim/initiatives/versions/index.html.erb +0 -8
- data/config/locales/he-IL.yml +0 -1
- data/db/seeds/city.jpeg +0 -0
- data/db/seeds/city2.jpeg +0 -0
- data/decidim-initiatives.gemspec +0 -38
- data/lib/decidim/initiatives/initiatives_filter_form_builder.rb +0 -56
- data/lib/gem_overrides/origami/date.rb +0 -47
@@ -1,76 +0,0 @@
|
|
1
|
-
.popularity{
|
2
|
-
min-width: 100px;
|
3
|
-
margin-top: 5px;
|
4
|
-
}
|
5
|
-
|
6
|
-
.popularity::before,
|
7
|
-
.popularity::after{
|
8
|
-
display: table;
|
9
|
-
content: ' ';
|
10
|
-
}
|
11
|
-
|
12
|
-
.popularity::after{
|
13
|
-
clear: both;
|
14
|
-
}
|
15
|
-
|
16
|
-
.popularity.extra__popularity{
|
17
|
-
margin-top: 1.5rem;
|
18
|
-
margin-bottom: 1.5rem;
|
19
|
-
}
|
20
|
-
|
21
|
-
.popularity__desc{
|
22
|
-
color: #8c838a;
|
23
|
-
font-size: 90%;
|
24
|
-
padding-top: .3rem;
|
25
|
-
display: block;
|
26
|
-
clear: both;
|
27
|
-
}
|
28
|
-
|
29
|
-
.popularity__item{
|
30
|
-
float: left;
|
31
|
-
width: 18.4%;
|
32
|
-
height: 4px;
|
33
|
-
background-color: lightgrey;
|
34
|
-
margin-left: 2%;
|
35
|
-
}
|
36
|
-
|
37
|
-
.popularity__item:first-of-type{
|
38
|
-
margin-left: 0;
|
39
|
-
}
|
40
|
-
|
41
|
-
.popularity--level1 .popularity__item:first-of-type,
|
42
|
-
.popularity--level2 .popularity__item:first-of-type,
|
43
|
-
.popularity--level3 .popularity__item:first-of-type,
|
44
|
-
.popularity--level4 .popularity__item:first-of-type,
|
45
|
-
.popularity--level5 .popularity__item:first-of-type,
|
46
|
-
.popularity--level6 .popularity__item:first-of-type{
|
47
|
-
background: #53c9c8;
|
48
|
-
}
|
49
|
-
|
50
|
-
.popularity--level2 .popularity__item:nth-of-type(2),
|
51
|
-
.popularity--level3 .popularity__item:nth-of-type(2),
|
52
|
-
.popularity--level4 .popularity__item:nth-of-type(2),
|
53
|
-
.popularity--level5 .popularity__item:nth-of-type(2),
|
54
|
-
.popularity--level6 .popularity__item:nth-of-type(2){
|
55
|
-
background: -webkit-linear-gradient(left, #53c9c8, #f9bc48);
|
56
|
-
background: linear-gradient(to right, #53c9c8, #f9bc48);
|
57
|
-
}
|
58
|
-
|
59
|
-
.popularity--level3 .popularity__item:nth-of-type(3),
|
60
|
-
.popularity--level4 .popularity__item:nth-of-type(3),
|
61
|
-
.popularity--level5 .popularity__item:nth-of-type(3),
|
62
|
-
.popularity--level6 .popularity__item:nth-of-type(3){
|
63
|
-
background: #f9bc48;
|
64
|
-
}
|
65
|
-
|
66
|
-
.popularity--level4 .popularity__item:nth-of-type(4),
|
67
|
-
.popularity--level5 .popularity__item:nth-of-type(4),
|
68
|
-
.popularity--level6 .popularity__item:nth-of-type(4){
|
69
|
-
background: -webkit-linear-gradient(left, #f9bc48 50%, #f85a39);
|
70
|
-
background: linear-gradient(to right, #f9bc48 50%, #f85a39);
|
71
|
-
}
|
72
|
-
|
73
|
-
.popularity--level5 .popularity__item:nth-of-type(5),
|
74
|
-
.popularity--level6 .popularity__item:nth-of-type(5){
|
75
|
-
background: #f85a39;
|
76
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
.initiative-statistics{
|
2
|
-
margin-top: 25px;
|
3
|
-
|
4
|
-
.definition-data__item{
|
5
|
-
flex-basis: 50%;
|
6
|
-
}
|
7
|
-
|
8
|
-
.definition-data__item:nth-child(odd){
|
9
|
-
border-right: 1px solid #e8e8e8;
|
10
|
-
}
|
11
|
-
|
12
|
-
.definition-data__item:nth-last-child(2){
|
13
|
-
border-bottom: none;
|
14
|
-
}
|
15
|
-
}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
<% content_for :back_link do %>
|
2
|
-
<%= link_to :back do %>
|
3
|
-
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
4
|
-
<%= t(".back") %>
|
5
|
-
<% end %>
|
6
|
-
<% end %>
|
7
|
-
|
8
|
-
<div class="row">
|
9
|
-
<div class="medium-centered">
|
10
|
-
<div class="callout secondary">
|
11
|
-
<%= t ".help" %>
|
12
|
-
<%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank" %>.
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
<br>
|
17
|
-
<div class="row">
|
18
|
-
<div class="medium-centered">
|
19
|
-
<div class="card">
|
20
|
-
<div class="card__content">
|
21
|
-
<%= decidim_form_for(@form, url: next_wizard_path, method: :put, html: { class: "form new_initiative_previous_form" }) do |f| %>
|
22
|
-
<%= form_required_explanation %>
|
23
|
-
<%= f.hidden_field :type_id %>
|
24
|
-
|
25
|
-
<div class="field">
|
26
|
-
<%= f.text_field :title, autofocus: true %>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<div class="field">
|
30
|
-
<%= text_editor_for(f, :description, lines: 8, toolbar: :content) %>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
<div class="actions">
|
34
|
-
<%= f.submit t(".continue"), class: "button expanded" %>
|
35
|
-
</div>
|
36
|
-
<% end %>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
</div>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<% content_for :back_link do %>
|
2
|
-
<%= link_to :back do %>
|
3
|
-
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
4
|
-
<%= t(".back") %>
|
5
|
-
<% end %>
|
6
|
-
<% end %>
|
7
|
-
<div class="row column">
|
8
|
-
<div class="callout secondary">
|
9
|
-
<%= t(".compare_help") %>
|
10
|
-
<%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank" %>.
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
<br>
|
14
|
-
|
15
|
-
<div class="row small-up-1 medium-up-2 card-grid">
|
16
|
-
<%= render similar_initiatives %>
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="row">
|
20
|
-
<div class="columns mediumlarge-4 small-12 mediumlarge-push-4">
|
21
|
-
<%= link_to t(".continue"), next_wizard_path, class: "button expanded" %>
|
22
|
-
</div>
|
23
|
-
</div>
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<div class="author-data initiative-authors">
|
2
|
-
<div class="author-data__main ">
|
3
|
-
<div class="author author--inline">
|
4
|
-
<span class="author__avatar author__avatar--small">
|
5
|
-
<%= image_tag present(initiative.author).avatar_url, alt: t("decidim.author.avatar", name: decidim_sanitize(initiative.author_name)) %>
|
6
|
-
</span>
|
7
|
-
<span class="author__name">
|
8
|
-
<% if initiative.author.deleted? %>
|
9
|
-
<span class="label label--small label--basic">
|
10
|
-
<%= t(".deleted") %>
|
11
|
-
</span>
|
12
|
-
<% else %>
|
13
|
-
<%= decidim_sanitize(initiative.author_name) %>
|
14
|
-
<% end %>
|
15
|
-
</span>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<% initiative.committee_members.excluding_author.approved.each do |m| %>
|
19
|
-
<% unless m.user.deleted? %>
|
20
|
-
<div class="author author--inline">
|
21
|
-
<span class="author__avatar author__avatar--small">
|
22
|
-
<%= image_tag present(m.user).avatar_url %>
|
23
|
-
</span>
|
24
|
-
<span class="author__name">
|
25
|
-
<%= decidim_sanitize(m.user.name) %>
|
26
|
-
</span>
|
27
|
-
</div>
|
28
|
-
<% end %>
|
29
|
-
<% end %>
|
30
|
-
|
31
|
-
<div class="publish-date">
|
32
|
-
<%= l initiative.published_at || initiative.created_at, format: :decidim_short %>
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
</div>
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= t(".title", count: initiatives.total_count) %>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<%= initiatives_filter_form_for filter do |form| %>
|
2
|
-
<div class="filters__section">
|
3
|
-
<div class="filters__search">
|
4
|
-
<div class="input-group">
|
5
|
-
<%= form.search_field :search_text_cont, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search") %>
|
6
|
-
<div class="input-group-button">
|
7
|
-
<button type="submit" class="button">
|
8
|
-
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
9
|
-
</button>
|
10
|
-
</div>
|
11
|
-
</div>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<%= form.check_boxes_tree :with_any_state, filter_states_values, legend_title: t(".state") %>
|
16
|
-
|
17
|
-
<%= form.check_boxes_tree :with_any_scope, filter_scopes_values, legend_title: t(".scope") %>
|
18
|
-
|
19
|
-
<% unless single_initiative_type? %>
|
20
|
-
<%= form.check_boxes_tree :with_any_type, filter_types_values, legend_title: t(".type") %>
|
21
|
-
<% end %>
|
22
|
-
|
23
|
-
<%= form.check_boxes_tree :with_any_area, filter_areas_values, legend_title: t(".area") %>
|
24
|
-
|
25
|
-
<% if current_user %>
|
26
|
-
<%= form.collection_radio_buttons :author,
|
27
|
-
[["any", t(".any")], ["myself", t(".myself")]],
|
28
|
-
:first,
|
29
|
-
:last,
|
30
|
-
legend_title: t(".author") %>
|
31
|
-
<% end %>
|
32
|
-
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
33
|
-
<% end %>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<div class="filters-controls hide-for-mediumlarge">
|
2
|
-
<button data-open="filter-box" class="filters-controls__trigger" aria-controls="filter-box" aria-haspopup="dialog">
|
3
|
-
<%= t ".filter" %>
|
4
|
-
<%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(".unfold"), role: "img" %>
|
5
|
-
</button>
|
6
|
-
</div>
|
7
|
-
|
8
|
-
<div class="reveal" id="filter-box" data-reveal role="dialog" aria-modal="true" aria-labelledby="filter-box-label">
|
9
|
-
<div class="reveal__header">
|
10
|
-
<h3 id="filter-box-label" class="reveal__title"><%= t ".filter_by" %>:</h3>
|
11
|
-
<button class="close-button" data-close aria-label="<%= t(".close_modal") %>" type="button">
|
12
|
-
<span aria-hidden="true">×</span>
|
13
|
-
</button>
|
14
|
-
</div>
|
15
|
-
<div class="filters">
|
16
|
-
<%= render partial: "filters", locals: { type: :small } %>
|
17
|
-
</div>
|
18
|
-
</div>
|
@@ -1,44 +0,0 @@
|
|
1
|
-
<div class="row collapse">
|
2
|
-
<h1 id="initiatives-count" class="title-action__title section-heading">
|
3
|
-
<%= render partial: "count" %>
|
4
|
-
</h1>
|
5
|
-
<% if Decidim::Initiatives.creation_enabled %>
|
6
|
-
<% if current_user && allowed_to?(:create, :initiative) %>
|
7
|
-
<%= link_to create_initiative_path(:select_initiative_type), class: "title-action__action button small" do %>
|
8
|
-
<%= t(".new_initiative") %>
|
9
|
-
<%= icon "plus", role: "img", "aria-hidden": true %>
|
10
|
-
<% end %>
|
11
|
-
<% elsif current_user %>
|
12
|
-
<button type="button" class="title-action__action button small" data-open="not-authorized-modal" aria-controls="not-authorized-modal" aria-haspopup="dialog" tabindex="0">
|
13
|
-
<%= t(".new_initiative") %>
|
14
|
-
<%= icon "plus", role: "img", "aria-hidden": true %>
|
15
|
-
</button>
|
16
|
-
<% else %>
|
17
|
-
<% content_for(:redirect_after_login) { create_initiative_url(:select_initiative_type) } %>
|
18
|
-
<button type="button" class="title-action__action button small" data-open="loginModal" aria-controls="loginModal" aria-haspopup="dialog" tabindex="0">
|
19
|
-
<%= t(".new_initiative") %>
|
20
|
-
<%= icon "plus", role: "img", "aria-hidden": true %>
|
21
|
-
</button>
|
22
|
-
<% end %>
|
23
|
-
<% end %>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<div class="reveal not-authorized-reveal" id="not-authorized-modal" aria-hidden="true" role="dialog" aria-modal="true" aria-labelledby="not-authorized-modal-title" data-reveal data-multiple-opened="true">
|
27
|
-
<div class="reveal__header">
|
28
|
-
<h2 class="reveal__title" id="not-authorized-modal-title"><%= t(".not_authorized.title") %></h2>
|
29
|
-
<button class="close-button" data-close aria-label="<%= t(".not_authorized.close") %>"
|
30
|
-
type="button">
|
31
|
-
<span aria-hidden="true">×</span>
|
32
|
-
</button>
|
33
|
-
</div>
|
34
|
-
<div class="not-authhorized-content">
|
35
|
-
<div class="not-authorized-modal-content">
|
36
|
-
<p>
|
37
|
-
<%= t(".not_authorized.explanation") %>
|
38
|
-
</p>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
<div class="not-authorized-modal-footer reveal__footer">
|
42
|
-
<%= link_to t(".not_authorized.authorizations_page"), decidim_verifications.authorizations_path(redirect_url: create_initiative_url(:select_initiative_type)), class: "button expanded" %>
|
43
|
-
</div>
|
44
|
-
</div>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<ul class="tags tags--initiative">
|
2
|
-
<li><%= link_to decidim_escape_translated(resource.type.title).html_safe, initiatives_path(filter: { with_any_type: [resource.type.id] }) %></li>
|
3
|
-
<li><%= link_to decidim_escape_translated(resource.scope_name), initiatives_path(filter: { with_any_scope: [resource.scope&.id] }) %></li>
|
4
|
-
<% if resource.area %>
|
5
|
-
<li><%= link_to decidim_escape_translated(resource.area_name), initiatives_path(filter: { with_any_area: [resource.area.id] }) %></li>
|
6
|
-
<% end %>
|
7
|
-
</ul>
|
data/config/locales/he-IL.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
he:
|
data/db/seeds/city.jpeg
DELETED
Binary file
|
data/db/seeds/city2.jpeg
DELETED
Binary file
|
data/decidim-initiatives.gemspec
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
$LOAD_PATH.push File.expand_path("lib", __dir__)
|
4
|
-
|
5
|
-
require "decidim/initiatives/version"
|
6
|
-
|
7
|
-
Gem::Specification.new do |s|
|
8
|
-
s.version = Decidim::Initiatives.version
|
9
|
-
s.authors = ["Juan Salvador Perez Garcia"]
|
10
|
-
s.email = ["jsperezg@gmail.com"]
|
11
|
-
s.license = "AGPL-3.0"
|
12
|
-
s.homepage = "https://github.com/decidim/decidim"
|
13
|
-
s.required_ruby_version = "~> 3.0.0"
|
14
|
-
|
15
|
-
s.name = "decidim-initiatives"
|
16
|
-
s.summary = "Decidim initiatives module"
|
17
|
-
s.description = "Participants initiatives plugin for decidim."
|
18
|
-
|
19
|
-
s.files = Dir.chdir(__dir__) do
|
20
|
-
`git ls-files -z`.split("\x0").select do |f|
|
21
|
-
(File.expand_path(f) == __FILE__) ||
|
22
|
-
f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
s.add_dependency "decidim-admin", Decidim::Initiatives.version
|
27
|
-
s.add_dependency "decidim-comments", Decidim::Initiatives.version
|
28
|
-
s.add_dependency "decidim-core", Decidim::Initiatives.version
|
29
|
-
s.add_dependency "decidim-verifications", Decidim::Initiatives.version
|
30
|
-
s.add_dependency "origami", "~> 2.1"
|
31
|
-
s.add_dependency "rexml", "~> 3.2.5" # Required for Origami gem to work with Ruby 3.0.0+
|
32
|
-
s.add_dependency "wicked", "~> 1.3"
|
33
|
-
s.add_dependency "wicked_pdf", "= 2.7.0"
|
34
|
-
s.add_dependency "wkhtmltopdf-binary", "~> 0.12"
|
35
|
-
|
36
|
-
s.add_development_dependency "decidim-dev", Decidim::Initiatives.version
|
37
|
-
s.add_development_dependency "decidim-meetings", Decidim::Initiatives.version
|
38
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Decidim
|
4
|
-
module Initiatives
|
5
|
-
# This custom Form builder add the fields needed to deal with
|
6
|
-
# Initiative types.
|
7
|
-
class InitiativesFilterFormBuilder < Decidim::FilterFormBuilder
|
8
|
-
# Public: Generates a select field with the initiative types.
|
9
|
-
#
|
10
|
-
# name - The name of the field (usually type_id)
|
11
|
-
# collection - A collection of initiative types.
|
12
|
-
# options - An optional Hash with options:
|
13
|
-
# - prompt - An optional String with the text to display as prompt.
|
14
|
-
#
|
15
|
-
# Returns a String.
|
16
|
-
def initiative_types_select(name, collection, options = {})
|
17
|
-
selected = object.send(name)
|
18
|
-
|
19
|
-
types = types_for_options_for_select(selected, collection)
|
20
|
-
|
21
|
-
prompt = options.delete(:prompt)
|
22
|
-
remote_path = options.delete(:remote_path) || false
|
23
|
-
multiple = options.delete(:multiple) || false
|
24
|
-
html_options = {
|
25
|
-
multiple: multiple,
|
26
|
-
class: "select2",
|
27
|
-
"data-remote-path" => remote_path,
|
28
|
-
"data-placeholder" => prompt
|
29
|
-
}
|
30
|
-
|
31
|
-
select(name, @template.options_for_select(types, selected: selected), options, html_options)
|
32
|
-
end
|
33
|
-
|
34
|
-
private
|
35
|
-
|
36
|
-
def types_for_options_for_select(selected, collection)
|
37
|
-
if selected.present?
|
38
|
-
if selected == "all"
|
39
|
-
types = collection.all.map do |type|
|
40
|
-
[type.title[I18n.locale.to_s], type.id]
|
41
|
-
end
|
42
|
-
else
|
43
|
-
selected = selected.values if selected.is_a?(Hash)
|
44
|
-
selected = [selected] unless selected.is_a?(Array)
|
45
|
-
types = collection.where(id: selected.map(&:to_i)).map do |type|
|
46
|
-
[type.title[I18n.locale.to_s], type.id]
|
47
|
-
end
|
48
|
-
end
|
49
|
-
else
|
50
|
-
types = []
|
51
|
-
end
|
52
|
-
types
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: false
|
2
|
-
|
3
|
-
module Origami
|
4
|
-
class Date < LiteralString
|
5
|
-
def self.parse(str)
|
6
|
-
#:nodoc:
|
7
|
-
raise InvalidDateError, "Not a valid Date string" unless str =~ REGEXP_TOKEN
|
8
|
-
|
9
|
-
date =
|
10
|
-
{
|
11
|
-
year: $~['year'].to_i
|
12
|
-
}
|
13
|
-
|
14
|
-
date[:month] = $~['month'].to_i if $~['month']
|
15
|
-
date[:day] = $~['day'].to_i if $~['day']
|
16
|
-
date[:hour] = $~['hour'].to_i if $~['hour']
|
17
|
-
date[:min] = $~['min'].to_i if $~['min']
|
18
|
-
date[:sec] = $~['sec'].to_i if $~['sec']
|
19
|
-
|
20
|
-
if %w[+ -].include?($~['ut'])
|
21
|
-
utc_offset = $~['ut_hour_off'].to_i * 3600 + $~['ut_min_off'].to_i * 60
|
22
|
-
utc_offset = -utc_offset if $~['ut'] == '-'
|
23
|
-
|
24
|
-
date[:utc_offset] = utc_offset
|
25
|
-
end
|
26
|
-
|
27
|
-
Origami::Date.new(**date)
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.now
|
31
|
-
now = Time.now.utc
|
32
|
-
|
33
|
-
date =
|
34
|
-
{
|
35
|
-
year: now.strftime("%Y").to_i,
|
36
|
-
month: now.strftime("%m").to_i,
|
37
|
-
day: now.strftime("%d").to_i,
|
38
|
-
hour: now.strftime("%H").to_i,
|
39
|
-
min: now.strftime("%M").to_i,
|
40
|
-
sec: now.strftime("%S").to_i,
|
41
|
-
utc_offset: now.utc_offset
|
42
|
-
}
|
43
|
-
|
44
|
-
Origami::Date.new(**date)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|