decidim-proposals 0.31.5 → 0.31.6

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.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/proposals/proposal_vote/show.erb +1 -16
  3. data/app/{views/decidim/proposals/proposals/participatory_texts/_proposal_votes_count.html.erb → cells/decidim/proposals/proposal_votes_count/participatory_texts.erb} +17 -17
  4. data/app/cells/decidim/proposals/proposal_votes_count/show.erb +12 -0
  5. data/app/cells/decidim/proposals/proposal_votes_count_cell.rb +81 -0
  6. data/app/commands/decidim/proposals/admin/update_proposal.rb +1 -1
  7. data/app/commands/decidim/proposals/create_proposal.rb +1 -1
  8. data/app/commands/decidim/proposals/update_proposal.rb +1 -1
  9. data/app/forms/decidim/proposals/admin/proposal_form.rb +4 -53
  10. data/app/forms/decidim/proposals/admin/proposals_import_form.rb +0 -1
  11. data/app/forms/decidim/proposals/admin/proposals_merge_form.rb +2 -2
  12. data/app/forms/decidim/proposals/proposal_form.rb +3 -3
  13. data/app/jobs/decidim/proposals/admin/import_proposals_job.rb +3 -1
  14. data/app/models/decidim/proposals/proposal.rb +7 -1
  15. data/app/views/decidim/proposals/admin/proposal_states/index.html.erb +1 -1
  16. data/app/views/decidim/proposals/admin/proposals/_actions.html.erb +2 -2
  17. data/app/views/decidim/proposals/admin/proposals/_form.html.erb +1 -1
  18. data/app/views/decidim/proposals/admin/proposals/show.html.erb +5 -5
  19. data/app/views/decidim/proposals/admin/proposals_merges/_form.html.erb +1 -1
  20. data/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb +1 -1
  21. data/app/views/decidim/proposals/proposal_votes/update_buttons_and_counters.js.erb +1 -1
  22. data/app/views/decidim/proposals/proposals/_edit_form_fields.html.erb +1 -1
  23. data/app/views/decidim/proposals/proposals/_proposal_actions.html.erb +4 -4
  24. data/app/views/decidim/proposals/proposals/_proposal_aside.html.erb +1 -1
  25. data/config/locales/ar.yml +0 -5
  26. data/config/locales/bg.yml +0 -5
  27. data/config/locales/ca-IT.yml +4 -8
  28. data/config/locales/ca.yml +4 -5
  29. data/config/locales/cs.yml +0 -5
  30. data/config/locales/de.yml +1 -6
  31. data/config/locales/el.yml +0 -5
  32. data/config/locales/en.yml +3 -4
  33. data/config/locales/es-MX.yml +4 -5
  34. data/config/locales/es-PY.yml +4 -5
  35. data/config/locales/es.yml +4 -5
  36. data/config/locales/eu.yml +24 -25
  37. data/config/locales/fi-plain.yml +3 -4
  38. data/config/locales/fi.yml +3 -4
  39. data/config/locales/fr-CA.yml +4 -5
  40. data/config/locales/fr.yml +4 -5
  41. data/config/locales/gl.yml +0 -4
  42. data/config/locales/hu.yml +0 -4
  43. data/config/locales/id-ID.yml +0 -4
  44. data/config/locales/it.yml +0 -5
  45. data/config/locales/ja.yml +3 -4
  46. data/config/locales/lt.yml +0 -5
  47. data/config/locales/lv.yml +0 -4
  48. data/config/locales/nl.yml +0 -5
  49. data/config/locales/no.yml +0 -5
  50. data/config/locales/pl.yml +0 -5
  51. data/config/locales/pt-BR.yml +0 -5
  52. data/config/locales/pt.yml +0 -5
  53. data/config/locales/ro-RO.yml +0 -5
  54. data/config/locales/ru.yml +0 -8
  55. data/config/locales/sk.yml +1 -6
  56. data/config/locales/sv.yml +1 -5
  57. data/config/locales/tr-TR.yml +2 -7
  58. data/config/locales/uk.yml +0 -8
  59. data/config/locales/zh-CN.yml +0 -5
  60. data/config/locales/zh-TW.yml +0 -5
  61. data/lib/decidim/proposals/version.rb +1 -1
  62. metadata +23 -24
  63. data/app/commands/decidim/proposals/gallery_methods.rb +0 -18
  64. data/app/packs/entrypoints/decidim_proposals_geocoding.js +0 -2
  65. data/app/views/decidim/proposals/proposals/_votes_count.html.erb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a367060a3d6445a1e250dc260f3af3a69aa8395b648007e20bb26fe430bc79fb
