decidim-proposals 0.10.1 → 0.11.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/javascripts/decidim/proposals/add_proposal.js.es6 +3 -3
- data/app/assets/javascripts/decidim/proposals/admin/proposals.es6 +6 -7
- data/app/assets/javascripts/decidim/proposals/identity_selector_dialog.js.es6 +17 -17
- data/app/assets/javascripts/decidim/proposals/utils.js.es6 +2 -2
- data/app/commands/decidim/proposals/admin/create_proposal.rb +2 -2
- data/app/commands/decidim/proposals/admin/import_proposals.rb +16 -8
- data/app/commands/decidim/proposals/create_proposal.rb +6 -6
- data/app/commands/decidim/proposals/destroy_proposal.rb +33 -0
- data/app/commands/decidim/proposals/update_proposal.rb +4 -4
- data/app/controllers/decidim/proposals/admin/application_controller.rb +2 -2
- data/app/controllers/decidim/proposals/admin/proposal_answers_controller.rb +1 -1
- data/app/controllers/decidim/proposals/admin/proposal_notes_controller.rb +1 -1
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +2 -2
- data/app/controllers/decidim/proposals/admin/proposals_imports_controller.rb +4 -4
- data/app/controllers/decidim/proposals/application_controller.rb +5 -5
- data/app/controllers/decidim/proposals/proposal_endorsements_controller.rb +1 -1
- data/app/controllers/decidim/proposals/proposal_votes_controller.rb +1 -1
- data/app/controllers/decidim/proposals/proposal_widgets_controller.rb +1 -1
- data/app/controllers/decidim/proposals/proposals_controller.rb +52 -24
- data/app/events/decidim/proposals/proposal_mentioned_event.rb +19 -0
- data/app/forms/decidim/proposals/admin/proposal_form.rb +3 -3
- data/app/forms/decidim/proposals/admin/proposals_import_form.rb +9 -9
- data/app/forms/decidim/proposals/proposal_form.rb +5 -4
- data/app/helpers/decidim/proposals/application_helper.rb +38 -3
- data/app/helpers/decidim/proposals/proposal_endorsements_helper.rb +7 -3
- data/app/helpers/decidim/proposals/proposal_votes_helper.rb +9 -9
- data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +2 -1
- data/app/jobs/decidim/proposals/notify_proposals_mentioned_job.rb +28 -0
- data/app/jobs/decidim/proposals/settings_change_job.rb +4 -4
- data/app/models/decidim/proposals/abilities/admin_ability.rb +4 -4
- data/app/models/decidim/proposals/abilities/current_user_ability.rb +12 -12
- data/app/models/decidim/proposals/abilities/participatory_process_admin_ability.rb +8 -8
- data/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb +1 -1
- data/app/models/decidim/proposals/proposal.rb +7 -7
- data/app/models/decidim/proposals/proposal_endorsement.rb +6 -2
- data/app/presenters/decidim/proposals/proposal_presenter.rb +12 -0
- data/app/queries/decidim/proposals/filtered_proposals.rb +9 -9
- data/app/queries/decidim/proposals/similar_proposals.rb +9 -9
- data/app/services/decidim/proposals/proposal_search.rb +1 -1
- data/app/types/decidim/proposals/proposal_type.rb +17 -2
- data/app/types/decidim/proposals/proposals_type.rb +6 -6
- data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_proposals.html.erb +1 -1
- data/app/views/decidim/participatory_processes/participatory_process_groups/_proposal.html.erb +1 -1
- data/app/views/decidim/participatory_spaces/_highlighted_proposals.html.erb +2 -2
- data/app/views/decidim/participatory_spaces/_proposal.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposal_answers/edit.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposal_notes/_form.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposal_notes/_proposal_notes.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposal_notes/index.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/new.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/update_category.js.erb +3 -3
- data/app/views/decidim/proposals/admin/proposals_imports/new.html.erb +3 -3
- data/app/views/decidim/proposals/admin/shared/_info_proposal.html.erb +1 -1
- data/app/views/decidim/proposals/proposal_endorsements/_identity.html.erb +2 -2
- data/app/views/decidim/proposals/proposal_endorsements/identities.html.erb +2 -2
- data/app/views/decidim/proposals/proposal_endorsements/update_buttons_and_counters.js.erb +19 -8
- data/app/views/decidim/proposals/proposals/_endorsement_button.html.erb +2 -2
- data/app/views/decidim/proposals/proposals/_endorsement_identities_cabin.html.erb +3 -3
- data/app/views/decidim/proposals/proposals/_endorsements_card_row.html.erb +4 -4
- data/app/views/decidim/proposals/proposals/_endorsements_count.html.erb +2 -2
- data/app/views/decidim/proposals/proposals/_filters.html.erb +10 -10
- data/app/views/decidim/proposals/proposals/_filters_small_view.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_identities_listing.html.erb +30 -0
- data/app/views/decidim/proposals/proposals/{_endorsement_xxs.html.erb → _identity_xxs.html.erb} +1 -2
- data/app/views/decidim/proposals/proposals/_proposal.html.erb +2 -2
- data/app/views/decidim/proposals/proposals/_proposal_badge.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/_tags.html.erb +25 -0
- data/app/views/decidim/proposals/proposals/_vote_button.html.erb +7 -7
- data/app/views/decidim/proposals/proposals/_votes_count.html.erb +6 -5
- data/app/views/decidim/proposals/proposals/_voting_rules.html.erb +7 -7
- data/app/views/decidim/proposals/proposals/_wizard_header.html.erb +5 -5
- data/app/views/decidim/proposals/proposals/compare.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/complete.html.erb +70 -0
- data/app/views/decidim/proposals/proposals/edit.html.erb +3 -3
- data/app/views/decidim/proposals/proposals/edit_draft.html.erb +5 -3
- data/app/views/decidim/proposals/proposals/index.html.erb +5 -5
- data/app/views/decidim/proposals/proposals/new.html.erb +1 -43
- data/app/views/decidim/proposals/proposals/preview.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/show.html.erb +16 -23
- data/config/locales/ca.yml +69 -55
- data/config/locales/en.yml +64 -50
- data/config/locales/es.yml +73 -59
- data/config/locales/eu.yml +64 -50
- data/config/locales/fi.yml +64 -50
- data/config/locales/fr.yml +75 -61
- data/config/locales/gl.yml +64 -50
- data/config/locales/it.yml +64 -50
- data/config/locales/nl.yml +153 -139
- data/config/locales/pl.yml +64 -50
- data/config/locales/pt-BR.yml +64 -50
- data/config/locales/pt.yml +64 -50
- data/config/locales/ru.yml +0 -9
- data/config/locales/sv.yml +64 -50
- data/config/locales/uk.yml +2 -16
- data/db/migrate/20171212102250_enable_pg_extensions.rb +12 -1
- data/db/migrate/20180305133811_rename_features_to_components_at_proposals.rb +11 -0
- data/db/migrate/20180413135249_fix_nil_threshold_per_proposal.rb +18 -0
- data/lib/decidim/content_parsers/proposal_parser.rb +95 -0
- data/lib/decidim/content_renderers/proposal_renderer.rb +33 -0
- data/lib/decidim/proposals.rb +9 -1
- data/lib/decidim/proposals/commentable_proposal.rb +3 -3
- data/lib/decidim/proposals/{feature.rb → component.rb} +39 -38
- data/lib/decidim/proposals/engine.rb +21 -6
- data/lib/decidim/proposals/proposal_serializer.rb +3 -3
- data/lib/decidim/proposals/test/factories.rb +5 -8
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +32 -23
- data/app/views/decidim/proposals/proposals/_endorsements_listing.html.erb +0 -34
@@ -2,7 +2,7 @@
|
|
2
2
|
<section class="section row collapse highlighted_proposals">
|
3
3
|
<h2 class="section-heading"><%= t(".proposals") %></h2>
|
4
4
|
<div class="row small-up-1 medium-up-2 large-up-3 card-grid">
|
5
|
-
<%= render partial:
|
5
|
+
<%= render partial: "decidim/participatory_processes/participatory_process_groups/proposal", collection: proposals %>
|
6
6
|
</div>
|
7
7
|
</section>
|
8
8
|
<% end %>
|
data/app/views/decidim/participatory_processes/participatory_process_groups/_proposal.html.erb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<article class="card card--proposal">
|
3
3
|
<div class="card__content">
|
4
4
|
<div class="card__header">
|
5
|
-
<%= link_to resource_locator(proposal).path do%>
|
5
|
+
<%= link_to resource_locator(proposal).path do %>
|
6
6
|
<h5 class="card__title"><%= proposal.title %></h5>
|
7
7
|
<% end %>
|
8
8
|
<div class="card__author author-data author-data--small">
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<% if proposals.any? %>
|
2
2
|
<section class="section row collapse highlighted_proposals">
|
3
3
|
<h4 class="section-heading">
|
4
|
-
<%= t(".proposals") %> <a href="<%=
|
4
|
+
<%= t(".proposals") %> <a href="<%= main_component_path(proposals.first.component) %>" class="text-small"><%= t(".see_all_proposals") %></a>
|
5
5
|
</h4>
|
6
6
|
<div class="row small-up-1 medium-up-2 card-grid">
|
7
|
-
<%= render partial:
|
7
|
+
<%= render partial: "decidim/participatory_spaces/proposal", collection: proposals %>
|
8
8
|
</div>
|
9
9
|
</section>
|
10
10
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<article class="card card--proposal">
|
3
3
|
<div class="card__content">
|
4
4
|
<div class="card__header">
|
5
|
-
<%= link_to resource_locator(proposal).path do%>
|
5
|
+
<%= link_to resource_locator(proposal).path do %>
|
6
6
|
<h5 class="card__title"><%= proposal.title %></h5>
|
7
7
|
<% end %>
|
8
8
|
<div class="card__author author-data author-data--small">
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%= render
|
2
|
-
<%=
|
1
|
+
<%= render "decidim/proposals/admin/shared/info_proposal" %>
|
2
|
+
<%= decidim_form_for(@form, url: proposal_proposal_answer_path(proposal, @form), html: { class: "form edit_proposal_answer" }) do |f| %>
|
3
3
|
<div class="card">
|
4
4
|
<div class="card-divider">
|
5
5
|
<h2 class="card-title"><%= t ".title", title: proposal.title %></h2>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<div class="card-section">
|
9
9
|
<div class="row column">
|
10
|
-
<%= f.collection_radio_buttons :state, [["accepted", t(
|
10
|
+
<%= f.collection_radio_buttons :state, [["accepted", t(".accepted")], ["rejected", t(".rejected")], ["evaluating", t(".evaluating")]], :first, :last, prompt: true %>
|
11
11
|
</div>
|
12
12
|
|
13
13
|
<div class="row column">
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%=
|
1
|
+
<%= decidim_form_for(@form, url: proposal_proposal_notes_path(proposal, @form), html: { class: "form new_proposal_note" }) do |f| %>
|
2
2
|
<div class="row column">
|
3
|
-
<%= f.text_area :body, rows: 10, label: t(
|
3
|
+
<%= f.text_area :body, rows: 10, label: t(".note") %>
|
4
4
|
</div>
|
5
5
|
<div class="button--double form-general-submit">
|
6
6
|
<%= f.submit t(".submit") %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<section class="comments">
|
2
2
|
<div class="card">
|
3
3
|
<div class="card-divider">
|
4
|
-
<h2 class="card-title"><%= t("title", scope:
|
4
|
+
<h2 class="card-title"><%= t("title", scope: "decidim.proposals.admin.proposal_notes") %></h2>
|
5
5
|
</div>
|
6
6
|
|
7
7
|
<div class="card-section">
|
@@ -33,10 +33,10 @@
|
|
33
33
|
<div class="add-comment">
|
34
34
|
<div class="card">
|
35
35
|
<div class="card-divider">
|
36
|
-
<h2 class="card-title"><%= t("leave_your_note", scope:
|
36
|
+
<h2 class="card-title"><%= t("leave_your_note", scope: "decidim.proposals.admin.proposal_notes") %></h2>
|
37
37
|
</div>
|
38
38
|
<div class="card-section">
|
39
|
-
<%= render
|
39
|
+
<%= render "form" %>
|
40
40
|
</div>
|
41
41
|
</div>
|
42
42
|
</div>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
<%= bulk_actions_dropdown %>
|
3
3
|
|
4
4
|
<div id="js-other-actions-wrapper">
|
5
|
-
<%= link_to t("actions.import", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposals_import_path, class:
|
5
|
+
<%= link_to t("actions.import", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposals_import_path, class: "button tiny button--simple" if can? :manage, current_component %>
|
6
6
|
|
7
7
|
<% if can? :create, Decidim::Proposals::Proposal %>
|
8
|
-
<%= link_to t("actions.new", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposal_path, class:
|
8
|
+
<%= link_to t("actions.new", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")), new_proposal_path, class: "button tiny button--simple" if can? :manage, current_component %>
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<%= export_dropdown %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%= form.text_area :body, rows: 10 %>
|
13
13
|
</div>
|
14
14
|
|
15
|
-
<% if
|
15
|
+
<% if component_settings.geocoding_enabled? %>
|
16
16
|
<div class="row column">
|
17
17
|
<%= form.text_field :address %>
|
18
18
|
</div>
|
@@ -30,10 +30,10 @@
|
|
30
30
|
</div>
|
31
31
|
<% end %>
|
32
32
|
|
33
|
-
<% if
|
33
|
+
<% if component_settings.attachments_allowed? %>
|
34
34
|
<div class="row column">
|
35
35
|
<fieldset>
|
36
|
-
<legend><%= t(
|
36
|
+
<legend><%= t(".attachment_legend") %></legend>
|
37
37
|
<%= form.fields_for :attachment, @form.attachment do |form| %>
|
38
38
|
<div class="row column">
|
39
39
|
<%= form.text_field :title %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
</td>
|
35
35
|
<% end %>
|
36
36
|
|
37
|
-
<% if
|
37
|
+
<% if current_component.settings.comments_enabled? and !current_settings.comments_blocked? %>
|
38
38
|
<td>
|
39
39
|
<%= proposal.comments.count %>
|
40
40
|
</td>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
</th>
|
43
43
|
<% end %>
|
44
44
|
|
45
|
-
<% if
|
45
|
+
<% if current_component.settings.comments_enabled? and !current_settings.comments_blocked? %>
|
46
46
|
<th>
|
47
47
|
<%= sort_link(query, :commentable_comments_count, t("models.proposal.fields.comments", scope: "decidim.proposals") ) %>
|
48
48
|
</th>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%=
|
2
|
-
<%= render partial:
|
1
|
+
<%= decidim_form_for(@form, html: { class: "form new_proposal" }) do |f| %>
|
2
|
+
<%= render partial: "form", object: f, locals: { title: t(".title") } %>
|
3
3
|
|
4
4
|
<div class="button--double form-general-submit">
|
5
5
|
<%= f.submit t(".create") %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
$("#js-form-recategorize-proposals #category_id").removeClass("is-invalid-input")
|
20
20
|
$(".js-check-all").prop('checked', false);
|
21
21
|
$(".js-check-all-proposal").prop('checked', false);
|
22
|
-
hideRecategorizeProposalActions()
|
23
|
-
showOtherActionsButtons();
|
24
|
-
selectedProposalsCountUpdate();
|
22
|
+
window.hideRecategorizeProposalActions()
|
23
|
+
window.showOtherActionsButtons();
|
24
|
+
window.selectedProposalsCountUpdate();
|
25
25
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= decidim_form_for(@form, url: proposals_import_path, html: { class: "form import_proposals" }) do |f| %>
|
2
|
-
<% if @form.
|
2
|
+
<% if @form.origin_components.any? %>
|
3
3
|
<div class="card">
|
4
4
|
<div class="card-divider">
|
5
5
|
<h2 class="card-title"><%= title %></h2>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<div class="card-section">
|
9
9
|
<div class="row column">
|
10
|
-
<%= f.select :
|
10
|
+
<%= f.select :origin_component_id, @form.origin_components_collection, prompt: t(".select_component") %>
|
11
11
|
</div>
|
12
12
|
<div class="row column">
|
13
13
|
<%= f.label t(".select_states") %>
|
@@ -23,6 +23,6 @@
|
|
23
23
|
<%= f.submit t(".create") %>
|
24
24
|
</div>
|
25
25
|
<% else %>
|
26
|
-
<p><%= t(".
|
26
|
+
<p><%= t(".no_components") %></p>
|
27
27
|
<% end %>
|
28
28
|
<% end %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<strong><%= t ".body" %>: </strong><%= proposal.body %>
|
12
12
|
</div>
|
13
13
|
<div class="row column">
|
14
|
-
<strong><%= t ".created_at" %>: </strong> <%= l proposal.created_at, format: :decidim_short
|
14
|
+
<strong><%= t ".created_at" %>: </strong> <%= l proposal.created_at, format: :decidim_short %>
|
15
15
|
</div>
|
16
16
|
<div class="row column">
|
17
17
|
<strong><%= t ".proposal_votes_count" %>: </strong> <%= proposal.proposal_votes_count %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<li class="<%= selected ?
|
1
|
+
<li class="<%= selected ? "selected" : "" %>" data-method="<%= http_method.to_s.upcase %>" data-url="<%= current_endorsement_url %>">
|
2
2
|
<%= render partial: "decidim/shared/author_reference", locals: { author: identity } %>
|
3
3
|
<%= icon("circle-check", class: "icon--big #{selected ? '' : 'invisible'}") %>
|
4
|
-
</li>
|
4
|
+
</li>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="reveal__header reveal__header--nomargin reveal__bg p-s">
|
2
|
-
<h6 class="heading6 m-none"><%=t
|
2
|
+
<h6 class="heading6 m-none"><%= t ".select_identity" %></h6>
|
3
3
|
</div>
|
4
4
|
<ul class="reveal__list">
|
5
5
|
<%= render_endorsement_identity(proposal, current_user) %>
|
@@ -8,5 +8,5 @@
|
|
8
8
|
<% end %>
|
9
9
|
</ul>
|
10
10
|
<div class="reveal__footer reveal__bg text-right p-s">
|
11
|
-
<button class="button button--nomargin button--sc" type="button" data-close><%= t(
|
11
|
+
<button class="button button--nomargin button--sc" type="button" data-close><%= t(".done") %></button>
|
12
12
|
</div>
|
@@ -1,9 +1,20 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
morphdom($proposalEndorsementsRowCount[0], '<%= j(render partial: 'decidim/proposals/proposals/endorsements_count', locals: { proposal: proposal, fully_endorsed: fully_endorsed }).strip.html_safe %>');
|
4
|
-
var $proposalEndorsementsRowButton = $($('#select-identity-button')[0]);
|
5
|
-
<% if fully_endorsed %>
|
6
|
-
$proposalEndorsementsRowButton.addClass('success')
|
7
|
-
<% else %>
|
8
|
-
$proposalEndorsementsRowButton.removeClass('success')
|
1
|
+
<% if current_user.user_groups.empty? %>
|
2
|
+
update_main_page_button();
|
9
3
|
<% end %>
|
4
|
+
update_identities_rows();
|
5
|
+
|
6
|
+
function update_main_page_button() {
|
7
|
+
var $proposalEndorsementButton = $('#proposal-<%= proposal.id %>-endorsement-button');
|
8
|
+
morphdom($proposalEndorsementButton[0], '<%= j(endorsement_button(proposal, false)).strip.html_safe %>');
|
9
|
+
}
|
10
|
+
function update_identities_rows() {
|
11
|
+
<% fully_endorsed= fully_endorsed?(proposal, current_user) %>
|
12
|
+
var $proposalEndorsementsRowCount = $('#proposal-<%= proposal.id %>-endorsements-count');
|
13
|
+
morphdom($proposalEndorsementsRowCount[0], '<%= j(render partial: 'decidim/proposals/proposals/endorsements_count', locals: { proposal: proposal, fully_endorsed: fully_endorsed }).strip.html_safe %>');
|
14
|
+
var $proposalEndorsementsRowButton = $($('#select-identity-button')[0]);
|
15
|
+
<% if fully_endorsed %>
|
16
|
+
$proposalEndorsementsRowButton.addClass('success')
|
17
|
+
<% else %>
|
18
|
+
$proposalEndorsementsRowButton.removeClass('success')
|
19
|
+
<% end %>
|
20
|
+
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<div id="proposal-<%= proposal.id %>-endorsement-button<%= user_group&.id ? "-#{user_group.id}" :
|
1
|
+
<div id="proposal-<%= proposal.id %>-endorsement-button<%= user_group&.id ? "-#{user_group.id}" : "" %>">
|
2
2
|
<% if !current_user %>
|
3
3
|
<%= action_authorized_button_to :endorse, endorse_label, current_endorsement_url, class: "button #{endorsement_button_classes(from_proposals_list)} secondary" %>
|
4
4
|
<% else %>
|
5
5
|
<% if proposal.endorsed_by?(current_user, user_group) %>
|
6
|
-
<%= action_authorized_button_to :endorse, unendorse_label, current_endorsement_url, method: :delete, remote: true,
|
6
|
+
<%= action_authorized_button_to :endorse, unendorse_label, current_endorsement_url, method: :delete, remote: true, class: "button #{endorsement_button_classes(from_proposals_list)} success", id: "endorsement_button" %>
|
7
7
|
<% else %>
|
8
8
|
<%= action_authorized_button_to :endorse, endorse_label, current_endorsement_url, remote: true, data: { }, class: "button #{endorsement_button_classes(from_proposals_list)} secondary" %>
|
9
9
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<%= javascript_include_tag
|
1
|
+
<%= javascript_include_tag "decidim/proposals/identity_selector_dialog" %>
|
2
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 ?
|
4
|
-
<%= t(
|
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
5
|
</button>
|
6
6
|
|
7
7
|
<div class="reveal collapse"
|
@@ -5,17 +5,17 @@
|
|
5
5
|
<div class="button-group button-group--collapse button--nomargin small">
|
6
6
|
<%= render partial: "endorsements_count", locals: { proposal: @proposal, fully_endorsed: fully_endorsed } %>
|
7
7
|
<% if current_settings.endorsements_blocked? %>
|
8
|
-
<%= content_tag :span, t(
|
8
|
+
<%= content_tag :span, t(".endorse"), class: "card__button button #{endorsement_button_classes(false)} disabled", disabled: true, title: t(".endorse") %>
|
9
9
|
<% elsif current_user %>
|
10
10
|
<%= render partial: "endorsement_identities_cabin", locals: { proposal: @proposal, fully_endorsed: fully_endorsed } %>
|
11
11
|
<% else %>
|
12
|
-
<%= action_authorized_button_to :endorse, t(
|
12
|
+
<%= action_authorized_button_to :endorse, t(".endorse"), "", class: "card__button button #{endorsement_button_classes(false)} secondary" %>
|
13
13
|
<% end %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<% end %>
|
17
|
-
<div class="column collapse <%= endorsements_enabled? ?
|
18
|
-
<%= link_to
|
17
|
+
<div class="column collapse <%= endorsements_enabled? ? "small-3" : "" %>">
|
18
|
+
<%= link_to "#comments", class: "button small compact hollow secondary button--nomargin expanded" do %>
|
19
19
|
<%= icon "comment-square", class: "icon--small", aria_label: "Comentarios", role: "img" %> <%= @proposal.comments.count %>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%= link_to
|
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
2
|
<%= icon "bullhorn", class: "icon--small", aria_label: "Endorsements", role: "img" %>
|
3
3
|
<%= proposal.proposal_endorsements_count %>
|
4
4
|
</button>
|
5
|
-
<% end %>
|
5
|
+
<% end %>
|
@@ -2,38 +2,38 @@
|
|
2
2
|
<div class="filters__section">
|
3
3
|
<div class="filters__search">
|
4
4
|
<div class="input-group">
|
5
|
-
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(
|
5
|
+
<%= form.search_field :search_text, label: false, class: "input-group-field", placeholder: t(".search") %>
|
6
6
|
<div class="input-group-button">
|
7
7
|
<button type="submit" class="button button--muted">
|
8
|
-
<%= icon "magnifying-glass", aria_label: t(
|
8
|
+
<%= icon "magnifying-glass", aria_label: t(".search") %>
|
9
9
|
</button>
|
10
10
|
</div>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
</div>
|
14
14
|
|
15
|
-
<% if
|
16
|
-
<%= form.collection_radio_buttons :origin, [["all", t(
|
15
|
+
<% if component_settings.official_proposals_enabled %>
|
16
|
+
<%= form.collection_radio_buttons :origin, [["all", t(".all")], ["official", t(".official")], ["citizens", t(".citizens")]], :first, :last, legend_title: t(".origin") %>
|
17
17
|
<% end %>
|
18
18
|
|
19
|
-
<% if
|
20
|
-
<%= form.collection_radio_buttons :state, [["all", t(
|
19
|
+
<% if component_settings.proposal_answering_enabled && current_settings.proposal_answering_enabled %>
|
20
|
+
<%= form.collection_radio_buttons :state, [["all", t(".all")], ["accepted", t(".accepted")], ["rejected", t(".rejected")], ["evaluating", t(".evaluating")]], :first, :last, legend_title: t(".state") %>
|
21
21
|
<% end %>
|
22
22
|
|
23
23
|
<% if linked_classes_for(Decidim::Proposals::Proposal).any? %>
|
24
|
-
<%= form.collection_radio_buttons :related_to, linked_classes_filter_values_for(Decidim::Proposals::Proposal), :first, :last, legend_title: t(
|
24
|
+
<%= form.collection_radio_buttons :related_to, linked_classes_filter_values_for(Decidim::Proposals::Proposal), :first, :last, legend_title: t(".related_to") %>
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<% if current_user && current_settings.votes_enabled? %>
|
28
|
-
<%= form.collection_check_boxes :activity, [["voted", t(
|
28
|
+
<%= form.collection_check_boxes :activity, [["voted", t(".voted")]], :first, :last, legend_title: t(".activity") %>
|
29
29
|
<% end %>
|
30
30
|
|
31
31
|
<% if current_participatory_space.has_subscopes? %>
|
32
32
|
<%= scopes_picker_filter form, :scope_id %>
|
33
33
|
<% end %>
|
34
34
|
|
35
|
-
<% if
|
36
|
-
<%= form.categories_select :category_id,
|
35
|
+
<% if current_component.categories.any? %>
|
36
|
+
<%= form.categories_select :category_id, current_component.categories, legend_title: t(".category"), disable_parents: false, label: false, prompt: t(".category_prompt") %>
|
37
37
|
<% end %>
|
38
38
|
|
39
39
|
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="filters-controls hide-for-mediumlarge">
|
2
2
|
<button data-open="filter-box" class="filters-controls__trigger">
|
3
3
|
<%= t ".filter" %>
|
4
|
-
<%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(
|
4
|
+
<%= icon "caret-bottom", class: "icon--small float-right", aria_label: t(".unfold"), role: "img" %>
|
5
5
|
</button>
|
6
6
|
</div>
|
7
7
|
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<%
|
2
|
+
count = identities.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
|
+
<%= identities_xxs(identities.limit(5)) %>
|
12
|
+
<% if count > 5 %><span id="<%= widget_ids[:ellipsis] %>" data-toggler=".hide">+<%= count - 5 %></span><% end -%>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<% if count > 5 %>
|
16
|
+
<div class="row">
|
17
|
+
<div id="<%= widget_ids[:see_all_identities] %>" class="columns large-12" data-toggler=".hide">
|
18
|
+
<a data-toggle="<%= widget_ids.values_at(:remaining_identities, :see_all_identities, :ellipsis).join(" ") %>"><%= t(".see_all") %></a>
|
19
|
+
</div>
|
20
|
+
<div id="<%= widget_ids[:remaining_identities] %>" class="hide" data-toggler=".hide">
|
21
|
+
<div class="columns large-12">
|
22
|
+
<%= identities_xxs(identities.offset(5)) %>
|
23
|
+
</div>
|
24
|
+
<div class="columns large-12">
|
25
|
+
<a data-toggle="<%= widget_ids.values_at(:remaining_identities, :see_all_identities, :ellipsis).join(" ") %>"><%= t(".see_less") %></a>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<% end -%>
|
30
|
+
<% end %>
|
data/app/views/decidim/proposals/proposals/{_endorsement_xxs.html.erb → _identity_xxs.html.erb}
RENAMED
@@ -1,4 +1,3 @@
|
|
1
|
-
<% identity = endorsement_identity(endorsement) %>
|
2
1
|
<div class="author author--inline">
|
3
2
|
<span class="author__avatar author__avatar--small">
|
4
3
|
<%= image_tag identity.avatar_url %>
|
@@ -6,4 +5,4 @@
|
|
6
5
|
<span class="author__name">
|
7
6
|
<%= identity.name %>
|
8
7
|
</span>
|
9
|
-
</div>
|
8
|
+
</div>
|
@@ -2,10 +2,10 @@
|
|
2
2
|
<article class="card card--proposal">
|
3
3
|
<div class="card__content">
|
4
4
|
<div class="card__header">
|
5
|
-
<%= link_to proposal do%>
|
5
|
+
<%= link_to proposal do %>
|
6
6
|
<h5 class="card__title"><%= proposal.title %></h5>
|
7
7
|
<% end %>
|
8
|
-
<div class="card__author
|
8
|
+
<div class="card__author">
|
9
9
|
<%= render partial: "decidim/shared/author_reference", locals: { author: present(proposal).author } %>
|
10
10
|
</div>
|
11
11
|
<div class="tech-info tech-info--text-left">
|