decidim-proposals 0.26.4 → 0.27.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/proposals/highlighted_proposals_for_component_cell.rb +9 -1
- data/app/cells/decidim/proposals/proposal_m_cell.rb +6 -8
- data/app/commands/decidim/proposals/accept_access_to_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/admin/answer_proposal.rb +1 -1
- data/app/commands/decidim/proposals/admin/assign_proposals_to_valuator.rb +1 -1
- data/app/commands/decidim/proposals/admin/create_proposal.rb +8 -2
- data/app/commands/decidim/proposals/admin/create_proposal_note.rb +2 -2
- data/app/commands/decidim/proposals/admin/discard_participatory_text.rb +1 -1
- data/app/commands/decidim/proposals/admin/import_participatory_text.rb +1 -1
- data/app/commands/decidim/proposals/admin/import_proposals.rb +2 -5
- data/app/commands/decidim/proposals/admin/merge_proposals.rb +1 -1
- data/app/commands/decidim/proposals/admin/notify_proposal_answer.rb +1 -1
- data/app/commands/decidim/proposals/admin/publish_answers.rb +1 -1
- data/app/commands/decidim/proposals/admin/split_proposals.rb +1 -1
- data/app/commands/decidim/proposals/admin/unassign_proposals_from_valuator.rb +1 -1
- data/app/commands/decidim/proposals/admin/update_participatory_text.rb +1 -1
- data/app/commands/decidim/proposals/admin/update_proposal.rb +8 -2
- data/app/commands/decidim/proposals/admin/update_proposal_category.rb +5 -3
- data/app/commands/decidim/proposals/admin/update_proposal_scope.rb +3 -3
- data/app/commands/decidim/proposals/create_collaborative_draft.rb +5 -5
- data/app/commands/decidim/proposals/create_proposal.rb +1 -1
- data/app/commands/decidim/proposals/destroy_proposal.rb +1 -1
- data/app/commands/decidim/proposals/publish_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/publish_proposal.rb +1 -1
- data/app/commands/decidim/proposals/reject_access_to_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/request_access_to_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/unvote_proposal.rb +1 -1
- data/app/commands/decidim/proposals/update_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/update_proposal.rb +8 -2
- data/app/commands/decidim/proposals/vote_proposal.rb +1 -1
- data/app/commands/decidim/proposals/withdraw_collaborative_draft.rb +1 -1
- data/app/commands/decidim/proposals/withdraw_proposal.rb +1 -1
- data/app/controllers/concerns/decidim/proposals/orderable.rb +7 -5
- data/app/controllers/decidim/proposals/admin/proposals_controller.rb +7 -7
- data/app/controllers/decidim/proposals/collaborative_drafts_controller.rb +10 -10
- data/app/controllers/decidim/proposals/proposal_votes_controller.rb +1 -1
- data/app/controllers/decidim/proposals/proposals_controller.rb +25 -18
- data/app/events/decidim/proposals/publish_proposal_event.rb +0 -8
- data/app/forms/decidim/proposals/admin/import_participatory_text_form.rb +4 -4
- data/app/forms/decidim/proposals/admin/proposal_base_form.rb +4 -4
- data/app/forms/decidim/proposals/admin/proposal_form.rb +2 -0
- data/app/forms/decidim/proposals/admin/proposals_fork_form.rb +2 -2
- data/app/forms/decidim/proposals/admin/proposals_import_form.rb +1 -1
- data/app/forms/decidim/proposals/proposal_form.rb +11 -4
- data/app/forms/decidim/proposals/proposal_wizard_create_step_form.rb +3 -0
- data/app/helpers/decidim/proposals/admin/proposal_bulk_actions_helper.rb +4 -0
- data/app/helpers/decidim/proposals/application_helper.rb +4 -6
- data/app/helpers/decidim/proposals/proposal_cells_helper.rb +1 -3
- data/app/helpers/decidim/proposals/proposal_wizard_helper.rb +7 -7
- data/app/jobs/decidim/proposals/notify_proposals_mentioned_job.rb +1 -1
- data/app/models/decidim/proposals/collaborative_draft.rb +10 -0
- data/app/models/decidim/proposals/collaborative_draft_collaborator_request.rb +0 -2
- data/app/models/decidim/proposals/proposal.rb +47 -8
- data/app/queries/decidim/proposals/filtered_proposals.rb +1 -1
- data/app/queries/decidim/proposals/similar_proposals.rb +1 -1
- data/app/services/decidim/proposals/proposal_search.rb +16 -71
- data/app/validators/proposal_length_validator.rb +2 -5
- data/app/views/decidim/proposals/admin/proposals/_form.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/_proposal-tr.html.erb +2 -2
- data/app/views/decidim/proposals/admin/proposals/publish_answers.js.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/update_attribute.js.erb +26 -0
- data/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb +8 -16
- data/app/views/decidim/proposals/collaborative_drafts/_filters.html.erb +4 -4
- data/app/views/decidim/proposals/collaborative_drafts/_wizard_aside.html.erb +1 -1
- data/app/views/decidim/proposals/collaborative_drafts/edit.html.erb +3 -1
- data/app/views/decidim/proposals/collaborative_drafts/new.html.erb +3 -1
- data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +13 -36
- data/app/views/decidim/proposals/proposals/_filters.html.erb +5 -5
- data/app/views/decidim/proposals/proposals/_proposals.html.erb +5 -5
- data/app/views/decidim/proposals/proposals/complete.html.erb +3 -1
- data/app/views/decidim/proposals/proposals/edit.html.erb +3 -1
- data/app/views/decidim/proposals/proposals/edit_draft.html.erb +3 -1
- data/app/views/decidim/proposals/proposals/new.html.erb +3 -1
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +3 -9
- data/config/locales/bg.yml +1 -4
- data/config/locales/ca.yml +14 -26
- data/config/locales/cs.yml +32 -28
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +3 -54
- data/config/locales/el.yml +3 -6
- data/config/locales/en.yml +12 -25
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +13 -25
- data/config/locales/es-PY.yml +13 -25
- data/config/locales/es.yml +12 -24
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +3 -10
- data/config/locales/fi-plain.yml +12 -23
- data/config/locales/fi.yml +12 -23
- data/config/locales/fr-CA.yml +12 -25
- data/config/locales/fr.yml +12 -25
- data/config/locales/ga-IE.yml +1 -2
- data/config/locales/gl.yml +12 -9
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +10 -9
- data/config/locales/id-ID.yml +3 -5
- data/config/locales/is-IS.yml +2 -2
- data/config/locales/it.yml +4 -9
- data/config/locales/ja.yml +53 -49
- data/config/locales/ko.yml +1 -0
- data/config/locales/lb.yml +1 -0
- data/config/locales/lt.yml +1 -988
- data/config/locales/lv.yml +3 -6
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +7 -9
- data/config/locales/no.yml +3 -6
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +3 -9
- data/config/locales/pt-BR.yml +4 -10
- data/config/locales/pt.yml +3 -9
- data/config/locales/ro-RO.yml +7 -9
- data/config/locales/ru.yml +1 -1
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +3 -6
- data/config/locales/sl.yml +1 -0
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +1 -2
- data/config/locales/sv.yml +10 -9
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +3 -9
- data/config/locales/uk.yml +1 -1
- data/config/locales/val-ES.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +3 -9
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20180529110230_move_authorships_to_coauthorships.rb +1 -0
- data/lib/decidim/proposals/component.rb +19 -14
- data/lib/decidim/proposals/import/proposal_answer_creator.rb +21 -19
- data/lib/decidim/proposals/test/factories.rb +1 -1
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +25 -31
- data/app/services/decidim/proposals/collaborative_draft_search.rb +0 -59
- data/app/views/decidim/proposals/admin/proposals/_js-callout.html.erb +0 -6
- data/app/views/decidim/proposals/admin/proposals/update_category.js.erb +0 -26
- data/app/views/decidim/proposals/admin/proposals/update_scope.js.erb +0 -27
- data/config/locales/gn-PY.yml +0 -1
- data/config/locales/lo-LA.yml +0 -1
- data/config/locales/oc-FR.yml +0 -1
@@ -2,83 +2,28 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
module Proposals
|
5
|
-
#
|
6
|
-
#
|
5
|
+
# This service scopes the proposal searches with parameters that cannot be
|
6
|
+
# passed from the user interface.
|
7
7
|
class ProposalSearch < ResourceSearch
|
8
|
-
|
8
|
+
attr_reader :type, :activity
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
# page - The page number to paginate the results.
|
13
|
-
# per_page - The number of proposals to return per page.
|
14
|
-
def initialize(options = {})
|
15
|
-
options[:scope] = options.fetch(:scope, Proposal)
|
16
|
-
options[:scope] = options[:state_withdraw] == "withdrawn" ? options[:scope].withdrawn : options[:scope].except_withdrawn
|
17
|
-
super(options[:scope], options)
|
18
|
-
end
|
19
|
-
|
20
|
-
# Handle the activity filter
|
21
|
-
def search_activity
|
22
|
-
case activity
|
23
|
-
when "voted"
|
24
|
-
query
|
25
|
-
.includes(:votes)
|
26
|
-
.where(decidim_proposals_proposal_votes: { decidim_author_id: user })
|
27
|
-
when "my_proposals"
|
28
|
-
query
|
29
|
-
.where.not(coauthorships_count: 0)
|
30
|
-
.joins(:coauthorships)
|
31
|
-
.where(decidim_coauthorships: { decidim_author_type: "Decidim::UserBaseEntity" })
|
32
|
-
.where(decidim_coauthorships: { decidim_author_id: user })
|
33
|
-
else # Assume 'all'
|
34
|
-
query
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def search_state_withdraw
|
39
|
-
return query if state_withdraw == "withdrawn"
|
10
|
+
def build(params)
|
11
|
+
return super if search_context == :admin
|
40
12
|
|
41
|
-
|
42
|
-
|
13
|
+
@type = params[:type]
|
14
|
+
@activity = params[:activity]
|
43
15
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
case type
|
52
|
-
when "proposals"
|
53
|
-
query.only_amendables
|
54
|
-
when "amendments"
|
55
|
-
query.only_visible_emendations_for(user, component)
|
56
|
-
else # Assume 'all'
|
57
|
-
query.amendables_and_visible_emendations_for(user, component)
|
16
|
+
if params[:activity] && user
|
17
|
+
case params[:activity]
|
18
|
+
when "voted"
|
19
|
+
add_scope(:voted_by, user)
|
20
|
+
when "my_proposals"
|
21
|
+
add_scope(:coauthored_by, user)
|
22
|
+
end
|
58
23
|
end
|
59
|
-
|
60
|
-
|
61
|
-
# Filters Proposals by the name of the classes they are linked to. By default,
|
62
|
-
# returns all Proposals. When a `related_to` param is given, then it camelcases item
|
63
|
-
# to find the real class name and checks the links for the Proposals.
|
64
|
-
#
|
65
|
-
# The `related_to` param is expected to be in this form:
|
66
|
-
#
|
67
|
-
# "decidim/meetings/meeting"
|
68
|
-
#
|
69
|
-
# This can be achieved by performing `klass.name.underscore`.
|
70
|
-
#
|
71
|
-
# Returns only those proposals that are linked to the given class name.
|
72
|
-
def search_related_to
|
73
|
-
from = query
|
74
|
-
.joins(:resource_links_from)
|
75
|
-
.where(decidim_resource_links: { to_type: related_to.camelcase })
|
76
|
-
|
77
|
-
to = query
|
78
|
-
.joins(:resource_links_to)
|
79
|
-
.where(decidim_resource_links: { from_type: related_to.camelcase })
|
24
|
+
add_scope(:with_type, [params[:type], user, component]) if params[:type]
|
80
25
|
|
81
|
-
|
26
|
+
super
|
82
27
|
end
|
83
28
|
end
|
84
29
|
end
|
@@ -5,14 +5,11 @@
|
|
5
5
|
# allows the minimum and maximum values to be lambdas allowing us to fetch the
|
6
6
|
# maximum length dynamically for each proposals component.
|
7
7
|
class ProposalLengthValidator < ActiveModel::EachValidator
|
8
|
-
include ActionView::Helpers::SanitizeHelper
|
9
|
-
|
10
8
|
def validate_each(record, attribute, value)
|
11
9
|
return if value.blank?
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
validate_max_length(record, attribute, text_value)
|
11
|
+
validate_min_length(record, attribute, value)
|
12
|
+
validate_max_length(record, attribute, value)
|
16
13
|
end
|
17
14
|
|
18
15
|
private
|
@@ -1,4 +1,4 @@
|
|
1
|
-
$("<%= escape_javascript(render partial: %q{js-callout}, locals: { css: %q{success}, text: flash.now[:notice] }) %>").appendTo(".callout-wrapper");
|
1
|
+
$("<%= escape_javascript(render partial: %q{decidim/admin/shared/js-callout}, locals: { css: %q{success}, text: flash.now[:notice] }) %>").appendTo(".callout-wrapper");
|
2
2
|
|
3
3
|
<% proposal_ids.each do |id| %>
|
4
4
|
$(".table-list [data-id='<%= id %>']")
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<% if flash.now[:error].present? %>
|
2
|
+
$("<%= form_selector %> <%= attribute_selector %>").addClass("is-invalid-input")
|
3
|
+
$("<%= escape_javascript(render partial: %q{decidim/admin/shared/js-callout}, locals: { css: %q{alert}, text: flash.now[:error] }) %>").appendTo(".callout-wrapper");
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% if flash.now[:alert].present? %>
|
7
|
+
$("<%= form_selector %> <%= attribute_selector %>").removeClass("is-invalid-input")
|
8
|
+
$("<%= escape_javascript(render partial: %q{decidim/admin/shared/js-callout}, locals: { css: %q{warning}, text: flash.now[:alert] }) %>").appendTo(".callout-wrapper");
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% if flash.now[:notice].present? %>
|
12
|
+
$("<%= escape_javascript(render partial: %q{decidim/admin/shared/js-callout}, locals: { css: %q{success}, text: flash.now[:notice] }) %>").appendTo(".callout-wrapper");
|
13
|
+
|
14
|
+
<% proposal_ids.each do |id| %>
|
15
|
+
$(".table-list [data-id='<%= id %>']")
|
16
|
+
.replaceWith("<%= escape_javascript(render partial: %q{proposal-tr}, locals: { proposal: proposal_find(id) }) %>");
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
$("<%= form_selector %> <%= attribute_selector %>").removeClass("is-invalid-input")
|
20
|
+
$(".js-check-all").prop('checked', false);
|
21
|
+
$(".js-check-all-resources").prop('checked', false);
|
22
|
+
window.hideBulkActionsButton();
|
23
|
+
window.hideBulkActionForms();
|
24
|
+
window.showOtherActionsButtons();
|
25
|
+
window.selectedResourcesCountUpdate();
|
26
|
+
<% end %>
|
@@ -63,21 +63,13 @@
|
|
63
63
|
<% if component_settings.attachments_allowed? %>
|
64
64
|
<fieldset class="attachments_container">
|
65
65
|
<legend><%= t("attachment_legend", scope: "decidim.proposals.collaborative_drafts.edit") %></legend>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<% @form.errors[:attachment].each do |message| %>
|
75
|
-
<small class="form-error is-visible">
|
76
|
-
<%= message %>
|
77
|
-
</small>
|
78
|
-
<% end %>
|
79
|
-
<% end %>
|
80
|
-
</div>
|
81
|
-
<% end %>
|
66
|
+
<div class="row column">
|
67
|
+
<%= form.attachment :documents,
|
68
|
+
multiple: false,
|
69
|
+
label: t("decidim.proposals.collaborative_drafts.new.add_file"),
|
70
|
+
button_label: t("decidim.proposals.collaborative_drafts.new.add_file"),
|
71
|
+
button_edit_label: t("decidim.proposals.collaborative_drafts.new.edit_file"),
|
72
|
+
help_i18n_scope: "decidim.forms.file_help.file" %>
|
73
|
+
</div>
|
82
74
|
</fieldset>
|
83
75
|
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="filters__section">
|
5
5
|
<div class="filters__search">
|
6
6
|
<div class="input-group">
|
7
|
-
<%= form.search_field :
|
7
|
+
<%= form.search_field :search_text_cont, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %>
|
8
8
|
<div class="input-group-button">
|
9
9
|
<button type="submit" class="button" aria-controls="collaborative_drafts">
|
10
10
|
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
@@ -14,18 +14,18 @@
|
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
|
17
|
-
<%= form.check_boxes_tree :
|
17
|
+
<%= form.check_boxes_tree :with_any_state, filter_collaborative_drafts_state_values, legend_title: t(".state"), "aria-controls": "collaborative_drafts" %>
|
18
18
|
|
19
19
|
<% if linked_classes_for(Decidim::Proposals::CollaborativeDraft).any? %>
|
20
20
|
<%= form.collection_radio_buttons :related_to, linked_classes_filter_values_for(Decidim::Proposals::CollaborativeDraft), :first, :last, { legend_title: t(".related_to") }, "aria-controls": "collaborative_drafts" %>
|
21
21
|
<% end %>
|
22
22
|
|
23
23
|
<% if current_component.has_subscopes? %>
|
24
|
-
<%= form.check_boxes_tree :
|
24
|
+
<%= form.check_boxes_tree :with_any_scope, filter_scopes_values, legend_title: t(".scope"), "aria-controls": "collaborative_drafts" %>
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<% if current_component.categories.any? %>
|
28
|
-
<%= form.check_boxes_tree :
|
28
|
+
<%= form.check_boxes_tree :with_any_category, filter_categories_values, legend_title: t(".category"), "aria-controls": "collaborative_drafts" %>
|
29
29
|
<% end %>
|
30
30
|
|
31
31
|
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="columns large-3">
|
2
2
|
<div class="m-bottom">
|
3
|
-
<%= link_to
|
3
|
+
<%= link_to :back do %>
|
4
4
|
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
5
5
|
<%= t("back_from_collaborative_draft", scope: "decidim.proposals.collaborative_drafts.wizard_aside").html_safe %>
|
6
6
|
<% end %>
|
@@ -67,49 +67,26 @@
|
|
67
67
|
<% if component_settings.attachments_allowed? && @proposal %>
|
68
68
|
<fieldset class="gallery__container photos_container">
|
69
69
|
<legend><%= t("gallery_legend", scope: "decidim.proposals.proposals.edit") %></legend>
|
70
|
-
|
71
|
-
<% if @form.photos.any? %>
|
72
|
-
<% @form.photos.each do |photo| %>
|
73
|
-
<div class="callout gallery__item" id="attachment_<%= photo.id %>" data-closable>
|
74
|
-
<%= image_tag photo.thumbnail_url, class: "thumbnail", alt: photo.file.filename %>
|
75
|
-
<%= form.hidden_field :photos, multiple: true, value: photo.id, id: "photo-#{photo.id}" %>
|
76
|
-
<button class="close-button"
|
77
|
-
aria-label="<%= t("delete_image", scope: "decidim.proposals.proposals.edit") %>"
|
78
|
-
title="<%= t("delete_image", scope: "decidim.proposals.proposals.edit") %>"
|
79
|
-
type="button"
|
80
|
-
data-close>
|
81
|
-
<span aria-hidden="true">×</span>
|
82
|
-
</button>
|
83
|
-
</div>
|
84
|
-
<% end %>
|
85
|
-
<% end %>
|
86
|
-
|
87
70
|
<div class="row column">
|
88
|
-
<%= form.
|
71
|
+
<%= form.attachment :photos,
|
72
|
+
multiple: false,
|
73
|
+
label: t("decidim.proposals.proposals.edit.add_image"),
|
74
|
+
button_label: t("decidim.proposals.proposals.edit.add_image"),
|
75
|
+
button_edit_label: t("decidim.proposals.proposals.edit.edit_image"),
|
76
|
+
help_i18n_scope: "decidim.forms.file_help.image",
|
77
|
+
extension_allowlist: Decidim::OrganizationSettings.for(current_organization).upload_allowed_file_extensions_image %>
|
89
78
|
</div>
|
90
79
|
</fieldset>
|
91
80
|
|
92
81
|
<fieldset class="attachments_container gallery__container documents_container">
|
93
82
|
<legend><%= t("attachment_legend", scope: "decidim.proposals.proposals.edit") %></legend>
|
94
|
-
|
95
|
-
<% if @form.documents.any? %>
|
96
|
-
<% @form.documents.each do |document| %>
|
97
|
-
<div class="callout" id="attachment_<%= document.id %>" data-closable>
|
98
|
-
<%= link_to translated_attribute(document.title), document.url %>
|
99
|
-
<small><%= document.file_type %> <%= number_to_human_size(document.file_size) %></small>
|
100
|
-
<%= form.hidden_field :documents, multiple: true, value: document.id, id: "document-#{document.id}" %>
|
101
|
-
<button class="close-button"
|
102
|
-
aria-label="<%= t("delete_document", scope: "decidim.proposals.proposals.edit") %>"
|
103
|
-
title="<%= t("delete_document", scope: "decidim.proposals.proposals.edit") %>"
|
104
|
-
type="button" data-close>
|
105
|
-
<span aria-hidden="true">×</span>
|
106
|
-
</button>
|
107
|
-
</div>
|
108
|
-
<% end %>
|
109
|
-
<% end %>
|
110
|
-
|
111
83
|
<div class="row column">
|
112
|
-
<%= form.
|
84
|
+
<%= form.attachment :documents,
|
85
|
+
multiple: true,
|
86
|
+
label: t("decidim.proposals.proposals.edit.add_documents"),
|
87
|
+
button_label: t("decidim.proposals.proposals.edit.add_documents"),
|
88
|
+
button_edit_label: t("decidim.proposals.proposals.edit.edit_documents"),
|
89
|
+
help_i18n_scope: "decidim.forms.file_help.file" %>
|
113
90
|
</div>
|
114
91
|
</fieldset>
|
115
92
|
<% end %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="filters__section">
|
5
5
|
<div class="filters__search">
|
6
6
|
<div class="input-group">
|
7
|
-
<%= form.search_field :
|
7
|
+
<%= form.search_field :search_text_cont, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %>
|
8
8
|
<div class="input-group-button">
|
9
9
|
<button type="submit" class="button" aria-controls="proposals">
|
10
10
|
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
|
@@ -17,19 +17,19 @@
|
|
17
17
|
<%= form.hidden_field "state_withdraw", value: params.dig("filter", "state_withdraw") %>
|
18
18
|
|
19
19
|
<% if component_settings.proposal_answering_enabled && current_settings.proposal_answering_enabled %>
|
20
|
-
<%= form.check_boxes_tree :
|
20
|
+
<%= form.check_boxes_tree :with_any_state, filter_proposals_state_values, legend_title: t(".state"), "aria-controls": "proposals" %>
|
21
21
|
<% end %>
|
22
22
|
|
23
23
|
<% if current_component.has_subscopes? %>
|
24
|
-
<%= form.check_boxes_tree :
|
24
|
+
<%= form.check_boxes_tree :with_any_scope, filter_scopes_values, legend_title: t(".scope"), "aria-controls": "proposals" %>
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<% if current_component.categories.any? %>
|
28
|
-
<%= form.check_boxes_tree :
|
28
|
+
<%= form.check_boxes_tree :with_any_category, filter_categories_values, legend_title: t(".category"), "aria-controls": "proposals" %>
|
29
29
|
<% end %>
|
30
30
|
|
31
31
|
<% if component_settings.official_proposals_enabled %>
|
32
|
-
<%= form.check_boxes_tree :
|
32
|
+
<%= form.check_boxes_tree :with_any_origin, filter_origin_values, legend_title: t(".origin"), "aria-controls": "proposals" %>
|
33
33
|
<% end %>
|
34
34
|
|
35
35
|
<% if current_user %>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<% if params.dig("filter", "
|
1
|
+
<% if params.dig("filter", "with_availability").present? && params["filter"]["with_availability"] == "withdrawn" %>
|
2
2
|
<div class="callout warning">
|
3
3
|
<%= t("decidim.proposals.proposals.index.text_banner",
|
4
|
-
go_back_link: link_to(t("decidim.proposals.proposals.index.click_here"), proposals_path("filter[
|
4
|
+
go_back_link: link_to(t("decidim.proposals.proposals.index.click_here"), proposals_path("filter[with_availability]" => nil)),
|
5
5
|
).html_safe %>
|
6
6
|
</div>
|
7
7
|
<% end %>
|
@@ -37,10 +37,10 @@
|
|
37
37
|
|
38
38
|
<div class="row">
|
39
39
|
<div class="text-right">
|
40
|
-
<% if params.dig("filter", "
|
41
|
-
<%= link_to t("decidim.proposals.proposals.index.see_all"), proposals_path("filter[
|
40
|
+
<% if params.dig("filter", "with_availability").present? && params["filter"]["with_availability"] == "withdrawn" %>
|
41
|
+
<%= link_to t("decidim.proposals.proposals.index.see_all"), proposals_path("filter[with_availability]" => nil) %>
|
42
42
|
<% else %>
|
43
|
-
<%= link_to t("decidim.proposals.proposals.index.see_all_withdrawn"), proposals_path(filter: {
|
43
|
+
<%= link_to t("decidim.proposals.proposals.index.see_all_withdrawn"), proposals_path(filter: { with_availability: "withdrawn", state: [""] }) %>
|
44
44
|
<% end %>
|
45
45
|
</div>
|
46
46
|
</div>
|
data/config/locales/am-ET.yml
CHANGED
data/config/locales/ar.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
ar:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -36,10 +37,6 @@ ar:
|
|
36
37
|
valuator_role_id: اسم المُقيِّم
|
37
38
|
errors:
|
38
39
|
models:
|
39
|
-
participatory_text:
|
40
|
-
attributes:
|
41
|
-
document:
|
42
|
-
invalid_document_type: 'نوع المستند غير صالح. التنسيقات المقبولة هي: %{valid_mime_types}'
|
43
40
|
proposal:
|
44
41
|
attributes:
|
45
42
|
add_documents:
|
@@ -206,6 +203,7 @@ ar:
|
|
206
203
|
affected_user:
|
207
204
|
email_intro: 'تم رفض اقتراحك "%{resource_title}". يمكنك قراءة الإجابة في هذه الصفحة:'
|
208
205
|
email_outro: لقد تلقيت هذا الإشعار لأنك مؤلف "%{resource_title}".
|
206
|
+
email_subject: تم رفض اقتراحك
|
209
207
|
notification_title: تم رفض اقتراحك <a href="%{resource_path}">%{resource_title}</a>.
|
210
208
|
proposal_update_category:
|
211
209
|
email_intro: 'قام المشرف بتحديث فئة اقتراحك "%{resource_title}" ، تحقق من ذلك في هذه الصفحة:'
|
@@ -431,7 +429,6 @@ ar:
|
|
431
429
|
all: الكل
|
432
430
|
filter_origin_values:
|
433
431
|
all: الكل
|
434
|
-
citizens: المواطنون
|
435
432
|
meetings: اجتماعات
|
436
433
|
official: الرسمية
|
437
434
|
user_groups: المجموعات
|
@@ -475,6 +472,7 @@ ar:
|
|
475
472
|
many: "%{count} مسودات تعاونية"
|
476
473
|
other: "%{count} مسودات تعاونية"
|
477
474
|
create:
|
475
|
+
error: كانت هناك مشكلة في إنشاء هذه المسودات التعاونية
|
478
476
|
success: تم إنشاء مشروع تعاوني بنجاح.
|
479
477
|
edit:
|
480
478
|
attachment_legend: "(اختياري) إضافة مرفق"
|
@@ -608,12 +606,8 @@ ar:
|
|
608
606
|
many: "%{count} مقترحات"
|
609
607
|
other: "%{count} مقترحات"
|
610
608
|
edit:
|
611
|
-
add_documents: المستندات
|
612
|
-
add_images: ملف
|
613
609
|
attachment_legend: "(اختياري) إضافة مرفق"
|
614
610
|
back: الى الخلف
|
615
|
-
delete_document: حذف المستند
|
616
|
-
delete_image: حذف الصورة
|
617
611
|
select_a_category: الرجاء تحديد الفئة
|
618
612
|
send: إرسال
|
619
613
|
title: تعديل الاقتراح
|
data/config/locales/bg.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
bg:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -36,10 +37,6 @@ bg:
|
|
36
37
|
valuator_role_id: Име на проверяващ
|
37
38
|
errors:
|
38
39
|
models:
|
39
|
-
participatory_text:
|
40
|
-
attributes:
|
41
|
-
document:
|
42
|
-
invalid_document_type: 'Невалиден тип документ. Допустимите формати са: %{valid_mime_types}'
|
43
40
|
proposal:
|
44
41
|
attributes:
|
45
42
|
add_documents:
|
data/config/locales/ca.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
---
|
1
2
|
ca:
|
2
3
|
activemodel:
|
3
4
|
attributes:
|
@@ -45,7 +46,7 @@ ca:
|
|
45
46
|
participatory_text:
|
46
47
|
attributes:
|
47
48
|
document:
|
48
|
-
|
49
|
+
allowed_file_content_types: 'Tipus de document invàlid. Els formats que s''accepten són: %{types}'
|
49
50
|
proposal:
|
50
51
|
attributes:
|
51
52
|
add_documents:
|
@@ -213,7 +214,6 @@ ca:
|
|
213
214
|
endorsements_enabled: Adhesions habilitades
|
214
215
|
proposal_answering_enabled: Resposta a propostes activada
|
215
216
|
publish_answers_immediately: Publica les respostes a les propostes immediatament
|
216
|
-
publish_answers_immediately_help_html: 'Tingues present que si respons alguna proposta sense que això estigui habilitat, l''hauràs de publicar-les manualment seleccionant-les i fent servir l''acció de publicar. Per a més informació sobre el funcionament, consulta la <a href="https://docs.decidim.org/en/admin/components/proposals/answers#_publication" target="_blank">pàgina de documentació de les respostes a les propostes</a>.'
|
217
217
|
suggested_hashtags: Hashtags suggerits a les participants per a noves propostes
|
218
218
|
votes_blocked: Suports bloquejats
|
219
219
|
votes_enabled: Suports habilitats
|
@@ -303,7 +303,6 @@ ca:
|
|
303
303
|
email_outro: Has rebut aquesta notificació perquè estàs seguint "%{participatory_space_title}". Pots deixar de rebre notificacions seguint l'enllaç anterior.
|
304
304
|
email_subject: Nova proposta "%{resource_title}" afegida a %{participatory_space_title}
|
305
305
|
notification_title: '%{author} ha afegit la proposta <a href="%{resource_path}">%{resource_title}</a> a %{participatory_space_title}'
|
306
|
-
notification_title_official: S'ha afegit la proposta oficial <a href="%{resource_path}">%{resource_title}</a> a %{participatory_space_title}
|
307
306
|
proposal_rejected:
|
308
307
|
affected_user:
|
309
308
|
email_intro: 'La teva proposta "%{resource_title}" ha estat rebutjada. Pots llegir la resposta en aquesta pàgina:'
|
@@ -402,21 +401,8 @@ ca:
|
|
402
401
|
proposals: Propostes
|
403
402
|
imports:
|
404
403
|
help:
|
405
|
-
answers:
|
406
|
-
|
407
|
-
<ul>
|
408
|
-
<li><b>id:</b> ID de la proposta a responder</li>
|
409
|
-
<li>state<b>:</b> Un d'aquests "acceptada", "en avaluació" o "rebutjada"</li>
|
410
|
-
<li><b>answer/en</b> Resposta en idioma inglés. Això dependrà de la configuració d'idioma predeterminat a la teva plataforma.</li>
|
411
|
-
</ul>
|
412
|
-
proposals: |
|
413
|
-
El document ha de contindre els següents noms de columna en cas d'arxius CSV o Excel o noms de claus en el cas d'arxius JSON:
|
414
|
-
<ul>
|
415
|
-
<li><b>title/ca:</b> Títol en català. Això dependrà de la configuració d'idioma predeterminat a la teva plataforma.</li>
|
416
|
-
<li><b>body/ca:</b> Descripció en català. Això dependrà de la configuració d'idioma predeterminat a la teva plataforma.</li>
|
417
|
-
<li><b>scope/id:</b> ID de l'Àmbit</li>
|
418
|
-
<li><b>category/id:</b> ID de la Categoria</li>
|
419
|
-
</ul>
|
404
|
+
answers: 'El document d''importació ha tenir les columnes següents: id, estat (acceptada, en avaluació, rebutjada) resposta/es (en els diferents idiomes habilitats a la plataforma).'
|
405
|
+
proposals: L'arxiu ha d'incloure els noms de columna title/ca i body/ca (o un altre idioma de preferència per exemple, title/es i body/es). També s'admeten les columnes scope/id i category/id.
|
420
406
|
label:
|
421
407
|
answers: Importar respostes des d'un fitxer
|
422
408
|
proposals: Importar propostes des d'un fitxer
|
@@ -448,14 +434,14 @@ ca:
|
|
448
434
|
info_1: Les seccions següents s'han convertit a propostes. Ara pots revisar-les i ajustar-les abans de publicar.
|
449
435
|
publish_document: Publicar el document
|
450
436
|
save_draft: Desa l'esborrany
|
451
|
-
title:
|
437
|
+
title: PREVISUALITZAR EL TEXT PARTICIPATIU
|
452
438
|
new_import:
|
453
439
|
accepted_mime_types:
|
454
440
|
md: Markdown
|
455
441
|
odt: ODT
|
456
442
|
bottom_hint: "(Podràs previsualitzar i ordenar les seccions del document)"
|
457
443
|
document_legend: 'Afegeix un document de menys de 2 Mb, cadascuna de les seccions (fins a 3 nivells de profunditat) es convertiran a propostes. Els formats suportats són: %{valid_mime_types}'
|
458
|
-
title:
|
444
|
+
title: AFEGIR DOCUMENT
|
459
445
|
upload_document: Puja el document
|
460
446
|
publish:
|
461
447
|
invalid: No s'han pogut publicar propostes
|
@@ -609,9 +595,9 @@ ca:
|
|
609
595
|
all: Totes
|
610
596
|
filter_origin_values:
|
611
597
|
all: Totes
|
612
|
-
citizens: Ciutadania
|
613
598
|
meetings: Trobades
|
614
599
|
official: Oficial
|
600
|
+
participants: Participants
|
615
601
|
user_groups: Grups
|
616
602
|
filter_scope_values:
|
617
603
|
all: Totes
|
@@ -649,7 +635,7 @@ ca:
|
|
649
635
|
one: "%{count} esborrany de col·laboració"
|
650
636
|
other: "%{count} esborrany de col·laboració"
|
651
637
|
create:
|
652
|
-
error: S'ha produït un error en crear aquest esborrany col·laboratiu
|
638
|
+
error: S'ha produït un error en crear aquest esborrany col·laboratiu
|
653
639
|
success: Esborrany col·laboratiu creat correctament.
|
654
640
|
edit:
|
655
641
|
attachment_legend: "(Opcional) Afegeix un fitxer adjunt"
|
@@ -674,6 +660,8 @@ ca:
|
|
674
660
|
filter_by: Filtra per
|
675
661
|
unfold: Desplega
|
676
662
|
new:
|
663
|
+
add_file: Afegir fitxer
|
664
|
+
edit_file: Editar el fitxer
|
677
665
|
send: Continua
|
678
666
|
new_collaborative_draft_button:
|
679
667
|
new_collaborative_draft: Nou esborrany col·laboratiu
|
@@ -784,12 +772,12 @@ ca:
|
|
784
772
|
description: Les coordenades s'actualitzaran quan facis clic en el botó 'previsualitzar'. No obstant això, la direcció no canvia.
|
785
773
|
instructions: Pots moure la ubicació en el mapa.
|
786
774
|
edit:
|
787
|
-
add_documents:
|
788
|
-
|
775
|
+
add_documents: Afegir documents
|
776
|
+
add_image: Afegir imatge
|
789
777
|
attachment_legend: "(Opcional) Afegiu un fitxer adjunt"
|
790
778
|
back: Torna
|
791
|
-
|
792
|
-
|
779
|
+
edit_documents: Editar documents
|
780
|
+
edit_image: Editar imatge
|
793
781
|
gallery_legend: "(Opcional) Afegir una imatge a la targeta de proposta"
|
794
782
|
select_a_category: Si us plau, selecciona una categoria
|
795
783
|
send: Envia
|