4
- data.tar.gz: 3c8229ee2c9633433589fa41cabd92fdd455ca3cd3e70908e2210afa5d2fa6b0
3
+ metadata.gz: 3f885c60dad4625728a498f01b934fef5e17db6e67c2b32b090f993959600102
4
+ data.tar.gz: 5ff2cca8bd53d5f13de93fa1b6d1a6498c968935cfaa1babecb1e7e475d92dce
5
5
  SHA512:
6
- metadata.gz: eebf2257c14db10d384c0d8c578cb0c1e8ab15c37ee297b0cfd2e71fb73b55fb8c278fa1a1286787dfc40ef7739f9704a920333342d3a2ac35d1a6ab6265fbee
7
- data.tar.gz: b88016bd527077e1016507fc22236307d473517d4b7da149e16dcbb7d30f2404e68769fc4a9f2a05b06c96edfc870d79aeda51be56c313f551ff1ce325ded4b7
6
+ metadata.gz: 84932a4f8c33981816817c176b496333be80d48910226140a68b6adf546378a77387b2960a2ff87ca55cd476aa067dd38393899c93b11bbbdf0e612c19720276
7
+ data.tar.gz: 56d53ba84ec61b93635566d7436b16e496638ad4cc90727cdf17b66abfcc14640c2042dbd749d804e55ea0f10e957452d6879862764fbcb47dda8398187756fb
@@ -1,19 +1,4 @@
1
- <% if !current_settings.votes_hidden? && (current_component.participatory_space.can_participate?(current_user) || current_user&.admin?) %>
2
- <% if component_settings.participatory_texts_enabled? && from_proposals_list %>
3
- <%= render partial: "decidim/proposals/proposals/participatory_texts/proposal_votes_count", locals: { proposal: resource, from_proposals_list: true } %>
4
- <% else %>
5
- <% progress ||= resource.proposal_votes_count || 0 %>
6
- <% total ||= resource.maximum_votes || 0 %>
7
- <%= cell(
8
- "decidim/progress_bar",
9
- progress,
10
- total:,
11
- units_name: "decidim.proposals.proposals.votes_count.count",
12
- element_id: "proposal-#{resource.id}-votes-count",
13
- class: total.positive? ? "card__proposals-votes-limited" : "card__proposals-votes-unlimited"
14
- ) %>
15
- <% end %>
16
- <% end %>
1
+ <%= cell("decidim/proposals/proposal_votes_count", resource, from_proposals_list:) %>
17
2
 
18
3
  <% button_classes = "button button__sm button__secondary w-full" %>
19
4
 
@@ -1,38 +1,38 @@
1
- <% if proposal.rejected? %>
1
+ <% if resource.rejected? %>
2
2
  <div></div>
3
3
  <% else %>
4
4
  <% if !current_user %>
5
5
  <% if current_settings.votes_blocked? %>
6
- <button type="button" name="button" class="column button button--sc disabled" disabled id="proposal-<%= proposal.id %>-votes-count">
7
- <%= proposal.proposal_votes_count || 0 %>
6
+ <button type="button" name="button" class="column button button--sc disabled" disabled id="<%= element_id %>">
7
+ <%= resource.proposal_votes_count || 0 %>
8
8
  </button>
9
9
  <% else %>
10
- <button type="button" name="button" class="column button button--sc" id="proposal-<%= proposal.id %>-votes-count">
11
- <%= proposal.proposal_votes_count || 0 %>
10
+ <button type="button" name="button" class="column button button--sc" id="<%= element_id %>">
11
+ <%= resource.proposal_votes_count || 0 %>
12
12
  </button>
13
13
  <% end %>
14
14
  <% else %>
15
- <% if proposal_voted_by_user?(proposal) %>
16
- <button type="button" name="button" class="column button success button--sc" id="proposal-<%= proposal.id %>-votes-count">
17
- <%= proposal.proposal_votes_count || 0 %>
15
+ <% if proposal_voted_by_user?(resource) %>
16
+ <button type="button" name="button" class="column button success button--sc" id="<%= element_id %>">
17
+ <%= resource.proposal_votes_count || 0 %>
18
18
  </button>
19
19
  <% else %>
