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,42 +1,44 @@
|
|
1
|
-
<div class="card">
|
1
|
+
<div class="card" data-component="accordion" id="accordion-<%= t("initiatives_types.initiative_type_scopes.title", scope: "decidim.initiatives.admin") %>">
|
2
2
|
<div class="card-divider">
|
3
|
-
<h2 class="card-title">
|
4
|
-
|
5
|
-
|
3
|
+
<h2 class="card-title gap-2" id="<%= t("initiatives_types.initiative_type_scopes.title", scope: "decidim.initiatives.admin") %>">
|
4
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-<%= t("initiatives_types.initiative_type_scopes.title", scope: "decidim.initiatives.admin") %>" type="button">
|
5
|
+
<%= icon "arrow-right-s-line" %>
|
6
|
+
<span>
|
7
|
+
<%= t("initiatives_types.initiative_type_scopes.title", scope: "decidim.initiatives.admin") %>
|
8
|
+
</span>
|
9
|
+
</button>
|
10
|
+
<%= link_to t("actions.new_initiative_type_scope", scope: "decidim.admin"),
|
6
11
|
new_initiatives_type_initiatives_type_scope_path(initiative_type),
|
7
|
-
class: "button
|
12
|
+
class: "button button__sm button__secondary flex-none" if allowed_to? :create, :initiative_type_scope %>
|
8
13
|
</h2>
|
9
14
|
</div>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<
|
15
|
-
<
|
15
|
+
<div id="panel-<%= t("initiatives_types.initiative_type_scopes.title", scope: "decidim.initiatives.admin") %>" class="card-section">
|
16
|
+
<div class="table-scroll">
|
17
|
+
<table class="table-list">
|
18
|
+
<thead>
|
19
|
+
<tr>
|
20
|
+
<th><%= t("models.initiatives_type_scope.fields.scope", scope: "decidim.admin") %></th>
|
21
|
+
<th class="text-right">
|
22
|
+
<%= t("models.initiatives_type_scope.fields.supports_required", scope: "decidim.admin") %>
|
23
|
+
</th>
|
24
|
+
<th class="actions"></th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<% initiative_type.scopes.each do |s| %>
|
16
29
|
<tr>
|
17
|
-
<
|
18
|
-
<
|
19
|
-
|
20
|
-
|
21
|
-
|
30
|
+
<td><%= translated_attribute(s.scope_name) %></td>
|
31
|
+
<td class="text-right"><%= s.supports_required %></td>
|
32
|
+
<td class="table-list__actions">
|
33
|
+
<%= icon_link_to "pencil-line",
|
34
|
+
decidim_admin_initiatives.edit_initiatives_type_initiatives_type_scope_path(initiative_type, s),
|
35
|
+
t("actions.configure", scope: "decidim.admin"),
|
36
|
+
class: "action-icon--new" if allowed_to? :edit, :initiative_type_scope, initiative_type_scope: s %>
|
37
|
+
</td>
|
22
38
|
</tr>
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<tr>
|
27
|
-
<td><%= translated_attribute(s.scope_name) %></td>
|
28
|
-
<td class="text-right"><%= s.supports_required %></td>
|
29
|
-
<td class="table-list__actions">
|
30
|
-
<%= icon_link_to "pencil",
|
31
|
-
decidim_admin_initiatives.edit_initiatives_type_initiatives_type_scope_path(initiative_type, s),
|
32
|
-
t("actions.configure", scope: "decidim.admin"),
|
33
|
-
class: "action-icon--new" if allowed_to? :edit, :initiative_type_scope, initiative_type_scope: s %>
|
34
|
-
</td>
|
35
|
-
</tr>
|
36
|
-
<% end %>
|
37
|
-
</tbody>
|
38
|
-
</table>
|
39
|
-
</div>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
</table>
|
40
42
|
</div>
|
41
43
|
</div>
|
42
44
|
</div>
|
@@ -1,16 +1,20 @@
|
|
1
1
|
<% add_decidim_page_title(translated_attribute(current_initiative_type.title)) %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
<div class="item_show__header">
|
3
|
+
<h2 class="item_show__header-title">
|
4
|
+
<%= t "decidim.admin.titles.initiatives_types" %>
|
5
|
+
</h2>
|
6
|
+
</div>
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
<div class="item__edit item__edit-1col">
|
9
|
+
<div class="item__edit-form">
|
10
|
+
<%= decidim_form_for(@form, html: { class: "form-defaults form edit_initiative_type" }) do |f| %>
|
11
|
+
<%= render partial: "form", object: f %>
|
12
|
+
<div class="item__edit-sticky">
|
13
|
+
<div class="item__edit-sticky-container">
|
14
|
+
<%= f.submit t(".update"), class: "button button__sm button__secondary" %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<%= render partial: "initiative_type_scopes", locals: { initiative_type: current_initiative_type } %>
|
12
18
|
<% end %>
|
13
19
|
</div>
|
14
|
-
|
15
|
-
<%= render partial: "initiative_type_scopes", locals: { initiative_type: current_initiative_type } %>
|
16
|
-
<% end %>
|
20
|
+
</div>
|
@@ -1,60 +1,51 @@
|
|
1
1
|
<% add_decidim_page_title(t("decidim.admin.titles.initiatives_types")) %>
|
2
2
|
|
3
3
|
<div class="card" id="initiative-types">
|
4
|
-
<div class="
|
5
|
-
<h2 class="
|
4
|
+
<div class="item_show__header">
|
5
|
+
<h2 class="item_show__header-title">
|
6
6
|
<%= t "decidim.admin.titles.initiatives_types" %>
|
7
7
|
<%= link_to t("actions.new_initiative_type", scope: "decidim.admin"),
|
8
8
|
[:new, :initiatives_type],
|
9
|
-
class: "button
|
9
|
+
class: "button button__sm button__secondary" if allowed_to? :create, :initiative_type %>
|
10
10
|
</h2>
|
11
11
|
</div>
|
12
|
-
<div class="
|
13
|
-
<
|
14
|
-
<
|
15
|
-
<
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
class: "action-icon--edit" %>
|
38
|
-
<% else %>
|
39
|
-
<span class="action-space icon"></span>
|
40
|
-
<% end %>
|
12
|
+
<div class="table-scroll">
|
13
|
+
<table class="table-list">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th><%= t("models.initiatives_types.fields.title", scope: "decidim.admin") %></th>
|
17
|
+
<th><%= t("models.initiatives_types.fields.created_at", scope: "decidim.admin") %></th>
|
18
|
+
<th class="actions"><%= t("initiatives_type.actions.title", scope: "decidim.resources") %></th>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<% @initiatives_types.each do |initiative_type| %>
|
23
|
+
<tr>
|
24
|
+
<td>
|
25
|
+
<% if allowed_to? :update, :initiative_type, initiative_type: initiative_type %>
|
26
|
+
<%= link_to translated_attribute(initiative_type.title), edit_initiatives_type_path(initiative_type) %>
|
27
|
+
<% else %>
|
28
|
+
<%= translated_attribute initiative_type.title %></td>
|
29
|
+
<% end %>
|
30
|
+
<td><%= l initiative_type.created_at, format: :short %></td>
|
31
|
+
<td class="table-list__actions">
|
32
|
+
<% if allowed_to? :update, :initiative_type, initiative_type: initiative_type %>
|
33
|
+
<%= icon_link_to "pencil-line", edit_initiatives_type_path(initiative_type), t("actions.configure", scope: "decidim.admin"), class: "action-icon--edit" %>
|
34
|
+
<% else %>
|
35
|
+
<span class="action-space icon"></span>
|
36
|
+
<% end %>
|
41
37
|
|
42
|
-
|
38
|
+
<%= free_resource_permissions_link(initiative_type) %>
|
43
39
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
</td>
|
55
|
-
<% end %>
|
56
|
-
</tbody>
|
57
|
-
</table>
|
58
|
-
</div>
|
40
|
+
<% if allowed_to? :destroy, :initiative_type, initiative_type: initiative_type %>
|
41
|
+
<%= icon_link_to "delete-bin-line", initiative_type, t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %>
|
42
|
+
<% else %>
|
43
|
+
<span class="action-space icon"></span>
|
44
|
+
<% end %>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
59
50
|
</div>
|
60
51
|
</div>
|
@@ -1,12 +1,19 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
2
|
+
<div class="item_show__header">
|
3
|
+
<h2 class="item_show__header-title">
|
4
|
+
<%= t ".title" %>
|
5
|
+
</h2>
|
6
|
+
</div>
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
<div class="item__edit item__edit-1col">
|
9
|
+
<div class="item__edit-form">
|
10
|
+
<%= decidim_form_for(@form, html: { class: "form form-defaults new_initiatives_types" }) do |f| %>
|
11
|
+
<%= render partial: "form", object: f %>
|
12
|
+
<div class="item__edit-sticky">
|
13
|
+
<div class="item__edit-sticky-container">
|
14
|
+
<%= f.submit t(".create"), class: "button button__sm button__secondary" %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
11
18
|
</div>
|
12
|
-
|
19
|
+
</div>
|
@@ -1,31 +1,33 @@
|
|
1
1
|
<% add_decidim_meta_tags({
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
image_url: current_initiative.type.attached_uploader(:banner_image).path,
|
3
|
+
description: translated_attribute(current_initiative.description),
|
4
|
+
title: translated_attribute(current_initiative.title),
|
5
|
+
url: initiative_url(current_initiative.id),
|
6
|
+
twitter_handler: current_organization.twitter_handler
|
7
7
|
}) %>
|
8
8
|
|
9
9
|
<% add_decidim_page_title(translated_attribute(current_initiative.title)) %>
|
10
10
|
<% provide :meta_image_url, current_initiative.type.attached_uploader(:banner_image).path %>
|
11
11
|
|
12
|
-
|
13
|
-
<div class="
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
<%= render layout: "layouts/decidim/shared/layout_center" do %>
|
13
|
+
<div class="text-center py-10">
|
14
|
+
<h2 class="title-decorator inline-block text-left"><%= translated_attribute(current_initiative.title) %></h2>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<%= cell "decidim/coauthorships", OpenStruct.new(identities: current_initiative.committee_members.excluding_author.approved.map(&:user).reject(&:deleted?).prepend(current_initiative.author) ) %>
|
18
|
+
|
19
|
+
<div class="form__wrapper">
|
17
20
|
|
18
|
-
<
|
19
|
-
|
20
|
-
<div class="
|
21
|
+
<span class="text-gray-2"><%= l current_initiative.published_at || current_initiative.created_at, format: :decidim_short %></span>
|
22
|
+
|
23
|
+
<div class="editor-content">
|
21
24
|
<%= decidim_sanitize_editor translated_attribute(current_initiative.description) %>
|
22
25
|
</div>
|
23
26
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
class: "title-action__action button small hollow" %>
|
27
|
+
<%= cell("decidim/announcement", t("decidim.initiatives.committee_requests.new.help_text"), callout_class: "secondary") %>
|
28
|
+
|
29
|
+
<div class="form__wrapper-block">
|
30
|
+
<%= logged_link_to t("continue", scope: "decidim.initiatives.committee_requests.new"), spawn_initiative_committee_requests_path(current_initiative), class: "button button__sm md:button__lg button__secondary", data: current_user.blank? ? { dialog_open: "loginModal" } : {} %>
|
29
31
|
</div>
|
30
32
|
</div>
|
31
|
-
|
33
|
+
<% end %>
|
@@ -1,24 +1,19 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</div>
|
1
|
+
<div class="block">
|
2
|
+
<span class="help-text mb-2">
|
3
|
+
<%= t ".invite_to_committee_help" %>
|
4
|
+
</span>
|
5
|
+
<div class="initiative__form__committee">
|
6
|
+
<span>
|
7
|
+
<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>
|
8
|
+
</span>
|
9
|
+
<div class="ml-auto fill-secondary inline-block">
|
10
|
+
<button type="button" class="button button__sm button__text-secondary" data-clipboard-copy="#urlShareLink-committee">
|
11
|
+
<%= render_committee_tooltip %>
|
12
|
+
<span class="sr-only"><%= t("decidim.shared.share_modal.copy_share_link") %></span>
|
13
|
+
</button>
|
14
|
+
<input id="urlShareLink-committee" type="text" class="!hidden" value="<%= decidim_initiatives.new_initiative_committee_request_url(current_initiative) %>" readonly>
|
16
15
|
</div>
|
17
16
|
</div>
|
18
17
|
</div>
|
19
18
|
|
20
|
-
|
21
|
-
<%= link_to t(".continue"), next_wizard_path, class: "button expanded" %>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<%= javascript_pack_tag "decidim_initiatives_admin" %>
|
19
|
+
<%= append_javascript_pack_tag "decidim_initiatives_admin" %>
|
@@ -1,114 +1,76 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
4
|
-
<%= t(".
|
5
|
-
|
1
|
+
<% add_decidim_page_title(t("new", scope: "decidim.initiatives.create_initiative.select_initiative_type")) %>
|
2
|
+
<% announcement_body = capture do %>
|
3
|
+
<div class="max-w-full prose">
|
4
|
+
<%= t("fill_data_help", scope: "decidim.initiatives.create_initiative.fill_data").html_safe %>
|
5
|
+
<%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank", class: "button button__sm button__text-secondary block text-left" %>
|
6
|
+
</div>
|
6
7
|
<% end %>
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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_form" }) do |f| %>
|
22
|
-
<%= form_required_explanation %>
|
23
|
-
<div class=section>
|
24
|
-
<% if single_initiative_type? %>
|
25
|
-
<%= f.hidden_field :type_id %>
|
26
|
-
<% else %>
|
27
|
-
<div class="field">
|
28
|
-
<%= f.select :type_id,
|
29
|
-
initiative_type_options,
|
30
|
-
{},
|
31
|
-
{
|
32
|
-
disabled: !@form.signature_type_updatable?,
|
33
|
-
"data-scope-selector": "initiative_decidim_scope_id",
|
34
|
-
"data-scope-id": f.object.scope_id.to_s,
|
35
|
-
"data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
|
36
|
-
"data-signature-types-selector": "initiative_signature_type",
|
37
|
-
"data-signature-type": current_initiative&.signature_type,
|
38
|
-
"data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
|
39
|
-
} %>
|
40
|
-
</div>
|
41
|
-
<% end %>
|
9
|
+
<%= cell("decidim/announcement", { body: announcement_body }, callout_class: "secondary") %>
|
10
|
+
<%= decidim_form_for(@form, url: fill_data_create_initiative_index_path, method: :put, html: { class: "form-defaults new_initiative_form", novalidate: false }) do |f| %>
|
11
|
+
<div class="form__wrapper">
|
12
|
+
<%= form_required_explanation %>
|
42
13
|
|
43
|
-
|
44
|
-
<%= f.text_field :title, autofocus: true %>
|
45
|
-
</div>
|
14
|
+
<%= f.hidden_field :type_id %>
|
46
15
|
|
47
|
-
|
48
|
-
<%= text_editor_for(f, :description, lines: 8, toolbar: :content) %>
|
49
|
-
</div>
|
16
|
+
<%= f.text_field :title, autofocus: true, value: translated_attribute(f.object.title) %>
|
50
17
|
|
51
|
-
|
52
|
-
<%= f.text_field :hashtag %>
|
53
|
-
</div>
|
18
|
+
<%= text_editor_for(f, :description, lines: 8, toolbar: :content, value: translated_attribute(f.object.description)) %>
|
54
19
|
|
55
|
-
|
56
|
-
<% if signature_type_options.length == 1 %>
|
57
|
-
<%= f.hidden_field :signature_type, value: signature_type_options.first.last %>
|
58
|
-
<% else %>
|
59
|
-
<div class="field">
|
60
|
-
<%= f.select :signature_type, signature_type_options %>
|
61
|
-
</div>
|
62
|
-
<% end %>
|
20
|
+
<%= f.text_field :hashtag %>
|
63
21
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
22
|
+
<% signature_type_options = signature_type_options(f.object) %>
|
23
|
+
<% if signature_type_options.length == 1 %>
|
24
|
+
<%= f.hidden_field :signature_type, value: signature_type_options.first.last %>
|
25
|
+
<% else %>
|
26
|
+
<%= f.select :signature_type, signature_type_options %>
|
27
|
+
<% end %>
|
69
28
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
scopes.map { |scope| [translated_attribute(scope.scope_name), scope&.scope&.id] },
|
76
|
-
required: true,
|
77
|
-
include_blank: t(".select_scope") %>
|
78
|
-
</div>
|
79
|
-
<% end %>
|
29
|
+
<% if scopes.length == 1 %>
|
30
|
+
<%= f.hidden_field :scope_id, value: scopes.first.scope&.id %>
|
31
|
+
<% else %>
|
32
|
+
<%= f.select :scope_id, scopes.map { |scope| [translated_attribute(scope.scope_name), scope&.scope&.id] }, required: true, include_blank: t(".select_scope") %>
|
33
|
+
<% end %>
|
80
34
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
</div>
|
85
|
-
<% end %>
|
35
|
+
<% if initiative_type.custom_signature_end_date_enabled? %>
|
36
|
+
<%= f.date_field :signature_end_date %>
|
37
|
+
<% end %>
|
86
38
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.map { |g| [g.name, g.id] },
|
91
|
-
include_blank: current_user.name, help_text: t(".decidim_user_group_id_help") %>
|
92
|
-
</div>
|
93
|
-
<% end %>
|
39
|
+
<% if initiative_type.area_enabled? %>
|
40
|
+
<%= f.areas_select :area_id, areas_for_select(current_organization), prompt: t(".select_area") %>
|
41
|
+
<% end %>
|
94
42
|
|
95
|
-
|
96
|
-
|
97
|
-
|
43
|
+
<% if Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
|
44
|
+
<%= f.select :decidim_user_group_id, Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.map { |g| [g.name, g.id] }, include_blank: current_user.name %>
|
45
|
+
<% end %>
|
98
46
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
47
|
+
<% if initiative_type.attachments_enabled? %>
|
48
|
+
<%= f.attachment :documents,
|
49
|
+
multiple: true,
|
50
|
+
label: t("decidim.initiatives.form.add_documents"),
|
51
|
+
button_label: t("decidim.initiatives.form.add_documents"),
|
52
|
+
button_class: "button button__lg button__transparent-secondary w-full",
|
53
|
+
button_edit_label: t("decidim.initiatives.form.edit_documents"),
|
54
|
+
help_text: t("attachment_legend", scope: "decidim.initiatives.form") %>
|
55
|
+
<%= f.attachment :photos,
|
56
|
+
multiple: true,
|
57
|
+
label: t("decidim.initiatives.form.add_image"),
|
58
|
+
button_label: t("decidim.initiatives.form.add_image"),
|
59
|
+
button_class: "button button__lg button__transparent-secondary w-full",
|
60
|
+
button_edit_label: t("decidim.initiatives.form.edit_image"),
|
61
|
+
help_text: t("image_legend", scope: "decidim.initiatives.form") %>
|
62
|
+
<% end %>
|
63
|
+
|
64
|
+
<% if @form.state_updatable? %>
|
65
|
+
<%= f.select :state, Decidim::Initiative.states.keys.map { |state| [I18n.t(state, scope: "decidim.initiatives.admin_states"), state] }, {} %>
|
66
|
+
<% end %>
|
67
|
+
|
68
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
69
|
+
<%= link_to :back, class: "button button__sm md:button__lg button__text-secondary" do %>
|
70
|
+
<%= icon "arrow-left-line", class: "fill-current" %>
|
71
|
+
<%= t(".back") %>
|
72
|
+
<% end %>
|
73
|
+
<%= f.submit t(".continue"), class: "button button__sm md:button__lg button__secondary", data: { disable_with: true } %>
|
112
74
|
</div>
|
113
75
|
</div>
|
114
|
-
|
76
|
+
<% end %>
|
@@ -1,37 +1,33 @@
|
|
1
|
+
<% add_decidim_page_title(t("new", scope: "decidim.initiatives.create_initiative.select_initiative_type")) %>
|
1
2
|
<% content_for :back_link do %>
|
2
3
|
<%= link_to :back do %>
|
3
|
-
<%= icon "
|
4
|
+
<%= icon "arrow-left-s-line", class: "icon--small", role: "img", "aria-hidden": true %>
|
4
5
|
<%= t(".back") %>
|
5
6
|
<% end %>
|
6
7
|
<% end %>
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
<% announcement_body = capture do %>
|
10
|
+
<%= t("callout_text", scope: "decidim.initiatives.create_initiative.finish") %>
|
11
|
+
<%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank", class: "button button__sm button__text-secondary block text-left" %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= cell("decidim/announcement", { body: announcement_body }, callout_class: "secondary") %>
|
15
|
+
|
16
|
+
<div class="form__wrapper">
|
17
|
+
<p><%== t "publish_helper_text", scope: "decidim.initiatives.create_initiative.finish_help" %></p>
|
15
18
|
</div>
|
16
|
-
<br>
|
17
|
-
<div class="row">
|
18
|
-
<div class="small-12 medium-centered">
|
19
|
-
<div class="card">
|
20
|
-
<div class="card__content">
|
21
|
-
<%= render partial: "finish_help" %>
|
22
19
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
</div>
|
20
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
21
|
+
<%= link_to initiatives_path, class: "button button__sm md:button__lg button__text-secondary" do %>
|
22
|
+
<%= icon "arrow-left-line" %>
|
23
|
+
<span><%= t(".back_to_initiatives") %></span>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
<%= link_to t(".edit_my_initiative"), edit_initiative_path(current_initiative), class: "button button__sm md:button__lg button__transparent-secondary md:ml-auto" %>
|
27
|
+
|
28
|
+
<%= link_to t(".go_to_my_initiatives"), decidim_initiatives.initiatives_path(filter: { author: "myself", with_any_state: "" }), class: "button button__sm md:button__lg button__secondary" %>
|
29
|
+
|
30
|
+
<% unless promotal_committee_required? %>
|
31
|
+
<%= link_to t(".send_my_initiative"), decidim_initiatives.send_to_technical_validation_initiative_path(current_initiative), class: "button button__sm md:button__lg button__secondary", data: { confirm: t(".confirm") } %>
|
32
|
+
<% end %>
|
37
33
|
</div>
|
@@ -1,21 +1,19 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<% end %>
|
1
|
+
<% add_decidim_page_title(t("new", scope: "decidim.initiatives.create_initiative.select_initiative_type")) %>
|
2
|
+
<% announcement_body = capture do %>
|
3
|
+
<%= t ".individual_help_text", committee_size: current_initiative.minimum_committee_members %>
|
4
|
+
<%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank", class: "button button__sm button__text-secondary block text-left" %>
|
6
5
|
<% end %>
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<%= link_to t(".more_information"), decidim.page_path("initiatives"), target: "_blank" %>.
|
13
|
-
</div>
|
14
|
-
</div>
|
7
|
+
<%= cell("decidim/announcement", { body: announcement_body }, callout_class: "secondary") %>
|
8
|
+
|
9
|
+
<div class="form__wrapper">
|
10
|
+
<%= render partial: "share_committee_link" %>
|
15
11
|
</div>
|
16
|
-
|
17
|
-
<div class="row">
|
18
|
-
|
19
|
-
<%=
|
20
|
-
|
12
|
+
|
13
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
14
|
+
<%= link_to :back, class: "button button__sm md:button__lg button__text-secondary" do %>
|
15
|
+
<%= icon "arrow-left-line", class: "fill-current" %>
|
16
|
+
<%= t("back", scope: "decidim.initiatives.create_initiative.previous_form") %>
|
17
|
+
<% end %>
|
18
|
+
<%= link_to t("continue", scope: "decidim.initiatives.create_initiative.previous_form"), finish_create_initiative_index_path, class: "button button__sm md:button__lg button__secondary" %>
|
21
19
|
</div>
|