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,9 +1,10 @@
|
|
1
|
-
<span class="exports
|
1
|
+
<span class="exports button button__sm button__secondary button--simple" data-toggle="<%= dropdown_id(collection_ids) %>">
|
2
2
|
<% if collection_ids.present? %>
|
3
3
|
<%= t("actions.export-selection", scope: "decidim.admin") %>
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
<% else %>
|
5
|
+
<%= t("actions.export", scope: "decidim.admin") %>
|
6
|
+
<% end %>
|
7
|
+
<%= icon "arrow-down-s-line", class: "dropdown-filter-icon" %>
|
7
8
|
</span>
|
8
9
|
<div class="dropdown-pane"
|
9
10
|
id="<%= dropdown_id(collection_ids) %>"
|
@@ -13,11 +14,11 @@
|
|
13
14
|
data-auto-focus="true"
|
14
15
|
data-close-on-click="true">
|
15
16
|
<ul class="vertical menu add-components">
|
16
|
-
<% %w
|
17
|
+
<% %w(CSV JSON).each do |format| %>
|
17
18
|
<li class="exports--format--<%= format.downcase %> exports--initiatives">
|
18
19
|
<%= link_to t("decidim.admin.exports.export_as", name: t("decidim.initiatives.admin.exports.initiatives"),
|
19
|
-
|
20
|
-
export_initiatives_path(format
|
20
|
+
export_format: format.upcase),
|
21
|
+
export_initiatives_path(format:, collection_ids:) %>
|
21
22
|
</li>
|
22
23
|
<% end %>
|
23
24
|
</ul>
|
@@ -1,122 +1,138 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="card-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<div class="row column">
|
12
|
-
<%= form.translated :editor, :description, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<div class="card" data-component="accordion" id="accordion-title">
|
3
|
+
<div class="card-divider">
|
4
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-title" type="button">
|
5
|
+
<%= icon "arrow-right-s-line" %>
|
6
|
+
<h2 class="card-title" id="title">
|
7
|
+
<%= t("title", scope: "decidim.initiatives.admin.initiatives.form") %>
|
8
|
+
</h2>
|
9
|
+
</button>
|
13
10
|
</div>
|
14
11
|
|
15
|
-
<div
|
16
|
-
<div class="
|
17
|
-
<%= form.text_field :
|
12
|
+
<div id="panel-title" class="card-section">
|
13
|
+
<div class="row column">
|
14
|
+
<%= form.translated :text_field, :title, autofocus: true, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), aria: { label: :title } %>
|
18
15
|
</div>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
16
|
|
23
|
-
<div class="
|
24
|
-
|
25
|
-
|
26
|
-
</div>
|
17
|
+
<div class="row column">
|
18
|
+
<%= form.translated :editor, :description, lines: 8, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative), aria: { label: :description } %>
|
19
|
+
</div>
|
27
20
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
Decidim::Initiative.states.keys.map { |state| [I18n.t(state, scope: "decidim.initiatives.admin_states"), state] },
|
33
|
-
{},
|
34
|
-
{ disabled: !@form.state_updatable? } %>
|
21
|
+
<div class="row column">
|
22
|
+
<div class="columns">
|
23
|
+
<%= form.text_field :hashtag, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
24
|
+
</div>
|
35
25
|
</div>
|
36
26
|
</div>
|
27
|
+
</div>
|
37
28
|
|
38
|
-
|
39
|
-
|
40
|
-
<
|
41
|
-
<%=
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
"data-scope-selector": "initiative_decidim_scope_id",
|
47
|
-
"data-scope-id": form.object.decidim_scope_id.to_s,
|
48
|
-
"data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
|
49
|
-
"data-signature-types-selector": "initiative_signature_type",
|
50
|
-
"data-signature-type": current_initiative.signature_type,
|
51
|
-
"data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
|
52
|
-
} %>
|
53
|
-
</div>
|
54
|
-
<% end %>
|
55
|
-
<div class="columns xlarge-6">
|
56
|
-
<%= form.select :decidim_scope_id, [], {}, { disabled: !@form.signature_type_updatable? } %>
|
57
|
-
</div>
|
29
|
+
<div class="card" data-component="accordion" id="accordion-settings">
|
30
|
+
<div class="card-divider">
|
31
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-settings" type="button">
|
32
|
+
<%= icon "arrow-right-s-line" %>
|
33
|
+
<h2 class="card-title" id="settings">
|
34
|
+
<%= t("settings", scope: "decidim.initiatives.admin.initiatives.form") %>
|
35
|
+
</h2>
|
36
|
+
</button>
|
58
37
|
</div>
|
59
38
|
|
60
|
-
|
39
|
+
<div id="panel-settings" class="card-section">
|
61
40
|
<div class="row">
|
62
|
-
<div class="columns
|
63
|
-
<%= form.
|
41
|
+
<div class="columns">
|
42
|
+
<%= form.select :state,
|
43
|
+
Decidim::Initiative.states.keys.map { |state| [I18n.t(state, scope: "decidim.initiatives.admin_states"), state] },
|
44
|
+
{},
|
45
|
+
{ disabled: !@form.state_updatable? } %>
|
64
46
|
</div>
|
47
|
+
</div>
|
65
48
|
|
66
|
-
|
67
|
-
|
49
|
+
<div class="row">
|
50
|
+
<% unless single_initiative_type? %>
|
51
|
+
<div class="columns">
|
52
|
+
<%= form.select :type_id,
|
53
|
+
initiative_type_options,
|
54
|
+
{},
|
55
|
+
{
|
56
|
+
disabled: !@form.signature_type_updatable?,
|
57
|
+
"data-scope-selector": "initiative_decidim_scope_id",
|
58
|
+
"data-scope-id": form.object.decidim_scope_id.to_s,
|
59
|
+
"data-scope-search-url": decidim_initiatives.initiative_type_scopes_search_url,
|
60
|
+
"data-signature-types-selector": "initiative_signature_type",
|
61
|
+
"data-signature-type": current_initiative.signature_type,
|
62
|
+
"data-signature-types-search-url": decidim_initiatives.initiative_type_signature_types_search_url
|
63
|
+
} %>
|
64
|
+
</div>
|
65
|
+
<% end %>
|
66
|
+
<div class="columns">
|
67
|
+
<%= form.select :decidim_scope_id, [], {}, { disabled: !@form.signature_type_updatable? } %>
|
68
68
|
</div>
|
69
69
|
</div>
|
70
|
-
<% end %>
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
<% if current_initiative.published? && current_user.admin? %>
|
72
|
+
<div class="row">
|
73
|
+
<div class="columns">
|
74
|
+
<%= form.date_field :signature_start_date %>
|
75
|
+
</div>
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
selected: current_initiative.decidim_area_id,
|
84
|
-
include_blank: current_initiative.decidim_area_id.blank? || current_initiative.created?
|
85
|
-
},
|
86
|
-
disabled: !@form.area_updatable? %>
|
87
|
-
</div>
|
88
|
-
<% end %>
|
77
|
+
<div class="columns">
|
78
|
+
<%= form.date_field :signature_end_date %>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
<% end %>
|
89
82
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
83
|
+
<% if can_edit_custom_signature_end_date?(current_initiative) %>
|
84
|
+
<div class="row column">
|
85
|
+
<%= form.date_field :signature_end_date, disabled: !allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
86
|
+
</div>
|
87
|
+
<% end %>
|
88
|
+
|
89
|
+
<% if current_initiative.area_enabled? %>
|
90
|
+
<div class="row column">
|
91
|
+
<%= form.areas_select :area_id,
|
92
|
+
areas_for_select(current_organization),
|
93
|
+
{
|
94
|
+
selected: current_initiative.decidim_area_id,
|
95
|
+
include_blank: current_initiative.decidim_area_id.blank? || current_initiative.created?
|
96
|
+
},
|
97
|
+
disabled: !@form.area_updatable? %>
|
98
|
+
</div>
|
99
|
+
<% end %>
|
95
100
|
|
96
|
-
<% if current_initiative.accepts_offline_votes? && current_user.admin? %>
|
97
101
|
<div class="row">
|
98
|
-
<div class="columns
|
99
|
-
|
100
|
-
<%= label_tag "initiative_offline_votes_#{scope_id}", t("activemodel.attributes.initiative.offline_votes_for_scope", scope_name: translated_attribute(scope_name)) %>
|
101
|
-
<%= number_field_tag "initiative[offline_votes][#{scope_id}]", votes, min: 0, id: "initiative_offline_votes_#{scope_id}" %>
|
102
|
-
<% end %>
|
102
|
+
<div class="columns">
|
103
|
+
<%= form.select :signature_type, [], {}, { disabled: !@form.signature_type_updatable? } %>
|
103
104
|
</div>
|
104
105
|
</div>
|
105
|
-
<% end %>
|
106
|
-
</div>
|
107
|
-
</div>
|
108
|
-
<div class="card">
|
109
|
-
<div class="card-divider">
|
110
|
-
<h2 class="card-title"><%= t ".attachments" %></h2>
|
111
|
-
</div>
|
112
106
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
107
|
+
<% if current_initiative.accepts_offline_votes? && current_user.admin? %>
|
108
|
+
<div class="row">
|
109
|
+
<div class="columns">
|
110
|
+
<% @form.offline_votes.each do |scope_id, (votes, scope_name)| %>
|
111
|
+
<%= label_tag "initiative_offline_votes_#{scope_id}", t("activemodel.attributes.initiative.offline_votes_for_scope", scope_name: translated_attribute(scope_name)) %>
|
112
|
+
<%= number_field_tag "initiative[offline_votes][#{scope_id}]", votes, min: 0, id: "initiative_offline_votes_#{scope_id}" %>
|
113
|
+
<% end %>
|
114
|
+
</div>
|
115
|
+
</div>
|
117
116
|
<% end %>
|
118
117
|
</div>
|
119
118
|
</div>
|
120
|
-
|
119
|
+
<div class="card" data-component="accordion" id="accordion-homepage_highlighted_content_banner_title">
|
120
|
+
<div class="card-divider">
|
121
|
+
<button class="card-divider-button" data-open="true" data-controls="panel-homepage_highlighted_content_banner_title" type="button">
|
122
|
+
<%= icon "arrow-right-s-line" %>
|
123
|
+
<h2 class="card-title" id="homepage_highlighted_content_banner_title">
|
124
|
+
<%= t("homepage_highlighted_content_banner_title", scope: "decidim.admin.organization_appearance.form") %>
|
125
|
+
</h2>
|
126
|
+
</button>
|
127
|
+
</div>
|
121
128
|
|
122
|
-
|
129
|
+
<div id="panel-homepage_highlighted_content_banner_title" class="card-section">
|
130
|
+
<div class="row">
|
131
|
+
<% if allowed_to?(:read, :attachment, initiative: current_participatory_space) %>
|
132
|
+
<%= render partial: "initiative_attachments", locals: { current_initiative:, current_participatory_space: } %>
|
133
|
+
<% end %>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
<%= append_javascript_pack_tag "decidim_initiatives_admin" %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="row column">
|
2
|
-
<div class="columns
|
2
|
+
<div class="columns">
|
3
3
|
<% if current_initiative.documents.any? %>
|
4
4
|
<div class="row column">
|
5
5
|
<strong><%= t ".documents" %>:</strong>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<% if current_initiative.photos.any? %>
|
18
18
|
<div class="row column">
|
19
19
|
<strong><%= t(".photos") %>:</strong>
|
20
|
-
<div id="photos" class="gallery row">
|
20
|
+
<div id="photos" class="gallery row" data-gallery>
|
21
21
|
<% current_initiative.photos.each do |photo| %>
|
22
22
|
<%= link_to photo.big_url, target: "_blank", rel: "noopener" do %>
|
23
23
|
<%= image_tag photo.thumbnail_url, class: "thumbnail", alt: strip_tags(translated_attribute(photo.title)) %>
|
@@ -27,17 +27,17 @@
|
|
27
27
|
</div>
|
28
28
|
<% end %>
|
29
29
|
</div>
|
30
|
-
<div class="columns
|
30
|
+
<div class="columns">
|
31
31
|
<% if allowed_to?(:update, :initiative, initiative: current_initiative) %>
|
32
32
|
<%= aria_selected_link_to t(".edit"),
|
33
33
|
decidim_admin_initiatives.initiative_attachments_path(current_participatory_space),
|
34
|
-
class: "button" %>
|
34
|
+
class: "button button__sm button__secondary" %>
|
35
35
|
<%= aria_selected_link_to t(".new"),
|
36
36
|
decidim_admin_initiatives.new_initiative_attachment_path(current_participatory_space),
|
37
|
-
class: "button" %>
|
37
|
+
class: "button button__sm button__secondary" %>
|
38
38
|
<% else %>
|
39
|
-
<%= link_to t(".edit"), "#", class: "button muted disabled" %>
|
40
|
-
<%= link_to t(".new"), "#", class: "button muted disabled" %>
|
39
|
+
<%= link_to t(".edit"), "#", class: "button button__sm button__secondary muted disabled" %>
|
40
|
+
<%= link_to t(".new"), "#", class: "button button__sm button__secondary muted disabled" %>
|
41
41
|
<% end %>
|
42
42
|
</div>
|
43
43
|
</div>
|
@@ -0,0 +1,87 @@
|
|
1
|
+
<% cell_small_width = collect_user_extra_fields ? "9.4%" : "15.6%" %>
|
2
|
+
<% style_initiative_title = "border: 1pt solid black; margin: 15pt 0; font-size: 12pt; font-weight: bold; text-transform: uppercase; text-align: center;" %>
|
3
|
+
<% style_initiatives_votes_table = "width: 100%; display: block; border: 1pt solid black;" %>
|
4
|
+
<% style_initiatives_votes_table_header = "background-color: lightgray; display: inline-block; width: 100%; font-size: 12pt; font-weight: bold; border-bottom: 1pt solid black;" %>
|
5
|
+
<% style_initiatives_votes_table_row = "width: 100%; display: inline-block; min-height: 33pt;" %>
|
6
|
+
<% style_initiatives_votes_table_cell = "width: 19%; padding-left: 5pt; word-wrap: break-word; display: inline-block; float: left; min-height: 36pt;" %>
|
7
|
+
<% style_initiatives_votes_table_cell_small = "width: #{cell_small_width}; padding-left: 5pt; word-wrap: break-word; display: inline-block; float: left; min-height: 36pt;" %>
|
8
|
+
<div class="initiative-title" style="<%= style_initiative_title %>">
|
9
|
+
<%= translated_attribute(initiative.title) %>
|
10
|
+
</div>
|
11
|
+
<div class="initiatives-votes-table" style="<%= style_initiatives_votes_table %>">
|
12
|
+
<div class="initiatives-votes-table-header" style="<%= style_initiatives_votes_table_header %>">
|
13
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
14
|
+
<%= t("models.initiatives_votes.fields.initiative_id", scope: "decidim.admin") %>
|
15
|
+
</div>
|
16
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
17
|
+
<%= t("models.initiatives_votes.fields.initiative_title", scope: "decidim.admin") %>
|
18
|
+
</div>
|
19
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
20
|
+
<%= t("models.initiatives_votes.fields.initiative_start_date", scope: "decidim.admin") %>
|
21
|
+
</div>
|
22
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
23
|
+
<%= t("models.initiatives_votes.fields.initiative_end_date", scope: "decidim.admin") %>
|
24
|
+
</div>
|
25
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
26
|
+
<%= t("models.initiatives_votes.fields.initiative_signatures_count", scope: "decidim.admin") %>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<div class="initiatives-votes-table-row" style="<%= style_initiatives_votes_table_row %>">
|
30
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
31
|
+
<%= initiative.reference %>
|
32
|
+
</div>
|
33
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
34
|
+
<%= translated_attribute(initiative.title) %>
|
35
|
+
</div>
|
36
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
37
|
+
<%= initiative.signature_start_date %>
|
38
|
+
</div>
|
39
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
40
|
+
<%= initiative.signature_end_date %>
|
41
|
+
</div>
|
42
|
+
<div class="initiatives-votes-table-cell w20" style="<%= style_initiatives_votes_table_cell %>">
|
43
|
+
<%= votes.count %>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
<br>
|
48
|
+
<br>
|
49
|
+
<div class="initiatives-votes-table" style="<%= style_initiatives_votes_table %>">
|
50
|
+
<div class="initiatives-votes-table-header" style="<%= style_initiatives_votes_table_header %>">
|
51
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
52
|
+
<%= t("models.initiatives_votes.fields.initiative_id", scope: "decidim.admin") %>
|
53
|
+
</div>
|
54
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
55
|
+
<%= t("models.initiatives_votes.fields.initiative_title", scope: "decidim.admin") %>
|
56
|
+
</div>
|
57
|
+
<% if collect_user_extra_fields %>
|
58
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
59
|
+
<%= t("models.initiatives_votes.fields.name_and_surname", scope: "decidim.admin") %>
|
60
|
+
</div>
|
61
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
62
|
+
<%= t("models.initiatives_votes.fields.document_number", scope: "decidim.admin") %>
|
63
|
+
</div>
|
64
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
65
|
+
<%= t("models.initiatives_votes.fields.date_of_birth", scope: "decidim.admin") %>
|
66
|
+
</div>
|
67
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
68
|
+
<%= t("models.initiatives_votes.fields.postal_code", scope: "decidim.admin") %>
|
69
|
+
</div>
|
70
|
+
<% end %>
|
71
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
72
|
+
<%= t("models.initiatives_votes.fields.time_and_date", scope: "decidim.admin") %>
|
73
|
+
</div>
|
74
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
75
|
+
<%= t("models.initiatives_votes.fields.timestamp", scope: "decidim.admin") %>
|
76
|
+
</div>
|
77
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
78
|
+
<%= t("models.initiatives_votes.fields.hash", scope: "decidim.admin") %>
|
79
|
+
</div>
|
80
|
+
<div class="initiatives-votes-table-cell w11" style="<%= style_initiatives_votes_table_cell_small %>">
|
81
|
+
<%= t("models.initiatives_votes.fields.scope", scope: "decidim.admin") %>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
<% votes.each do |vote| %>
|
85
|
+
<%= cell "decidim/initiatives_votes/vote", vote %>
|
86
|
+
<% end %>
|
87
|
+
</div>
|
@@ -1,71 +1,83 @@
|
|
1
|
+
<% add_decidim_page_title(t("info", scope: "decidim.admin.menu.initiatives_submenu")) %>
|
1
2
|
<% add_decidim_page_title(translated_attribute(current_participatory_space.title)) %>
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h2 class="item_show__header-title">
|
5
|
+
<%= t("info", scope: "decidim.admin.menu.initiatives_submenu") %>
|
6
|
+
</h2>
|
7
|
+
</div>
|
2
8
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
9
|
+
<div class="item__edit item__edit-1col">
|
10
|
+
<div class="item__edit-form">
|
11
|
+
<%= decidim_form_for @form, html: { class: "form-defaults form edit_initiative" } do |f| %>
|
12
|
+
<%= render partial: "form", object: f %>
|
13
|
+
<div class="item__edit-sticky">
|
14
|
+
<div class="item__edit-sticky-container">
|
15
|
+
<%= f.submit t(".update"), class: "button button__sm button__secondary" if allowed_to? :update, :initiative, initiative: current_initiative %>
|
7
16
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
17
|
+
<% if allowed_to? :send_to_technical_validation, :initiative, initiative: current_initiative %>
|
18
|
+
<%= link_to t(".send_to_technical_validation"),
|
19
|
+
send_to_technical_validation_initiative_path(current_initiative),
|
20
|
+
class: "button button__sm button__secondary",
|
21
|
+
data: { confirm: t(".confirm_send_to_technical_validation") } %>
|
22
|
+
<% elsif current_initiative.created? %>
|
23
|
+
<%= link_to t(".send_to_technical_validation"), "#", class: "button button__sm button__secondary" %>
|
24
|
+
<% end %>
|
16
25
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
26
|
+
<% if allowed_to? :publish, :initiative, initiative: current_initiative %>
|
27
|
+
<%= link_to t("actions.publish", scope: "decidim.admin"),
|
28
|
+
publish_initiative_path(current_initiative),
|
29
|
+
method: :post,
|
30
|
+
class: "button button__sm button__secondary",
|
31
|
+
data: { confirm: t(".confirm") } %>
|
32
|
+
<% end %>
|
24
33
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
34
|
+
<% if allowed_to? :unpublish, :initiative, initiative: current_initiative %>
|
35
|
+
<%= link_to t("actions.unpublish", scope: "decidim.admin"),
|
36
|
+
unpublish_initiative_path(current_initiative),
|
37
|
+
method: :delete,
|
38
|
+
class: "button button__sm button__secondary",
|
39
|
+
data: { confirm: t(".confirm") } %>
|
40
|
+
<% end %>
|
32
41
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
42
|
+
<% if allowed_to? :accept, :initiative, initiative: current_initiative %>
|
43
|
+
<%= link_to t(".accept"),
|
44
|
+
accept_initiative_path(current_initiative),
|
45
|
+
method: :post,
|
46
|
+
class: "button button__sm button__secondary",
|
47
|
+
data: { confirm: t(".confirm") } %>
|
48
|
+
<% end %>
|
40
49
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
50
|
+
<% if allowed_to? :reject, :initiative, initiative: current_initiative %>
|
51
|
+
<%= link_to t(".reject"),
|
52
|
+
reject_initiative_path(current_initiative),
|
53
|
+
method: :delete,
|
54
|
+
class: "button button__sm button__secondary",
|
55
|
+
data: { confirm: t(".confirm") } %>
|
56
|
+
<% end %>
|
48
57
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
58
|
+
<% if allowed_to? :discard, :initiative, initiative: current_initiative %>
|
59
|
+
<%= link_to t(".discard"),
|
60
|
+
discard_initiative_path(current_initiative),
|
61
|
+
method: :delete,
|
62
|
+
class: "button button__sm button__secondary",
|
63
|
+
data: { confirm: t(".confirm") } %>
|
64
|
+
<% end %>
|
56
65
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
66
|
+
<% if allowed_to? :export_votes, :initiative, initiative: current_initiative %>
|
67
|
+
<%= link_to t(".export_votes"),
|
68
|
+
export_votes_initiative_path(current_initiative, format: :csv),
|
69
|
+
class: "button button__sm button__secondary",
|
70
|
+
data: { confirm: t(".confirm") } %>
|
71
|
+
<% end %>
|
63
72
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
73
|
+
<% if allowed_to? :export_pdf_signatures, :initiative, initiative: current_initiative %>
|
74
|
+
<%= link_to t(".export_pdf_signatures"),
|
75
|
+
export_pdf_signatures_initiative_path(current_initiative, format: :pdf),
|
76
|
+
class: "button button__sm button__secondary",
|
77
|
+
data: { confirm: t(".confirm") } %>
|
78
|
+
<% end %>
|
79
|
+
</div>
|
80
|
+
</div>
|
69
81
|
<% end %>
|
70
|
-
|
71
|
-
|
82
|
+
</div>
|
83
|
+
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%# This page is for PDF signatures, but we have the HTML version so it is possible to
|
2
|
+
test without adding new dependencies just for this.
|
3
|
+
If there is a new API or method to test the PDF format then this HTML version can be deleted. %>
|
4
|
+
<%= render partial: "signatures", locals: {
|
5
|
+
collect_user_extra_fields: current_initiative.type.collect_user_extra_fields,
|
6
|
+
votes: @votes,
|
7
|
+
initiative: current_initiative
|
8
|
+
} %>
|