20
- <% if proposal.maximum_votes_reached? && !proposal.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
21
- <button type="button" name="button" class="column button button--sc disabled" disabled id="proposal-<%= proposal.id %>-votes-count">
22
- <%= proposal.proposal_votes_count || 0 %>
20
+ <% if resource.maximum_votes_reached? && !resource.can_accumulate_votes_beyond_threshold && current_component.participatory_space.can_participate?(current_user) %>
21
+ <button type="button" name="button" class="column button button--sc disabled" disabled id="<%= element_id %>">
22
+ <%= resource.proposal_votes_count || 0 %>
23
23
  </button>
24
24
  <% else %>
25
25
  <% if vote_limit_enabled? && remaining_votes_count_for_user == 0 %>
26
- <button type="button" name="button" class="column button button--sc" disabled id="proposal-<%= proposal.id %>-votes-count">
27
- <%= proposal.proposal_votes_count || 0 %>
26
+ <button type="button" name="button" class="column button button--sc" disabled id="<%= element_id %>">
27
+ <%= resource.proposal_votes_count || 0 %>
28
28
  </button>
29
29
  <% elsif current_settings.votes_blocked? || !current_component.participatory_space.can_participate?(current_user) %>
30
- <button type="button" name="button" class="column button button--sc disabled" disabled id="proposal-<%= proposal.id %>-votes-count">
31
- <%= proposal.proposal_votes_count || 0 %>
30
+ <button type="button" name="button" class="column button button--sc disabled" disabled id="<%= element_id %>">
31
+ <%= resource.proposal_votes_count || 0 %>
32
32
  </button>
33
33
  <% else %>
34
- <button type="button" name="button" class="column button button--sc" id="proposal-<%= proposal.id %>-votes-count">
35
- <%= proposal.proposal_votes_count || 0 %>
34
+ <button type="button" name="button" class="column button button--sc" id="<%= element_id %>">
35
+ <%= resource.proposal_votes_count || 0 %>
36
36
  </button>
37
37
  <% end %>
38
38
  <% end %>
@@ -0,0 +1,12 @@
1
+ <% if participatory_texts_variant? %>
2
+ <%= render :participatory_texts %>
3
+ <% else %>
4
+ <%= cell(
5
+ "decidim/progress_bar",
6
+ progress,
7
+ total:,
8
+ units_name: "decidim.proposals.proposals.votes_count.count",
9
+ element_id:,
10
+ class: progress_bar_class
11
+ ) %>
12
+ <% end %>
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Proposals
5
+ # Renders the votes count (progress bar or participatory texts variant)
6
+ # for a given proposal
7
+ class ProposalVotesCountCell < Decidim::ViewModel
8
+ include Cell::ViewModel::Partial
9
+ include Decidim::Proposals::ProposalVotesHelper
10
+
11
+ alias resource model
12
+
13
+ def show
14
+ return unless can_see_votes?
15
+
16
+ render
17
+ end
18
+
19
+ private
20
+
21
+ def can_see_votes?
22
+ return false if component.current_settings.votes_hidden?
23
+
24
+ space_member? || admin? || transparent_space?
25
+ end
26
+
27
+ def space_member?
28
+ participatory_space.can_participate?(current_user)
29
+ end
30
+
31
+ def admin?
32
+ current_user&.admin?
33
+ end
34
+
35
+ def transparent_space?
36
+ participatory_space.try(:is_transparent?)
37
+ end
38
+
39
+ def participatory_texts_variant?
40
+ component.settings.participatory_texts_enabled? && from_proposals_list?
41
+ end
42
+
43
+ def component
44
+ resource.component
45
+ end
46
+ alias current_component component
47
+
48
+ def participatory_space
49
+ component.participatory_space
50
+ end
51
+
52
+ def current_settings
53
+ component.current_settings
54
+ end
55
+
56
+ def component_settings
57
+ component.settings
58
+ end
59
+
60
+ def from_proposals_list?
61
+ options[:from_proposals_list]
62
+ end
63
+
64
+ def progress
65
+ resource.proposal_votes_count || 0
66
+ end
67
+
68
+ def total
69
+ resource.maximum_votes || 0
70
+ end
71
+
72
+ def progress_bar_class
73
+ total.positive? ? "card__proposals-votes-limited" : "card__proposals-votes-unlimited"
74
+ end
75
+
76
+ def element_id
77
+ "proposal-#{resource.id}-votes-count"
78
+ end
79
+ end
80
+ end
81
+ end
@@ -36,7 +36,7 @@ module Decidim
36
36
  transaction do
37
37
  update_proposal
38
38
  update_proposal_author
39
- document_cleanup!(include_all_attachments: true)
39
+ attachment_cleanup!(include_all_attachments: true)
40
40
  create_attachments(first_weight: first_attachment_weight) if process_attachments?
