decidim-proposals 0.9.3 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -1
- data/app/assets/config/admin/decidim_proposals_manifest.js +1 -0
- data/app/assets/javascripts/decidim/proposals/admin/proposals.es6 +113 -0
- data/app/assets/javascripts/decidim/proposals/identity_selector_dialog.js.es6 +56 -0
- data/app/commands/decidim/proposals/admin/answer_proposal.rb +11 -5
- data/app/commands/decidim/proposals/admin/create_proposal.rb +25 -3
- data/app/commands/decidim/proposals/admin/create_proposal_note.rb +13 -8
- data/app/commands/decidim/proposals/admin/import_proposals.rb +83 -0
- data/app/commands/decidim/proposals/admin/update_proposal_category.rb +68 -0
- data/app/commands/decidim/proposals/create_proposal.rb +0 -12
- data/app/commands/decidim/proposals/endorse_proposal.rb +56 -0
- data/app/commands/decidim/proposals/publish_proposal.rb +60 -0
- data/app/commands/decidim/proposals/unendorse_proposal.rb +40 -0
- data/app/commands/decidim/proposals/update_proposal.rb +3 -3
- data/app/commands/decidim/proposals/vote_proposal.rb +1 -1
- data/app/commands/decidim/proposals/withdraw_proposal.rb +1 -1
- data/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +1 -1
- data/app/controllers/decidim/proposals/admin/proposal_notes_controller.rb +2 -2
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +50 -1
- data/app/controllers/decidim/proposals/admin/proposals_imports_controller.rb +35 -0
- data/app/controllers/decidim/proposals/proposal_endorsements_controller.rb +56 -0
- data/app/controllers/decidim/proposals/proposals_controller.rb +82 -9
- data/app/events/decidim/proposals/admin/update_proposal_category_event.rb +11 -0
- data/app/events/decidim/proposals/creation_enabled_event.rb +8 -0
- data/app/events/decidim/proposals/endorsing_enabled_event.rb +8 -0
- data/app/events/decidim/proposals/proposal_endorsed_event.rb +29 -0
- data/app/events/decidim/proposals/publish_proposal_event.rb +21 -0
- data/app/events/decidim/proposals/voting_enabled_event.rb +8 -0
- data/app/forms/decidim/proposals/admin/proposal_form.rb +9 -2
- data/app/forms/decidim/proposals/admin/proposals_import_form.rb +60 -0
- data/app/forms/decidim/proposals/proposal_form.rb +16 -5
- data/app/helpers/decidim/proposals/application_helper.rb +1 -0
- data/app/helpers/decidim/proposals/proposal_endorsements_helper.rb +117 -0
- data/app/helpers/decidim/proposals/proposal_votes_helper.rb +13 -6
- data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +105 -0
- data/app/jobs/decidim/proposals/settings_change_job.rb +48 -0
- data/app/models/decidim/proposals/abilities/current_user_ability.rb +30 -8
- data/app/models/decidim/proposals/proposal.rb +38 -38
- data/app/models/decidim/proposals/proposal_endorsement.rb +31 -0
- data/app/models/decidim/proposals/proposal_note.rb +7 -0
- data/app/presenters/decidim/proposals/admin_log/proposal_note_presenter.rb +39 -0
- data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +47 -0
- data/app/presenters/decidim/proposals/admin_log/value_types/proposal_state_presenter.rb +16 -0
- data/app/queries/decidim/proposals/similar_proposals.rb +53 -0
- data/app/types/decidim/proposals/proposal_type.rb +34 -0
- data/app/types/decidim/proposals/proposals_type.rb +34 -0
- data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_proposals.html.erb +8 -0
- data/app/views/decidim/participatory_processes/participatory_process_groups/_proposal.html.erb +27 -0
- data/app/views/decidim/participatory_spaces/_highlighted_proposals.html.erb +10 -0
- data/app/views/decidim/participatory_spaces/_proposal.html.erb +27 -0
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +15 -0
- data/app/views/decidim/proposals/admin/proposals/_js-callout.html.erb +6 -0
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +63 -0
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +12 -73
- data/app/views/decidim/proposals/admin/proposals/update_category.js.erb +25 -0
- data/app/views/decidim/proposals/admin/proposals_imports/new.html.erb +28 -0
- data/app/views/decidim/proposals/proposal_endorsements/_identity.html.erb +4 -0
- data/app/views/decidim/proposals/proposal_endorsements/identities.html.erb +12 -0
- data/app/views/decidim/proposals/proposal_endorsements/update_buttons_and_counters.js.erb +9 -0
- data/app/views/decidim/proposals/proposals/_endorsement_button.html.erb +11 -0
- data/app/views/decidim/proposals/proposals/_endorsement_identities_cabin.html.erb +13 -0
- data/app/views/decidim/proposals/proposals/_endorsement_xxs.html.erb +9 -0
- data/app/views/decidim/proposals/proposals/_endorsements_card_row.html.erb +22 -0
- data/app/views/decidim/proposals/proposals/_endorsements_count.html.erb +5 -0
- data/app/views/decidim/proposals/proposals/_endorsements_listing.html.erb +34 -0
- data/app/views/decidim/proposals/proposals/_proposal.html.erb +2 -2
- data/app/views/decidim/proposals/proposals/_proposal_preview.html.erb +36 -0
- data/app/views/decidim/proposals/proposals/_proposal_similar.html.erb +21 -0
- data/app/views/decidim/proposals/proposals/_vote_button.html.erb +8 -8
- data/app/views/decidim/proposals/proposals/_votes_count.html.erb +23 -6
- data/app/views/decidim/proposals/proposals/_voting_rules.html.erb +7 -3
- data/app/views/decidim/proposals/proposals/_wizard_aside.html.erb +16 -0
- data/app/views/decidim/proposals/proposals/_wizard_header.html.erb +31 -0
- data/app/views/decidim/proposals/proposals/compare.html.erb +19 -0
- data/app/views/decidim/proposals/proposals/edit_draft.html.erb +55 -0
- data/app/views/decidim/proposals/proposals/new.html.erb +7 -20
- data/app/views/decidim/proposals/proposals/preview.html.erb +18 -0
- data/app/views/decidim/proposals/proposals/show.html.erb +13 -4
- data/config/locales/ca.yml +156 -15
- data/config/locales/en.yml +156 -15
- data/config/locales/es.yml +157 -16
- data/config/locales/eu.yml +151 -7
- data/config/locales/fi.yml +151 -7
- data/config/locales/fr.yml +153 -9
- data/config/locales/gl.yml +151 -7
- data/config/locales/it.yml +151 -7
- data/config/locales/nl.yml +151 -7
- data/config/locales/pl.yml +148 -22
- data/config/locales/pt-BR.yml +151 -7
- data/config/locales/pt.yml +151 -7
- data/config/locales/ru.yml +0 -9
- data/config/locales/sv.yml +151 -7
- data/config/locales/uk.yml +87 -13
- data/db/migrate/20170307085300_migrate_proposal_reports_data_to_reports.rb +1 -1
- data/db/migrate/20171201115434_create_proposal_endorsements.rb +16 -0
- data/db/migrate/20171201122623_add_counter_cache_endorsements_to_proposals.rb +8 -0
- data/db/migrate/20171212102250_enable_pg_extensions.rb +7 -0
- data/db/migrate/20171220084719_add_published_at_to_proposals.rb +14 -0
- data/lib/decidim/proposals.rb +15 -0
- data/lib/decidim/proposals/admin_engine.rb +8 -0
- data/lib/decidim/proposals/commentable_proposal.rb +39 -0
- data/lib/decidim/proposals/engine.rb +69 -1
- data/lib/decidim/proposals/feature.rb +51 -6
- data/lib/decidim/proposals/test/factories.rb +78 -2
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +76 -20
- data/app/events/decidim/proposals/create_proposal_event.rb +0 -9
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= javascript_include_tag 'decidim/proposals/identity_selector_dialog' %>
|
2
|
+
<% if current_user && current_user.user_groups.verified.any? %>
|
3
|
+
<button id="select-identity-button" type="button" name="button" class="button small compact light button--sc <%= fully_endorsed ? 'success': 'secondary' %>">
|
4
|
+
<%= t('.endorse') %>
|
5
|
+
</button>
|
6
|
+
|
7
|
+
<div class="reveal collapse"
|
8
|
+
id="user-identities"
|
9
|
+
data-reveal data-refresh-url="<%= identities_proposal_proposal_endorsement_path(proposal) %>">
|
10
|
+
</div>
|
11
|
+
<% else %>
|
12
|
+
<%= endorsement_button(proposal, false) %>
|
13
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<% fully_endorsed= fully_endorsed?(@proposal, current_user) %>
|
2
|
+
<div class="row collapse buttons__row">
|
3
|
+
<% if endorsements_enabled? %>
|
4
|
+
<div class="column small-9 collapse">
|
5
|
+
<div class="button-group button-group--collapse button--nomargin small">
|
6
|
+
<%= render partial: "endorsements_count", locals: { proposal: @proposal, fully_endorsed: fully_endorsed } %>
|
7
|
+
<% if current_settings.endorsements_blocked? %>
|
8
|
+
<%= content_tag :span, t('.endorse'), class: "card__button button #{endorsement_button_classes(false)} disabled", disabled: true, title: t('.endorse') %>
|
9
|
+
<% elsif current_user %>
|
10
|
+
<%= render partial: "endorsement_identities_cabin", locals: { proposal: @proposal, fully_endorsed: fully_endorsed } %>
|
11
|
+
<% else %>
|
12
|
+
<%= action_authorized_button_to :endorse, t('.endorse'), '', class: "card__button button #{endorsement_button_classes(false)} secondary" %>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
<div class="column collapse <%= endorsements_enabled? ? 'small-3' : '' %>">
|
18
|
+
<%= link_to '#comments', class: "button small compact hollow secondary button--nomargin expanded" do %>
|
19
|
+
<%= icon "comment-square", class: "icon--small", aria_label: "Comentarios", role: "img" %> <%= @proposal.comments.count %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
</div>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%= link_to '#list-of-endorsements', id: "proposal-#{proposal.id}-endorsements-count", class: "button small compact light button--sc button--shadow #{fully_endorsed ? 'success' : 'secondary'}" do %>
|
2
|
+
<%= icon "bullhorn", class: "icon--small", aria_label: "Endorsements", role: "img" %>
|
3
|
+
<%= proposal.proposal_endorsements_count %>
|
4
|
+
</button>
|
5
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%
|
2
|
+
count = proposal.endorsements.count
|
3
|
+
if count > 0
|
4
|
+
%>
|
5
|
+
<div class="row">
|
6
|
+
<div class="columns large-12">
|
7
|
+
<h4 class="section-heading"><%= t('.title') %></h4>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="columns large-12">
|
11
|
+
<%= proposal.endorsements.for_listing.limit(5).collect do |endorsement| %>
|
12
|
+
<% render partial: 'endorsement_xxs', locals: {endorsement: endorsement} %>
|
13
|
+
<% end.join(', ').html_safe %>
|
14
|
+
<% if count > 5 %>...<% end -%>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% if count > 5 %>
|
18
|
+
<div class="row">
|
19
|
+
<div id="see-all-endorsements" class="columns large-12" data-toggler=".hide">
|
20
|
+
<a data-toggle="remaining-endorsements see-all-endorsements"><%= t('.see_all') %></a>
|
21
|
+
</div>
|
22
|
+
<div id="remaining-endorsements" class="hide" data-toggler=".hide">
|
23
|
+
<div class="columns large-12">
|
24
|
+
<%= proposal.endorsements.for_listing.offset(5).collect do |endorsement| %>
|
25
|
+
<% render partial: 'endorsement_xxs', locals: {endorsement: endorsement} %>
|
26
|
+
<% end.join(', ').html_safe %>
|
27
|
+
</div>
|
28
|
+
<div class="columns large-12">
|
29
|
+
<a data-toggle="remaining-endorsements see-all-endorsements"><%= t('.see_less') %></a>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
<% end -%>
|
34
|
+
<% end %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<div class="tech-info tech-info--text-left">
|
12
12
|
<%= t(".creation_date", date: l(proposal.created_at, format: :decidim_short)) %>
|
13
13
|
</div>
|
14
|
-
<%=
|
14
|
+
<%= resource_reference(proposal, class: "tech-info--text-left") %>
|
15
15
|
</div>
|
16
16
|
<%= render partial: "proposal_badge", locals: { proposal: proposal } %>
|
17
17
|
<p><%= truncate(proposal.body, length: 100) %></p>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</div>
|
20
20
|
<div class="card__footer">
|
21
21
|
<div class="card__support">
|
22
|
-
<% if current_settings.votes_enabled? %>
|
22
|
+
<% if current_settings.votes_enabled? && !proposal.draft? %>
|
23
23
|
<%= render partial: "votes_count", locals: { proposal: proposal, from_proposals_list: true } %>
|
24
24
|
<%= render partial: "vote_button", locals: { proposal: proposal, from_proposals_list: true } %>
|
25
25
|
<% else %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<article class="card card--proposal">
|
2
|
+
<div class="card__content">
|
3
|
+
<div class="card__header">
|
4
|
+
<%= link_to proposal, class: "card__link" do %>
|
5
|
+
<h5 class="card__title"><%= proposal.title %></h5>
|
6
|
+
<% end %>
|
7
|
+
<div class="card__author author-data author-data--small">
|
8
|
+
<%= render partial: "decidim/shared/author_reference", locals: { author: present(proposal).author } %>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<p><%= truncate(proposal.body, length: 100) %></p>
|
12
|
+
<%= render partial: "decidim/shared/tags", locals: { resource: proposal, tags_class_extra: "tags--proposal" } %>
|
13
|
+
</div>
|
14
|
+
<div class="card__status">
|
15
|
+
<ul class="card-data">
|
16
|
+
<li class="card-data__item">
|
17
|
+
<%= render partial: "proposal_badge", locals: { proposal: proposal } %>
|
18
|
+
</li>
|
19
|
+
<li class="card-data__item">
|
20
|
+
<%= l(proposal.created_at, format: :decidim_short) %>
|
21
|
+
</li>
|
22
|
+
<li class="card-data__item">
|
23
|
+
<a href="#comments">
|
24
|
+
<%= icon "bullhorn", class: "icon--small", role: "img" %>
|
25
|
+
0
|
26
|
+
</a>
|
27
|
+
</li>
|
28
|
+
<li class="card-data__item">
|
29
|
+
<a href="#comments">
|
30
|
+
<%= icon "comment-square", class: "icon--small", role: "img" %>
|
31
|
+
0
|
32
|
+
</a>
|
33
|
+
</li>
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
</article>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div class="column">
|
2
|
+
<article class="card card--proposal">
|
3
|
+
<div class="card__content">
|
4
|
+
<div class="card__header">
|
5
|
+
<%= link_to proposal, target: "_blank" do %>
|
6
|
+
<h5 class="card__title"><%= proposal.title %></h5>
|
7
|
+
<% end %>
|
8
|
+
<div class="card__author author-data author-data--small">
|
9
|
+
<%= render partial: "decidim/shared/author_reference", locals: { author: present(proposal).author } %>
|
10
|
+
</div>
|
11
|
+
<div class="tech-info tech-info--text-left">
|
12
|
+
<%= t("decidim.proposals.proposals.proposal.creation_date", date: l(proposal.created_at, format: :decidim_short)) %>
|
13
|
+
</div>
|
14
|
+
<%= resource_reference(proposal, class: "tech-info--text-left") %>
|
15
|
+
</div>
|
16
|
+
<%= render partial: "decidim/proposals/proposals/proposal_badge", locals: { proposal: proposal } %>
|
17
|
+
<p><%= truncate(proposal.body, length: 100) %></p>
|
18
|
+
<%= render partial: "decidim/shared/tags", locals: { resource: proposal, tags_class_extra: "tags--proposal" } %>
|
19
|
+
</div>
|
20
|
+
</article>
|
21
|
+
</div>
|
@@ -2,23 +2,23 @@
|
|
2
2
|
<div id="proposal-<%= proposal.id %>-vote-button">
|
3
3
|
<% if !current_user %>
|
4
4
|
<% if current_settings.votes_blocked? %>
|
5
|
-
<%= action_authorized_button_to :vote, t('.votes_blocked'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), class: "
|
5
|
+
<%= action_authorized_button_to :vote, t('.votes_blocked'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), class: "button #{vote_button_classes(from_proposals_list)} disabled", disabled: true %>
|
6
6
|
<% else %>
|
7
|
-
<%= action_authorized_button_to :vote, t('.vote'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), class: "
|
7
|
+
<%= action_authorized_button_to :vote, t('.vote'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), class: "button #{vote_button_classes(from_proposals_list)}", data: { disable: true, "redirect-url": proposal_path(proposal) } %>
|
8
8
|
<% end %>
|
9
9
|
<% else %>
|
10
10
|
<% if @voted_proposals ? @voted_proposals.include?(proposal.id) : proposal.voted_by?(current_user) %>
|
11
|
-
<%= action_authorized_button_to :vote, t('.already_voted'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), method: :delete, remote: true, data: { disable: true, original: t('.already_voted'), replace: t('.already_voted_hover'), "redirect-url": proposal_path(proposal) }, class: "
|
11
|
+
<%= action_authorized_button_to :vote, t('.already_voted'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), method: :delete, remote: true, data: { disable: true, original: t('.already_voted'), replace: t('.already_voted_hover'), "redirect-url": proposal_path(proposal) }, class: "button #{vote_button_classes(from_proposals_list)} success", id: "vote_button" %>
|
12
12
|
<% else %>
|
13
|
-
<% if proposal.maximum_votes_reached? %>
|
14
|
-
<%= content_tag :span, t('.maximum_votes_reached'), class: "
|
13
|
+
<% if proposal.maximum_votes_reached? && !proposal.can_accumulate_supports_beyond_threshold %>
|
14
|
+
<%= content_tag :span, t('.maximum_votes_reached'), class: "button #{vote_button_classes(from_proposals_list)} disabled", disabled: true %>
|
15
15
|
<% else %>
|
16
16
|
<% if vote_limit_enabled? && remaining_votes_count_for(current_user) == 0 %>
|
17
|
-
<%= content_tag :span, t('.no_votes_remaining'), class: "
|
17
|
+
<%= content_tag :span, t('.no_votes_remaining'), class: "button #{vote_button_classes(from_proposals_list)}", disabled: true %>
|
18
18
|
<% elsif current_settings.votes_blocked? %>
|
19
|
-
<%= content_tag :span, t('.votes_blocked'), class: "
|
19
|
+
<%= content_tag :span, t('.votes_blocked'), class: "button #{vote_button_classes(from_proposals_list)} disabled", disabled: true %>
|
20
20
|
<% else %>
|
21
|
-
<%= action_authorized_button_to :vote, t('.vote'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), remote: true, data: { disable: true, "redirect-url": proposal_path(proposal) }, class: "
|
21
|
+
<%= action_authorized_button_to :vote, t('.vote'), proposal_proposal_vote_path(proposal_id: proposal, from_proposals_list: from_proposals_list), remote: true, data: { disable: true, "redirect-url": proposal_path(proposal) }, class: "button #{vote_button_classes(from_proposals_list)}" %>
|
22
22
|
<% end %>
|
23
23
|
<% end %>
|
24
24
|
<% end %>
|
@@ -1,10 +1,27 @@
|
|
1
1
|
<div id="proposal-<%= proposal.id %>-votes-count" class="card__support__data">
|
2
2
|
<% if !current_settings.votes_hidden? %>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
<% progress ||= proposal.proposal_votes_count || 0 %>
|
4
|
+
<% total ||= proposal.maximum_votes || 0 %>
|
5
|
+
<% percent = (progress.to_f/total) * 100 %>
|
6
|
+
<% vertical ||= from_proposals_list %>
|
7
|
+
<div class="progress__bar<%= (!vertical) ? ' progress__bar--vertical' : '' %>">
|
8
|
+
<div class="progress__bar__title">
|
9
|
+
<span class="progress__bar__number"><%= progress %></span><%= "/#{total}" if total != 0 %>
|
10
|
+
<span class="progress__bar__text"><%= t('.count', count: proposal.proposal_votes_count) %></span>
|
11
|
+
</div>
|
12
|
+
<% if total != 0 %>
|
13
|
+
<div class="progress progress__bar__bar" role="progressbar" tabindex="0" aria-valuenow="<%= percent %>" aria-valuemin="0" aria-valuetext="<%= percent %> percent" aria-valuemax="100">
|
14
|
+
<div class="progress-meter progress__bar__bar--complete" style="width: <%= percent %>%"></div>
|
15
|
+
<div class="progress__bar__bar--incomplete" style="width:calc(100% - <%= percent %>%);"></div>
|
16
|
+
</div>
|
17
|
+
<div class="progress__bar__subtitle">
|
18
|
+
<% if progress >= total %>
|
19
|
+
<%= t('.most_popular_proposal') %>
|
20
|
+
<% else %>
|
21
|
+
<%= t('.need_more_votes') %>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
9
26
|
<% end %>
|
10
27
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if votes_enabled? && (vote_limit_enabled? ||
|
1
|
+
<% if votes_enabled? && (vote_limit_enabled? || threshold_per_proposal_enabled? || proposal_limit_enabled? || can_accumulate_supports_beyond_threshold?) %>
|
2
2
|
<div class="row column">
|
3
3
|
<div class="callout secondary voting-rules">
|
4
4
|
<div class="row">
|
@@ -13,8 +13,12 @@
|
|
13
13
|
<li><%= t('.proposal_limit.description', limit: proposal_limit) %></li>
|
14
14
|
<% end %>
|
15
15
|
|
16
|
-
<% if
|
17
|
-
<li><%= t('.
|
16
|
+
<% if threshold_per_proposal_enabled? %>
|
17
|
+
<li><%= t('.threshold_per_proposal.description', limit: threshold_per_proposal) %></li>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if can_accumulate_supports_beyond_threshold? %>
|
21
|
+
<li><%= t('.can_accumulate_supports_beyond_threshold.description') %></li>
|
18
22
|
<% end %>
|
19
23
|
</ul>
|
20
24
|
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="columns large-3">
|
2
|
+
<div class="m-bottom">
|
3
|
+
<%= link_to :back do %>
|
4
|
+
<%= icon "chevron-left", class: "icon--small" %>
|
5
|
+
<%= t(".back") %>
|
6
|
+
<% end %>
|
7
|
+
</div>
|
8
|
+
<div class="section">
|
9
|
+
<p>
|
10
|
+
<%= t(".info").html_safe %>
|
11
|
+
</p>
|
12
|
+
</div>
|
13
|
+
<div class="show-for-large">
|
14
|
+
<%= proposal_wizard_stepper(@step) %>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% if translated_attribute(feature_settings.new_proposal_help_text).present? && @step != :step_3 %>
|
2
|
+
<%= render partial: "decidim/shared/announcement", locals: { announcement: feature_settings.new_proposal_help_text } %>
|
3
|
+
<% elsif @step == :step_3 %>
|
4
|
+
<%
|
5
|
+
locals = {
|
6
|
+
callout_class: "warning",
|
7
|
+
announcement: t("decidim.proposals.proposals.preview.proposal_edit_before_minutes", count: feature_settings.proposal_edit_before_minutes)
|
8
|
+
}
|
9
|
+
%>
|
10
|
+
<%= render partial: "decidim/shared/announcement", locals: locals %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% if proposal_wizard_step_help_text?(@step) %>
|
14
|
+
<div class="proposal_wizard_help_text">
|
15
|
+
<% callout_step_help_text_class ||= nil %>
|
16
|
+
<%= render partial: "decidim/shared/announcement", locals: { announcement: feature_settings.try("proposal_wizard_#{@step}_help_text"), callout_class: callout_step_help_text_class } %>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<h2 class="section-heading">
|
21
|
+
<%= proposal_wizard_step_title action_name %>
|
22
|
+
<%= "(#{@similar_proposals.count})" if @similar_proposals.present? %>
|
23
|
+
</h2>
|
24
|
+
|
25
|
+
<div class="hide-for-large m-bottom">
|
26
|
+
<%= proposal_wizard_current_step_of(@step) %>
|
27
|
+
|
28
|
+
<ol id="steps" class="wizard__steps steps-toggle is-hidden" data-toggler=".is-hidden">
|
29
|
+
<%= proposal_wizard_stepper(@step) %>
|
30
|
+
</ol>
|
31
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<%= render partial: "wizard_aside" %>
|
3
|
+
|
4
|
+
<div class="columns large-6">
|
5
|
+
<%= render partial: "wizard_header", locals: {callout_step_help_text_class: "warning"} %>
|
6
|
+
|
7
|
+
<% if @similar_proposals.presence %>
|
8
|
+
<div class="row small-up-1 card-grid">
|
9
|
+
<% @similar_proposals.each do |proposal| %>
|
10
|
+
<%= render partial: "proposal_similar", locals: {proposal: proposal} %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
<div class="row column text-center">
|
15
|
+
<%= link_to t(".mine_is_different"), preview_proposal_path(@proposal), class: "button small" %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div class="columns large-3"></div>
|
19
|
+
</div>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<%= render partial: "wizard_aside" %>
|
3
|
+
|
4
|
+
<div class="columns large-6">
|
5
|
+
<%= render partial: "wizard_header" %>
|
6
|
+
|
7
|
+
<div class="card">
|
8
|
+
<div class="card__content">
|
9
|
+
<%= decidim_form_for(@form, url: update_draft_proposal_path(@proposal), method: :patch) do |form| %>
|
10
|
+
<div class="field">
|
11
|
+
<%= form.text_field :title %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="field">
|
15
|
+
<%= form.text_area :body, rows: 10 %>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<% if feature_settings.geocoding_enabled? %>
|
19
|
+
<div class="field">
|
20
|
+
<%= form.check_box :has_address %>
|
21
|
+
</div>
|
22
|
+
<div class="field" id="address_input">
|
23
|
+
<%= form.text_field :address %>
|
24
|
+
</div>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% if @form.categories&.any? %>
|
28
|
+
<div class="field">
|
29
|
+
<%= form.categories_select :category_id, @form.categories, prompt: t("decidim.proposals.proposals.edit.select_a_category") %>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
32
|
+
|
33
|
+
<% if current_participatory_space.has_subscopes? %>
|
34
|
+
<div class="field">
|
35
|
+
<%= scopes_picker_field form, :scope_id %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
|
39
|
+
<% if current_user.user_groups.verified.any? %>
|
40
|
+
<div class="field">
|
41
|
+
<%= user_group_select_field form, :user_group_id %>
|
42
|
+
</div>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
<div class="actions">
|
46
|
+
<%= form.submit t(".send"), class: "button expanded", data: { disable: true } %>
|
47
|
+
</div>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<div class="columns large-3"></div>
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<%= javascript_include_tag "decidim/proposals/add_proposal" %>
|
@@ -1,24 +1,10 @@
|
|
1
|
-
<div class="row columns">
|
2
|
-
<%= link_to :back, class: "muted-link" do %>
|
3
|
-
<%= icon "chevron-left", class: "icon--small" %>
|
4
|
-
<%= t(".back") %>
|
5
|
-
<% end %>
|
6
|
-
<h2 class="section-heading"><%= t(".title") %></h2>
|
7
|
-
</div>
|
8
|
-
|
9
1
|
<div class="row">
|
10
|
-
|
11
|
-
<div class="card">
|
12
|
-
<% if translated_attribute(feature_settings.new_proposal_help_text).present? %>
|
13
|
-
<%= render partial: "decidim/shared/announcement", locals: { announcement: feature_settings.new_proposal_help_text } %>
|
14
|
-
<% end %>
|
2
|
+
<%= render partial: "wizard_aside" %>
|
15
3
|
|
16
|
-
|
17
|
-
|
18
|
-
<%= t(".proposal_edit_before_minutes", count: feature_settings.proposal_edit_before_minutes) %>
|
19
|
-
</div>
|
20
|
-
</div>
|
4
|
+
<div class="columns large-6">
|
5
|
+
<%= render partial: "wizard_header" %>
|
21
6
|
|
7
|
+
<div class="card">
|
22
8
|
<div class="card__content">
|
23
9
|
<%= decidim_form_for(@form) do |form| %>
|
24
10
|
<div class="field">
|
@@ -52,7 +38,7 @@
|
|
52
38
|
|
53
39
|
<% if current_user.user_groups.verified.any? %>
|
54
40
|
<div class="field">
|
55
|
-
<%= form
|
41
|
+
<%= user_group_select_field form, :user_group_id %>
|
56
42
|
</div>
|
57
43
|
<% end %>
|
58
44
|
|
@@ -72,12 +58,13 @@
|
|
72
58
|
<% end %>
|
73
59
|
|
74
60
|
<div class="actions">
|
75
|
-
<%= form.submit t(".send"), class: "button expanded", data: { disable: true } %>
|
61
|
+
<%= form.submit t(".send"), class: "button expanded mt-s mb-none", data: { disable: true } %>
|
76
62
|
</div>
|
77
63
|
<% end %>
|
78
64
|
</div>
|
79
65
|
</div>
|
80
66
|
</div>
|
67
|
+
<div class="columns large-3"></div>
|
81
68
|
</div>
|
82
69
|
|
83
70
|
<%= javascript_include_tag "decidim/proposals/add_proposal" %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<%= render partial: "wizard_aside" %>
|
3
|
+
|
4
|
+
<div class="columns large-6">
|
5
|
+
<%= render partial: "wizard_header", locals: {callout_help_text_class: "warning"} %>
|
6
|
+
<div class="card">
|
7
|
+
<div class="p-l">
|
8
|
+
<%= render partial: "proposal_preview", locals: {proposal: @proposal}%>
|
9
|
+
<div class="row column flex-center">
|
10
|
+
<%= link_to t(".modify"), edit_draft_proposal_path(@proposal) %>
|
11
|
+
|
12
|
+
<%= button_to t(".publish"), publish_proposal_path(@proposal), method: :post, class: "button button--nomargin small" %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<div class="columns large-3"></div>
|
18
|
+
</div>
|