41
41
  end
42
42
 
@@ -82,7 +82,7 @@ module Decidim
82
82
  )
83
83
 
84
84
  proposal.taxonomizations = form.taxonomizations if form.taxonomizations.present?
85
- proposal.documents = form.documents if form.documents.present?
85
+ proposal.attachments = form.attachments if form.attachments.present?
86
86
  if form.geocoded?
87
87
  proposal.latitude = form.latitude
88
88
  proposal.longitude = form.longitude
@@ -39,7 +39,7 @@ module Decidim
39
39
  update_proposal
40
40
  end
41
41
 
42
- document_cleanup!(include_all_attachments: true)
42
+ attachment_cleanup!(include_all_attachments: true)
43
43
 
44
44
  create_attachments(first_weight: first_attachment_weight) if process_attachments?
45
45
  end
@@ -14,7 +14,7 @@ module Decidim
14
14
  translatable_attribute :body, Decidim::Attributes::RichText
15
15
  attribute :attachment, AttachmentForm
16
16
 
17
- attachments_attribute :documents
17
+ attachments_attribute :attachments
18
18
 
19
19
  validates :title, :body, translatable_presence: true
20
20
  validates :title, :body, translated_etiquette: true
@@ -27,61 +27,12 @@ module Decidim
27
27
 
28
28
  self.title = presenter.title(all_locales: title.is_a?(Hash))
29
29
  self.body = presenter.editor_body(all_locales: body.is_a?(Hash))
30
- self.documents = model.attachments.ids
31
- self.add_documents = model.attachments.map { |att| { id: att.id, title: att.title } }
32
- end
33
-
34
- def documents=(value)
35
- case value
36
- when String
37
- super(parse_string_documents(value))
38
- when Integer
39
- super([value])
40
- else
41
- super
42
- end
43
- end
44
-
45
- def documents
46
- result = super
47
-
48
- if should_use_add_documents?(result)
49
- extract_ids_from_add_documents
50
- else
51
- result.is_a?(Array) ? result : []
52
- end
30
+ self.attachments = model.attachments.ids
31
+ self.add_attachments = model.attachments.map { |att| { id: att.id, title: att.title } }
53
32
  end
54
33
 
55
34
  def notify_missing_attachment_if_errored
56
- errors.add(:add_documents, :needs_to_be_reattached) if errors.any? && add_documents.present?
57
- end
58
-
59
- private
60
-
61
- def should_use_add_documents?(result)
62
- (result.blank? || result.is_a?(String)) && add_documents.present?
63
- end
64
-
65
- def extract_ids_from_add_documents
66
- add_documents
67
- .select { |doc| doc.is_a?(Hash) && (doc[:id].present? || doc["id"].present?) }
68
- .map { |doc| (doc[:id] || doc["id"]).to_i }
69
- end
70
-
71
- def parse_string_documents(value)
72
- return [] if value.blank?
73
-
74
- parse_document_ids(value)
75
- end
76
-
77
- def parse_document_ids(value)
78
- ids = begin
79
- Array(JSON.parse(value))
80
- rescue JSON::ParserError
81
- value.split(",").map(&:strip)
82
- end
83
-
84
- ids.map(&:to_i).reject(&:zero?)
35
+ errors.add(:add_attachments, :needs_to_be_reattached) if errors.any? && add_attachments.present?
85
36
  end
86
37
  end
87
38
  end
@@ -15,7 +15,6 @@ module Decidim
15
15
  attribute :states, Array[String]
16
16
 
17
17
  validates :origin_component_id, :origin_component, :current_component, presence: true
18
- validates :states, presence: true
19
18
  validate :valid_states
20
19
 
21
20
  def states
@@ -15,7 +15,7 @@ module Decidim
15
15
  attribute :target_component_id, Array[Integer]
16
16
  attribute :proposal_ids, Array
17
17
 
18
- attachments_attribute :documents
18
+ attachments_attribute :attachments
19
19
 
20
20
  validates :target_component, :proposals, :current_component, presence: true
21
21
  validates :proposal_ids, length: { minimum: 2 }
@@ -61,7 +61,7 @@ module Decidim
61
61
  end
62
62
 
63
63
  def notify_missing_attachment_if_errored
64
- errors.add(:add_documents, :needs_to_be_reattached) if errors.any? && add_documents.present?
64
+ errors.add(:add_attachments, :needs_to_be_reattached) if errors.any? && add_attachments.present?
65
65
  end
66
66
  end
67
67
  end
@@ -19,7 +19,7 @@ module Decidim
19
19
  attribute :longitude, Float
20
20
  attribute :attachment, AttachmentForm
21
21
 
22
- attachments_attribute :documents
22
+ attachments_attribute :attachments
23
23
 
24
24
  validates :title, :body, presence: true
25
25
  validates :title, :body, etiquette: true
@@ -42,7 +42,7 @@ module Decidim
42
42
  presenter = ProposalPresenter.new(model)
43
43
  self.body = presenter.editor_body(all_locales: body.is_a?(Hash))
44
44
 
45
- self.documents = model.attachments
45
+ self.attachments = model.attachments
46
46
  end
47
47
 
48
48
  def participatory_space_manifest
@@ -73,7 +73,7 @@ module Decidim
73
73
  # in any other field. This is needed because when the form has an error, the attachment
74
74
  # is lost, so we need a way to inform the user of this problem.
75
75
  def notify_missing_attachment_if_errored
76
- errors.add(:add_documents, :needs_to_be_reattached) if errors.any? && add_documents.present?
76
+ errors.add(:add_attachments, :needs_to_be_reattached) if errors.any? && add_attachments.present?
77
77
  end
78
78
  end
79
79
  end
@@ -32,7 +32,9 @@ module Decidim
32
32
  def proposals
33
33
  proposals = Decidim::Proposals::Proposal.not_hidden.not_withdrawn.where(component: origin_component)
34
34
 
35
- if @form["states"].include?("not_answered")
35
+ if @form["states"].blank?
36
+ proposals
37
+ elsif @form["states"].include?("not_answered")
36
38
  proposals.not_answered.or(proposals.where(id: proposals.only_status(@form["states"]).pluck(:id)))
37
39
  else
38
40
  proposals.only_status(@form["states"])
@@ -397,8 +397,14 @@ module Decidim
397
397
  # Create the :search_text ransacker alias for searching from both of these.
398
398
  ransacker_i18n_multi :search_text, [:title, :body]
399
399
 
400
+ ransacker_i18n :translated_title, :title
401
+
400
402
  def self.ransackable_attributes(_auth_object = nil)
401
- %w(id_string search_text title body is_emendation comments_count proposal_votes_count published_at proposal_notes_count)
403
+ %w(
404
+ id_string search_text title translated_title body is_emendation
405
+ comments_count proposal_votes_count published_at proposal_notes_count
406
+ state_published evaluation_assignments_count
407
+ )
402
408
  end
403
409
 
404
410
  def self.ransackable_associations(_auth_object = nil)
@@ -58,7 +58,7 @@
58
58
  <% else %>
59
59
  <li class="dropdown__item">
60
60
  <div class="dropdown__button-disabled">
61
- <%= with_tooltip t("tooltips.deleted_proposal_states_info", scope: "decidim.admin") do %>
61
+ <%= with_tooltip t("tooltips.deleted_proposal_states_info", scope: "decidim.admin"), class: :left do %>
62
62
  <%= icon "delete-bin-line", class: "text-gray" %>
63
63
  <span>
64
64
  <%= t("actions.destroy", scope: "decidim.proposals") %>
@@ -22,7 +22,7 @@
22
22
  <% else %>
23
23
  <li class="dropdown__item">
24
24
  <div class="dropdown__button-disabled">
25
- <%= with_tooltip t("tooltips.cannot_edit_proposal_info", scope: "decidim.admin") do %>
25
+ <%= with_tooltip t("tooltips.cannot_edit_proposal_info", scope: "decidim.admin"), class: :left do %>
26
26
  <%= icon "pencil-line", class: "text-gray" %>
27
27
  <span>
28
28
  <%= t("actions.edit_proposal", scope: "decidim.proposals") %>
@@ -73,7 +73,7 @@
73
73
  <% end %>
74
74
  <% else %>
75
75
  <div class="dropdown__button-disabled">
76
- <%= with_tooltip t("tooltips.deleted_proposals_info", scope: "decidim.admin") do %>
76
+ <%= with_tooltip t("tooltips.deleted_proposals_info", scope: "decidim.admin"), class: :left do %>
77
77
  <%= icon "pencil-line", class: "text-gray" %>
78
78
  <span>
79
79
  <%= t("actions.edit_proposal", scope: "decidim.proposals") %>
@@ -36,7 +36,7 @@
36
36
 
37
37
  <% if component_settings.attachments_allowed? %>
38
38
  <div class="row column">
39
- <%= form.attachment :documents,
39
+ <%= form.attachment :attachments,
40
40
  multiple: true,
41
41
  label: t("decidim.proposals.proposals.edit.add_attachments"),
42
42
  button_label: t("decidim.proposals.proposals.edit.add_attachments"),
@@ -4,7 +4,7 @@
4
4
  <%= render partial: "decidim/admin/shared/adjacent_navigation", locals: { adjacent_paths: filtered_adjacent_paths(proposal, :proposal_path) } %>
5
5
  <div class="component__show_header">
6
6
  <h2 class="component__show_header-title">
7
- <%= decidim_html_escape(present(proposal).title).html_safe %>
7
+ <%= present(proposal).title(html_escape: true) %>
8
8
  </h2>
9
9
  </div>
10
10
 
@@ -18,7 +18,7 @@
18
18
  <li class="component__show_nav-author-title">
19
19
  <%= link_to_if(
20
20
  presented_author.profile_path.present?,
21
- presented_author.name,
21
+ decidim_html_escape(presented_author.name),
22
22
  presented_author.profile_path,
23
23
  target: :blank
24
24
  ) %>
@@ -45,9 +45,9 @@
45
45
  <div class="card-section">
46
46
  <div class="row column">
47
47
  <span class="component__show-title"><%= t ".body" %></span>
48
- <p class="component__show-text">
49
- <%= simple_format(present(proposal).body(strip_tags: true)) %>
50
- </p>
48
+ <div class="component__show-text editor-content">
49
+ <%= render_proposal_body(proposal) %>
50
+ </div>
51
51
  </div>
52
52
  </div>
53
53
 
@@ -33,7 +33,7 @@
33
33
  <% end %>
34
34
  <% if component_settings.attachments_allowed? %>
35
35
  <div class="row column pt-4">
36
- <%= form.attachment :documents,
36
+ <%= form.attachment :attachments,
37
37
  multiple: true,
38
38
  label: t("decidim.proposals.proposals.edit.add_attachments"),
39
39
  button_label: t("decidim.proposals.proposals.edit.add_attachments"),
@@ -14,7 +14,7 @@
14
14
  <% end %>
15
15
 
16
16
  <% if component_settings.attachments_allowed? %>
17
- <%= form.attachment :documents,
17
+ <%= form.attachment :attachments,
18
18
  multiple: false,
19
19
  label: t("decidim.proposals.collaborative_drafts.new.add_file"),
20
20
  button_label: t("decidim.proposals.collaborative_drafts.new.add_file"),
@@ -3,7 +3,7 @@
3
3
  var $proposalVotesCount = $('#proposal-<%= proposal.id %>-votes-count');
4
4
 
5
5
  if($proposalVotesCount[0]) {
6
- morphdom($proposalVotesCount[0], '<%= j(render partial: "decidim/proposals/proposals/votes_count", locals: { proposal:, from_proposals_list: @from_proposals_list }).strip.html_safe %>');
6
+ morphdom($proposalVotesCount[0], '<%= j(cell("decidim/proposals/proposal_votes_count", proposal, from_proposals_list: @from_proposals_list).to_s).strip.html_safe %>');
7
7
  }
8
8
 
9
9
  var $proposalVoteButton = $('#proposal-<%= proposal.id %>-vote-button');
@@ -23,7 +23,7 @@
23
23
  <% end %>
24
24
  <% end %>
25
25
  <% if component_settings.attachments_allowed? && (new_proposal || @proposal) %>
26
- <%= form.attachment :documents,
26
+ <%= form.attachment :attachments,
27
27
  multiple: true,
28
28
  label: t("decidim.proposals.proposals.edit.add_attachments"),
29
29
  button_label: t("decidim.proposals.proposals.edit.add_attachments"),
@@ -1,6 +1,6 @@
1
1
  <% if @proposal.amendable? && allowed_to?(:edit, :proposal, proposal: @proposal) %>
2
- <li role="menuitem" class="dropdown__item">
3
- <%= link_to edit_proposal_path(@proposal), class: "dropdown__button" do %>
2
+ <li role="presentation" class="dropdown__item">
3
+ <%= link_to edit_proposal_path(@proposal), class: "dropdown__button", role: "menuitem" do %>
4
4
  <span><%= t("edit_proposal", scope: "decidim.proposals.proposals.show") %></span>
5
5
  <%= icon "pencil-line" %>
6
6
  <% end %>
@@ -10,8 +10,8 @@
10
10
  <% end %>
11
11
 
12
12
  <% if @proposal.withdrawable_by?(current_user) %>
13
- <li role="menuitem" class="dropdown__item">
14
- <%= action_authorized_link_to :withdraw, withdraw_proposal_path(@proposal), resource: @proposal, method: :put, class: "dropdown__button", title: t("withdraw_btn_hint", scope: "decidim.proposals.proposals.show" ), data: { confirm: t("withdraw_confirmation_html", scope: "decidim.proposals.proposals.show" ) } do %>
13
+ <li role="presentation" class="dropdown__item">
14
+ <%= action_authorized_link_to :withdraw, withdraw_proposal_path(@proposal), resource: @proposal, method: :put, class: "dropdown__button", role: "menuitem", title: t("withdraw_btn_hint", scope: "decidim.proposals.proposals.show" ), data: { confirm: t("withdraw_confirmation_html", scope: "decidim.proposals.proposals.show" ) } do %>
15
15
  <span><%= t("withdraw_proposal", scope: "decidim.proposals.proposals.show") %></span>
16
16
  <%= icon "arrow-go-back-line" %>
17
17
  <% end %>
@@ -2,7 +2,7 @@
2
2
  <section class="layout-aside__section">
3
3
  <div class="proposal__aside-vote layout-aside__ctas-buttons" data-controller="sticky-buttons">
4
4
  <%= render partial: "vote_button", locals: { proposal: @proposal, from_proposals_list: false } unless @proposal.withdrawn? %>
5
- <%= render partial: "votes_count", locals: { proposal: @proposal, from_proposals_list: false } %>
5
+ <%= cell("decidim/proposals/proposal_votes_count", @proposal, from_proposals_list: false) %>
6
6
  </div>
7
7
  </section>
8
8
  <% end %>
@@ -44,10 +44,6 @@ ar:
44
44
  allowed_file_content_types: 'نوع الوثيقة غير صالح. يسمح فقط بالملفات ذات الإضافات التالية: %{types}'
45
45
  proposal:
46
46
  attributes:
47
- add_documents:
48
- needs_to_be_reattached: يحتاج إلى إعادة ربط
49
- add_photos:
50
- needs_to_be_reattached: يحتاج إلى إعادة ربط
51
47
  body:
52
48
  cant_be_equal_to_template: لا يمكن أن يساوي القالب
53
49
  identical: لا يمكن أن يكون العنوان متطابقًا
@@ -125,7 +121,6 @@ ar:
125
121
  attachments_allowed: السماح للمرفقات
126
122
  collaborative_drafts_enabled: تم تمكين المسودات التعاونية
127
123
  comments_enabled: تم تمكين التعليقات
128
- comments_max_length: الحد الأقصى لطول التعليقات (اترك 0 لاستعمال القيمة الافتراضية)
129
124
  default_sort_order: التصنيف الافتراضي للاقتراح
130
125
  default_sort_order_options:
131
126
  most_commented: صاحبة الأكثر تعليقات
@@ -52,10 +52,6 @@ bg:
52
52
  allowed_file_content_types: 'Невалиден файлов формат. Позволени са само файлове със следните разширения: %{types}'
53
53
  proposal:
54
54
  attributes:
55
- add_documents:
56
- needs_to_be_reattached: Необходимо е да се прикачи отново
57
- add_photos:
58
- needs_to_be_reattached: Необходимо е да се прикачи отново
59
55
  body:
60
56
  cant_be_equal_to_template: не може да е еднакво с шаблона
61
57
  identical: И заглавието не може да е еднакво
@@ -134,7 +130,6 @@ bg:
134
130
  can_accumulate_votes_beyond_threshold: Може да натрупва гласове над прага
135
131
  collaborative_drafts_enabled: Съвместните чернови са разрешени
136
132
  comments_enabled: Коментарите са разрешени
137
- comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране)
138
133
  default_sort_order: Сортиране на предложения по подразбиране
139
134
  default_sort_order_help: Автоматично означава, че ако гласовете са активирани, предложенията ще се показват сортирани на случаен принцип, а ако гласовете са блокирани, тогава те ще бъдат сортирани по най-гласуваните.
140
135
  default_sort_order_options:
@@ -63,10 +63,8 @@ ca-IT:
63
63
  allowed_file_content_types: 'Tipus de document no vàlid. Només s''accepten arxius amb les següents extensions: %{types}'
64
64
  proposal:
65
65
  attributes:
66
- add_documents:
67
- needs_to_be_reattached: És necessari tornar a adjuntar l'arxiu
68
- add_photos:
69
- needs_to_be_reattached: És necessari tornar a adjuntar l'arxiu
66
+ add_attachments:
67
+ needs_to_be_reattached: És necessari tornar a adjuntar el fitxer
70
68
  body:
71
69
  cant_be_equal_to_template: No pot ser igual a la plantilla
72
70
  identical: I el títol no pot ser idèntic
@@ -107,9 +105,6 @@ ca-IT:
107
105
  decidim/proposals/proposal:
108
106
  one: Proposta
109
107
  other: Propostes
110
- decidim/proposals/proposal_note:
111
- one: Nota
112
- other: Notes
113
108
  decidim/proposals/proposal_vote:
114
109
  one: Donar suport
115
110
  other: Suports
@@ -179,7 +174,7 @@ ca-IT:
179
174
  collaborative_drafts_enabled: Esborranys col·laboratius habilitats
180
175
  collaborative_drafts_enabled_help: La funció «Esborranys col·laboratius» s'eliminarà pròximament. Si la feies servir, a partir de la versió 0.32 de Decidim podràs fer servir la funcionalitat de coautoria de propostes.
181
176
  comments_enabled: Comentaris habilitats
182
- comments_max_length: Longitud màxima dels comentaris (deixa 0 si vols mantenir la configuració per defecte)
177
+ comments_max_length: Caràcters màxims per comentari (deixar a 0 el valor predeterminat)
183
178
  default_sort_order: Ordre de propostes per defecte
184
179
  default_sort_order_help: '''Per defecte'' vol dir que si els suports estan habilitats, les propostes es mostraran aleatòriament, i si els suports estan bloquejats, aleshores es mostraran de més a menys suports.'
185
180
  default_sort_order_options:
@@ -859,6 +854,7 @@ ca-IT:
859
854
  errors:
860
855
  device_not_supported: El teu dispositiu no admet serveis d'ubicació. Si us plau, introdueix l'adreça postal completa manualment (tipus de via, nom de la via, número, codi postal i ciutat).
861
856
  no_device_location: Si us plau, no hem pogut detectar la teva ubicació. Si us plau, introdueix l'adreça postal completa manualment (tipus de via, nom de la via, número, codi postal i ciutat).
857
+ locating: Localitzant...
862
858
  use_my_location: Fer servir la meva ubicació actual
863
859
  invite_coauthors:
864
860
  cancel:
@@ -63,10 +63,8 @@ ca:
63
63
  allowed_file_content_types: 'Tipus de document no vàlid. Només s''accepten arxius amb les següents extensions: %{types}'
64
64
  proposal:
65
65
  attributes:
66
- add_documents:
67
- needs_to_be_reattached: És necessari tornar a adjuntar l'arxiu
68
- add_photos:
69
- needs_to_be_reattached: És necessari tornar a adjuntar l'arxiu
66
+ add_attachments:
67
+ needs_to_be_reattached: És necessari tornar a adjuntar el fitxer
70
68
  body:
71
69
  cant_be_equal_to_template: No pot ser igual a la plantilla
72
70
  identical: I el títol no pot ser idèntic
@@ -179,7 +177,7 @@ ca:
179
177
  collaborative_drafts_enabled: Esborranys col·laboratius habilitats
180
178
  collaborative_drafts_enabled_help: La funció «Esborranys col·laboratius» s'eliminarà pròximament. Si la feies servir, a partir de la versió 0.32 de Decidim podràs fer servir la funcionalitat de coautoria de propostes.
181
179
  comments_enabled: Comentaris habilitats
182
- comments_max_length: Longitud màxima dels comentaris (deixa 0 si vols mantenir la configuració per defecte)
180
+ comments_max_length: Caràcters màxims per comentari (deixar a 0 el valor predeterminat)
183
181
  default_sort_order: Ordre de propostes per defecte
184
182
  default_sort_order_help: '''Per defecte'' vol dir que si els suports estan habilitats, les propostes es mostraran aleatòriament, i si els suports estan bloquejats, aleshores es mostraran de més a menys suports.'
185
183
  default_sort_order_options:
@@ -859,6 +857,7 @@ ca:
859
857
  errors:
860
858
  device_not_supported: El teu dispositiu no admet serveis d'ubicació. Si us plau, introdueix l'adreça postal completa manualment (tipus de via, nom de la via, número, codi postal i ciutat).
861
859
  no_device_location: Si us plau, no hem pogut detectar la teva ubicació. Si us plau, introdueix l'adreça postal completa manualment (tipus de via, nom de la via, número, codi postal i ciutat).
860
+ locating: Localitzant...
862
861
  use_my_location: Fer servir la meva ubicació actual
863
862
  invite_coauthors:
864
863
  cancel: