decidim-debates 0.26.10 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/debates/debate_m_cell.rb +1 -1
  3. data/app/commands/decidim/debates/admin/close_debate.rb +1 -1
  4. data/app/commands/decidim/debates/admin/create_debate.rb +1 -1
  5. data/app/commands/decidim/debates/admin/update_debate.rb +1 -1
  6. data/app/commands/decidim/debates/close_debate.rb +1 -1
  7. data/app/commands/decidim/debates/create_debate.rb +1 -1
  8. data/app/commands/decidim/debates/update_debate.rb +1 -1
  9. data/app/controllers/decidim/debates/admin/debate_closes_controller.rb +0 -1
  10. data/app/controllers/decidim/debates/debates_controller.rb +8 -18
  11. data/app/controllers/decidim/debates/orderable.rb +3 -3
  12. data/app/forms/decidim/debates/admin/close_debate_form.rb +4 -2
  13. data/app/forms/decidim/debates/admin/debate_form.rb +2 -3
  14. data/app/forms/decidim/debates/close_debate_form.rb +4 -2
  15. data/app/forms/decidim/debates/debate_form.rb +6 -5
  16. data/app/helpers/decidim/debates/application_helper.rb +5 -14
  17. data/app/models/decidim/debates/debate.rb +16 -2
  18. data/app/presenters/decidim/debates/debate_presenter.rb +8 -3
  19. data/app/serializers/decidim/debates/{data_portability_debate_serializer.rb → download_your_data_debate_serializer.rb} +2 -2
  20. data/app/services/decidim/debates/debate_search.rb +13 -24
  21. data/app/views/decidim/debates/admin/debates/edit.html.erb +0 -1
  22. data/app/views/decidim/debates/admin/debates/index.html.erb +0 -1
  23. data/app/views/decidim/debates/admin/debates/new.html.erb +0 -1
  24. data/app/views/decidim/debates/debates/_filters.html.erb +5 -5
  25. data/app/views/decidim/debates/debates/show.html.erb +2 -2
  26. data/config/locales/am-ET.yml +1 -0
  27. data/config/locales/ar.yml +2 -2
  28. data/config/locales/bg.yml +1 -2
  29. data/config/locales/ca.yml +3 -3
  30. data/config/locales/cs.yml +3 -3
  31. data/config/locales/da.yml +1 -0
  32. data/config/locales/de.yml +2 -6
  33. data/config/locales/el.yml +1 -88
  34. data/config/locales/en.yml +1 -2
  35. data/config/locales/eo.yml +1 -0
  36. data/config/locales/es-MX.yml +2 -2
  37. data/config/locales/es-PY.yml +2 -2
  38. data/config/locales/es.yml +2 -2
  39. data/config/locales/et.yml +1 -0
  40. data/config/locales/eu.yml +53 -56
  41. data/config/locales/fi-plain.yml +3 -3
  42. data/config/locales/fi.yml +3 -3
  43. data/config/locales/fr-CA.yml +3 -3
  44. data/config/locales/fr.yml +2 -2
  45. data/config/locales/ga-IE.yml +1 -1
  46. data/config/locales/gl.yml +2 -1
  47. data/config/locales/hr.yml +1 -0
  48. data/config/locales/hu.yml +2 -66
  49. data/config/locales/id-ID.yml +1 -1
  50. data/config/locales/is-IS.yml +5 -2
  51. data/config/locales/it.yml +4 -3
  52. data/config/locales/ja.yml +3 -3
  53. data/config/locales/ko.yml +1 -0
  54. data/config/locales/lb.yml +1 -5
  55. data/config/locales/lt.yml +1 -244
  56. data/config/locales/lv.yml +1 -1
  57. data/config/locales/mt.yml +1 -0
  58. data/config/locales/nl.yml +3 -3
  59. data/config/locales/no.yml +3 -2
  60. data/config/locales/om-ET.yml +1 -0
  61. data/config/locales/pl.yml +2 -5
  62. data/config/locales/pt-BR.yml +2 -4
  63. data/config/locales/pt.yml +2 -2
  64. data/config/locales/ro-RO.yml +2 -2
  65. data/config/locales/ru.yml +1 -1
  66. data/config/locales/si-LK.yml +1 -0
  67. data/config/locales/sk.yml +1 -1
  68. data/config/locales/sl.yml +1 -0
  69. data/config/locales/so-SO.yml +1 -0
  70. data/config/locales/sr-CS.yml +1 -0
  71. data/config/locales/sv.yml +2 -2
  72. data/config/locales/sw-KE.yml +1 -0
  73. data/config/locales/ti-ER.yml +1 -0
  74. data/config/locales/tr-TR.yml +3 -3
  75. data/config/locales/uk.yml +1 -1
  76. data/config/locales/val-ES.yml +1 -0
  77. data/config/locales/vi.yml +1 -0
  78. data/config/locales/zh-CN.yml +1 -1
  79. data/config/locales/zh-TW.yml +1 -238
  80. data/db/migrate/20181003081235_fix_user_groups_ids_on_debates.rb +2 -13
  81. data/db/migrate/20181016132850_add_organization_as_author_to_debates.rb +3 -0
  82. data/lib/decidim/debates/test/factories.rb +1 -1
  83. data/lib/decidim/debates/version.rb +1 -1
  84. metadata +15 -24
  85. data/config/environment.rb +0 -3
  86. data/config/locales/fa-IR.yml +0 -1
  87. data/config/locales/gn-PY.yml +0 -1
  88. data/config/locales/ka-GE.yml +0 -1
  89. data/config/locales/kaa.yml +0 -1
  90. data/config/locales/lo-LA.yml +0 -1
  91. data/config/locales/oc-FR.yml +0 -1
  92. data/config/locales/sq-AL.yml +0 -1
  93. data/config/locales/th-TH.yml +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f24fbba714f457bcd604e951fbe044ac5545a63838050922e103ddc63a74d6ee
4
- data.tar.gz: d39eea631c017fbee2e8fcf6a8597f6e63bab65c62a7b9db0b5bebad7ea41a3b
3
+ metadata.gz: 967f139c27f1e4c684f439cdb3bfad76159b6bf08bb78f9d71ac775bda7e1cf4
4
+ data.tar.gz: 4acd40bffd8654d6acde8802f76da818ffbbffdca7eb6bb14985e1e5de104548
5
5
  SHA512:
6
- metadata.gz: a286ecfabcdffbf30c72b9436883d32b6a7060bf8fbfca5b739aab11dd96e83677a13d4a51883b8053decb1b9951e594c60178bd7182c6460dacea4b34bf989d
7
- data.tar.gz: bfc093c8e4a09e32b9d2a5124acfb39ebd33b90d325bd9c7860ca61da2f579719dab9ebc287d2d62a5c0c7f66eb2a82db090a5f11cc5fe39a52ce8cadef5af66
6
+ metadata.gz: d6dfd083edcad26a2766e9457e5150df312afcdc04476a6eec1b8daa3d4571850cc8992c81da28087788a6bfd644257701f09da1db582eca771d146d39ba50c1
7
+ data.tar.gz: 873bdd3aa7b18458e59491838daf46b6a74dc80c91ecfcd467b3effa747fc667b87702455a5594ab9b26c2e3241f2d02a82d9c0729cdef3cbefd4001511a78f0
@@ -32,7 +32,7 @@ module Decidim
32
32
  private
33
33
 
34
34
  def title
35
- presenter.title(html_escape: true)
35
+ presenter.title
36
36
  end
37
37
 
38
38
  def body
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Debates
5
5
  module Admin
6
6
  # A command with all the business logic when an admin closes a debate.
7
- class CloseDebate < Rectify::Command
7
+ class CloseDebate < Decidim::Command
8
8
  # Public: Initializes the command.
9
9
  #
10
10
  # form - A form object with the params.
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user creates a Debate from the admin
7
7
  # panel.
8
- class CreateDebate < Rectify::Command
8
+ class CreateDebate < Decidim::Command
9
9
  def initialize(form)
10
10
  @form = form
11
11
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user changes a Debate from the admin
7
7
  # panel.
8
- class UpdateDebate < Rectify::Command
8
+ class UpdateDebate < Decidim::Command
9
9
  # Initializes a UpdateDebate Command.
10
10
  #
11
11
  # form - The form from which to get the data.
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Debates
5
5
  # A command with all the business logic when a user updates a debate.
6
- class CloseDebate < Rectify::Command
6
+ class CloseDebate < Decidim::Command
7
7
  # Public: Initializes the command.
8
8
  #
9
9
  # form - A form object with the params.
@@ -4,7 +4,7 @@ module Decidim
4
4
  module Debates
5
5
  # This command is executed when the user creates a Debate from the public
6
6
  # views.
7
- class CreateDebate < Rectify::Command
7
+ class CreateDebate < Decidim::Command
8
8
  def initialize(form)
9
9
  @form = form
10
10
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Debates
5
5
  # A command with all the business logic when a user updates a debate.
6
- class UpdateDebate < Rectify::Command
6
+ class UpdateDebate < Decidim::Command
7
7
  # Public: Initializes the command.
8
8
  #
9
9
  # form - A form object with the params.
@@ -17,7 +17,6 @@ module Decidim
17
17
  enforce_permission_to :close, :debate, debate: debate
18
18
 
19
19
  @form = form(Admin::CloseDebateForm).from_params(params)
20
- @form.debate = debate
21
20
 
22
21
  CloseDebate.call(@form) do
23
22
  on(:ok) do |_debate|
@@ -53,7 +53,6 @@ module Decidim
53
53
  enforce_permission_to :edit, :debate, debate: debate
54
54
 
55
55
  @form = form(DebateForm).from_params(params)
56
- @form.debate = debate
57
56
 
58
57
  UpdateDebate.call(@form) do
59
58
  on(:ok) do |debate|
@@ -72,7 +71,6 @@ module Decidim
72
71
  enforce_permission_to :close, :debate, debate: debate
73
72
 
74
73
  @form = form(CloseDebateForm).from_params(params)
75
- @form.debate = debate
76
74
 
77
75
  CloseDebate.call(@form) do
78
76
  on(:ok) do |debate|
@@ -98,7 +96,7 @@ module Decidim
98
96
  end
99
97
 
100
98
  def debates
101
- @debates ||= reorder(search.results)
99
+ @debates ||= reorder(search.result)
102
100
  end
103
101
 
104
102
  def debate
@@ -109,26 +107,18 @@ module Decidim
109
107
  @close_debate_form ||= form(CloseDebateForm).from_model(debate)
110
108
  end
111
109
 
112
- def search_klass
113
- DebateSearch
114
- end
115
-
116
- def default_search_params
117
- {
118
- page: params[:page],
119
- per_page: 12
120
- }
110
+ def search_collection
111
+ Debate.where(component: current_component).not_hidden
121
112
  end
122
113
 
123
114
  def default_filter_params
124
115
  {
125
- search_text: "",
126
- origin: %w(official citizens user_group),
116
+ search_text_cont: "",
117
+ with_any_origin: %w(official participants user_group),
127
118
  activity: "all",
128
- category_id: default_filter_category_params,
129
- scope_id: default_filter_scope_params,
130
- status: "all",
131
- state: %w(open closed)
119
+ with_any_category: default_filter_category_params,
120
+ with_any_scope: default_filter_scope_params,
121
+ with_any_state: %w(open closed)
132
122
  }
133
123
  end
134
124
  end
@@ -24,11 +24,11 @@ module Decidim
24
24
  def reorder(debates)
25
25
  case order
26
26
  when "recent"
27
- debates.order("created_at DESC")
27
+ debates.order(created_at: :desc)
28
28
  when "commented"
29
- debates.order("comments_count DESC")
29
+ debates.order(comments_count: :desc)
30
30
  when "updated"
31
- debates.order("updated_at DESC")
31
+ debates.order(updated_at: :desc)
32
32
  when "random"
33
33
  debates.order_randomly(random_seed)
34
34
  else
@@ -14,8 +14,6 @@ module Decidim
14
14
  validates translated_attribute, length: { minimum: 10, maximum: 10_000 }, if: ->(record) { record.default_locale?(locale) }
15
15
  end
16
16
 
17
- attribute :debate, Debate
18
-
19
17
  validates :debate, presence: true
20
18
  validate :user_can_close_debate
21
19
 
@@ -23,6 +21,10 @@ module Decidim
23
21
  debate&.closed_at || Time.current
24
22
  end
25
23
 
24
+ def debate
25
+ @debate ||= Debate.find_by(id: id)
26
+ end
27
+
26
28
  private
27
29
 
28
30
  def user_can_close_debate
@@ -29,7 +29,6 @@ module Decidim
29
29
  validates :scope_id, scope_belongs_to_component: true, if: ->(form) { form.scope_id.present? }
30
30
 
31
31
  def map_model(model)
32
- self.finite = model.start_time.present? && model.end_time.present?
33
32
  self.decidim_category_id = model.categorization.decidim_category_id if model.categorization
34
33
  presenter = DebatePresenter.new(model)
35
34
 
@@ -47,14 +46,14 @@ module Decidim
47
46
  #
48
47
  # Returns a Decidim::Scope
49
48
  def scope
50
- @scope ||= @scope_id ? current_component.scopes.find_by(id: @scope_id) : current_component.scope
49
+ @scope ||= @attributes["scope_id"].value ? current_component.scopes.find_by(id: @attributes["scope_id"].value) : current_component.scope
51
50
  end
52
51
 
53
52
  # Scope identifier
54
53
  #
55
54
  # Returns the scope identifier related to the meeting
56
55
  def scope_id
57
- @scope_id || scope&.id
56
+ super || scope&.id
58
57
  end
59
58
 
60
59
  private
@@ -7,7 +7,6 @@ module Decidim
7
7
  mimic :debate
8
8
 
9
9
  attribute :conclusions, Decidim::Attributes::CleanString
10
- attribute :debate, Debate
11
10
 
12
11
  validates :debate, presence: true
13
12
  validates :conclusions, presence: true, length: { minimum: 10, maximum: 10_000 }
@@ -19,7 +18,6 @@ module Decidim
19
18
 
20
19
  def map_model(debate)
21
20
  super
22
- self.debate = debate
23
21
 
24
22
  # Debates can be translated in different languages from the admin but
25
23
  # the public form doesn't allow it. When a user closes a debate the
@@ -27,6 +25,10 @@ module Decidim
27
25
  self.conclusions = debate.conclusions&.values&.first
28
26
  end
29
27
 
28
+ def debate
29
+ @debate ||= Debate.find_by(id: id)
30
+ end
31
+
30
32
  private
31
33
 
32
34
  def user_can_close_debate
@@ -11,7 +11,6 @@ module Decidim
11
11
  attribute :category_id, Integer
12
12
  attribute :scope_id, Integer
13
13
  attribute :user_group_id, Integer
14
- attribute :debate, Debate
15
14
 
16
15
  validates :title, presence: true
17
16
  validates :description, presence: true
@@ -22,8 +21,6 @@ module Decidim
22
21
 
23
22
  def map_model(debate)
24
23
  super
25
- self.debate = debate
26
-
27
24
  # Debates can be translated in different languages from the admin but
28
25
  # the public form doesn't allow it. When a user creates a debate the
29
26
  # user locale is taken as the text locale.
@@ -45,14 +42,18 @@ module Decidim
45
42
  #
46
43
  # Returns a Decidim::Scope
47
44
  def scope
48
- @scope ||= @scope_id ? current_component.scopes.find_by(id: @scope_id) : current_component.scope
45
+ @scope ||= @attributes["scope_id"].value ? current_component.scopes.find_by(id: @attributes["scope_id"].value) : current_component.scope
49
46
  end
50
47
 
51
48
  # Scope identifier
52
49
  #
53
50
  # Returns the scope identifier related to the debate
54
51
  def scope_id
55
- @scope_id || scope&.id
52
+ super || scope&.id
53
+ end
54
+
55
+ def debate
56
+ @debate ||= Debate.find_by(id: id)
56
57
  end
57
58
 
58
59
  private
@@ -15,23 +15,14 @@ module Decidim
15
15
  # If the debate is official or the rich text editor is enabled on the
16
16
  # frontend, the debate description is considered as safe content.
17
17
  def safe_content?
18
- rich_text_editor_in_public_views? || safe_content_admin?
19
- end
20
-
21
- # For admin entered content, the debate body can contain certain extra
22
- # tags, such as iframes.
23
- def safe_content_admin?
24
- debate&.official?
18
+ debate&.official? || rich_text_editor_in_public_views?
25
19
  end
26
20
 
27
21
  # If the content is safe, HTML tags are sanitized, otherwise, they are stripped.
28
22
  def render_debate_description(debate)
29
- sanitized = render_sanitized_content(debate, :description)
30
- if safe_content?
31
- Decidim::ContentProcessor.render_without_format(sanitized).html_safe
32
- else
33
- Decidim::ContentProcessor.render(sanitized, "div")
34
- end
23
+ description = present(debate).description(strip_tags: !safe_content?, links: true)
24
+
25
+ safe_content? ? decidim_sanitize_editor(description) : simple_format(description)
35
26
  end
36
27
 
37
28
  # Returns :text_area or :editor based on current_component settings.
@@ -44,7 +35,7 @@ module Decidim
44
35
  def filter_origin_values
45
36
  origin_values = []
46
37
  origin_values << TreePoint.new("official", t("decidim.debates.debates.filters.official"))
47
- origin_values << TreePoint.new("citizens", t("decidim.debates.debates.filters.citizens"))
38
+ origin_values << TreePoint.new("participants", t("decidim.debates.debates.filters.participants"))
48
39
  origin_values << TreePoint.new("user_group", t("decidim.debates.debates.filters.user_groups")) if current_organization.user_groups_enabled?
49
40
 
50
41
  TreeNode.new(TreePoint.new("", t("decidim.debates.debates.filters.all")), origin_values)
@@ -18,13 +18,14 @@ module Decidim
18
18
  include Decidim::HasReference
19
19
  include Decidim::Traceable
20
20
  include Decidim::Loggable
21
- include Decidim::DataPortability
21
+ include Decidim::DownloadYourData
22
22
  include Decidim::NewsletterParticipant
23
23
  include Decidim::Searchable
24
24
  include Decidim::TranslatableResource
25
25
  include Decidim::TranslatableAttributes
26
26
  include Decidim::Endorsable
27
27
  include Decidim::Randomable
28
+ include Decidim::FilterableResource
28
29
 
29
30
  belongs_to :last_comment_by, polymorphic: true, foreign_type: "last_comment_by_type", optional: true
30
31
  component_manifest_name "debates"
@@ -53,6 +54,7 @@ module Decidim
53
54
  }
54
55
  )
55
56
  }
57
+ scope_search_multi :with_any_state, [:open, :closed]
56
58
 
57
59
  def self.log_presenter_class_for(_log)
58
60
  Decidim::Debates::AdminLog::DebatePresenter
@@ -141,7 +143,7 @@ module Decidim
141
143
  end
142
144
 
143
145
  def self.export_serializer
144
- Decidim::Debates::DataPortabilityDebateSerializer
146
+ Decidim::Debates::DownloadYourDataDebateSerializer
145
147
  end
146
148
 
147
149
  def self.newsletter_participant_ids(component)
@@ -193,6 +195,18 @@ module Decidim
193
195
  end
194
196
  # rubocop:enable Rails/SkipsModelValidations
195
197
 
198
+ # Create i18n ransackers for :title and :description.
199
+ # Create the :search_text ransacker alias for searching from both of these.
200
+ ransacker_i18n_multi :search_text, [:title, :description]
201
+
202
+ def self.ransackable_scopes(_auth_object = nil)
203
+ [:with_any_state, :with_any_origin, :with_any_category, :with_any_scope]
204
+ end
205
+
206
+ def self.ransack(params = {}, options = {})
207
+ DebateSearch.new(self, params, options)
208
+ end
209
+
196
210
  private
197
211
 
198
212
  def comments_blocked?
@@ -8,7 +8,6 @@ module Decidim
8
8
  class DebatePresenter < Decidim::ResourcePresenter
9
9
  include Decidim::TranslationsHelper
10
10
  include Decidim::ResourceHelper
11
- include Decidim::SanitizeHelper
12
11
  include ActionView::Helpers::DateHelper
13
12
 
14
13
  def debate
@@ -31,10 +30,16 @@ module Decidim
31
30
  super debate.title, links, html_escape, all_locales
32
31
  end
33
32
 
34
- def description(strip_tags: false, extras: true, links: false, all_locales: false)
33
+ def description(strip_tags: false, links: false, all_locales: false)
35
34
  return unless debate
36
35
 
37
- content_handle_locale(debate.description, all_locales, extras, links, strip_tags)
36
+ handle_locales(debate.description, all_locales) do |content|
37
+ content = strip_tags(content) if strip_tags
38
+ renderer = Decidim::ContentRenderers::HashtagRenderer.new(content)
39
+ content = renderer.render(links: links).html_safe
40
+ content = Decidim::ContentRenderers::LinkRenderer.new(content).render if links
41
+ content
42
+ end
38
43
  end
39
44
 
40
45
  def last_comment_at
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Decidim
4
4
  module Debates
5
- class DataPortabilityDebateSerializer < Decidim::Exporters::Serializer
6
- # Serializes a Debate for data portability
5
+ class DownloadYourDataDebateSerializer < Decidim::Exporters::Serializer
6
+ # Serializes a Debate for download your data
7
7
  def serialize
8
8
  {
9
9
  id: resource.id,
@@ -2,35 +2,24 @@
2
2
 
3
3
  module Decidim
4
4
  module Debates
5
- # This class handles search and filtering of debates. Needs a
6
- # `current_component` param with a `Decidim::Component` in order to
7
- # find the debates.
5
+ # This service scopes the debate searches with parameters that cannot be
6
+ # passed from the user interface.
8
7
  class DebateSearch < ResourceSearch
9
- text_search_fields :title, :description
8
+ attr_reader :activity
10
9
 
11
- # Public: Initializes the service.
12
- # component - A Decidim::Component to get the debates from.
13
- # page - The page number to paginate the results.
14
- # per_page - The number of debates to return per page.
15
- def initialize(options = {})
16
- super(Debate.not_hidden, options)
17
- end
10
+ def build(params)
11
+ @activity = params[:activity]
18
12
 
19
- # Handle the activity filter
20
- def search_activity
21
- case activity
22
- when "commented"
23
- query.commented_by(user)
24
- when "my_debates"
25
- query.authored_by(user)
26
- else # Assume 'all'
27
- query
13
+ if params[:activity] && user
14
+ case params[:activity]
15
+ when "commented"
16
+ add_scope(:commented_by, user)
17
+ when "my_debates"
18
+ add_scope(:authored_by, user)
19
+ end
28
20
  end
29
- end
30
21
 
31
- # Handle the state filter
32
- def search_state
33
- apply_scopes(%w(open closed), state)
22
+ super
34
23
  end
35
24
  end
36
25
  end
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, html: { class: "form edit_debate" }) do |f| %>
3
2
  <%= render partial: "form", object: f, locals: { title: t(".title") } %>
4
3
 
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <div class="card">
3
2
  <div class="card-divider">
4
3
  <h2 class="card-title">
@@ -1,4 +1,3 @@
1
- <% add_decidim_page_title(t(".title")) %>
2
1
  <%= decidim_form_for(@form, html: { class: "form new_debate" }) do |f| %>
3
2
  <%= render partial: "form", object: f, locals: { title: t(".title") } %>
4
3
 
@@ -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 :search_text, label: false, class: "input-group-field", placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %>
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="debates">
10
10
  <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
@@ -14,17 +14,17 @@
14
14
  </div>
15
15
  </div>
16
16
 
17
- <%= form.check_boxes_tree :state, filter_debates_state_values, legend_title: t(".state"), "aria-controls": "debates" %>
17
+ <%= form.check_boxes_tree :with_any_state, filter_debates_state_values, legend_title: t(".state"), "aria-controls": "debates" %>
18
18
 
19
19
  <% if current_component.has_subscopes? %>
20
- <%= form.check_boxes_tree :scope_id, filter_scopes_values, legend_title: t(".scope"), "aria-controls": "debates" %>
20
+ <%= form.check_boxes_tree :with_any_scope, filter_scopes_values, legend_title: t(".scope"), "aria-controls": "debates" %>
21
21
  <% end %>
22
22
 
23
23
  <% if current_participatory_space.categories.any? %>
24
- <%= form.check_boxes_tree :category_id, filter_categories_values, legend_title: t(".category"), "aria-controls": "debates" %>
24
+ <%= form.check_boxes_tree :with_any_category, filter_categories_values, legend_title: t(".category"), "aria-controls": "debates" %>
25
25
  <% end %>
26
26
 
27
- <%= form.check_boxes_tree :origin, filter_origin_values, legend_title: t(".origin"), "aria-controls": "debates" %>
27
+ <%= form.check_boxes_tree :with_any_origin, filter_origin_values, legend_title: t(".origin"), "aria-controls": "debates" %>
28
28
 
29
29
  <% if current_user %>
30
30
  <%= form.collection_radio_buttons :activity, activity_filter_values, :first, :last, { legend_title: t(".activity") }, "aria-controls": "debates" %>
@@ -108,12 +108,12 @@ edit_link(
108
108
 
109
109
  <% if translated_attribute(debate.instructions).present? %>
110
110
  <div class="callout secondary">
111
- <%= decidim_sanitize_editor_admin(simple_format(translated_attribute(debate.instructions), {}, sanitize: false)) %>
111
+ <%= decidim_sanitize_editor(simple_format(translated_attribute(debate.instructions), {}, sanitize: false)) %>
112
112
  </div>
113
113
  <% end %>
114
114
  <% if translated_attribute(debate.information_updates).present? %>
115
115
  <div class="callout success">
116
- <%= decidim_sanitize_editor_admin(simple_format(translated_attribute(debate.information_updates), {}, sanitize: false)) %>
116
+ <%= decidim_sanitize_editor(simple_format(translated_attribute(debate.information_updates), {}, sanitize: false)) %>
117
117
  </div>
118
118
  <% end %>
119
119
 
@@ -1 +1,2 @@
1
+ ---
1
2
  am:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ar:
2
3
  activemodel:
3
4
  attributes:
@@ -84,14 +85,13 @@ ar:
84
85
  debate:
85
86
  participate: مشاركة
86
87
  filters:
87
- activity: نشاطي
88
88
  all: الكل
89
89
  category: الفئة
90
90
  category_prompt: اختر تصنيف
91
- citizens: المواطنين
92
91
  my_debates: مناقشاتي
93
92
  official: الرسمية
94
93
  origin: الأصل
94
+ participants: المشاركون
95
95
  search: بحث
96
96
  user_groups: الفِرَق
97
97
  filters_small_view:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  bg:
2
3
  activemodel:
3
4
  attributes:
@@ -8,8 +9,6 @@ bg:
8
9
  decidim:
9
10
  debates:
10
11
  debates:
11
- filters:
12
- user_groups: Групи
13
12
  show:
14
13
  groups_count: Групи
15
14
  last_comment_by: Последно коментиран от
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ca:
2
3
  activemodel:
3
4
  attributes:
@@ -10,7 +11,6 @@ ca:
10
11
  end_time: Data de finalització
11
12
  information_updates: Actualitzacions d'informació
12
13
  instructions: Instruccions per participar
13
- scope_id: Àmbit
14
14
  start_time: Data d'inici
15
15
  title: Títol
16
16
  user_group_id: Crea un debat com
@@ -48,7 +48,7 @@ ca:
48
48
  debates:
49
49
  actions:
50
50
  close: Tanca
51
- confirm_destroy: Segur?
51
+ confirm_destroy: N'estàs segura?
52
52
  destroy: Suprimeix
53
53
  edit: Edita
54
54
  new: Nou %{name}
@@ -118,11 +118,11 @@ ca:
118
118
  all: Tots
119
119
  category: Categoria
120
120
  category_prompt: Selecciona una categoria
121
- citizens: Ciutadania
122
121
  commented: Comentat
123
122
  my_debates: Els meus debats
124
123
  official: Oficial
125
124
  origin: Origen
125
+ participants: Participants
126
126
  scope: Àmbit
127
127
  search: Cerca
128
128
  state: Estat
@@ -1,3 +1,4 @@
1
+ ---
1
2
  cs:
2
3
  activemodel:
3
4
  attributes:
@@ -10,7 +11,6 @@ cs:
10
11
  end_time: Končí v
11
12
  information_updates: Aktualizace informací
12
13
  instructions: Pokyny k účasti
13
- scope_id: Oblast působnosti
14
14
  start_time: Začíná v
15
15
  title: Titul
16
16
  user_group_id: Vytvořte debatu jako
@@ -122,11 +122,11 @@ cs:
122
122
  all: Vše
123
123
  category: Kategorie
124
124
  category_prompt: Vyberte kategorii
125
- citizens: Občané
126
125
  commented: Okomentováno
127
126
  my_debates: Moje rozpravy
128
127
  official: Oficiální
129
128
  origin: Původ
129
+ participants: Účastníci
130
130
  scope: Oblast působnosti
131
131
  search: Hledat
132
132
  state: Stav
@@ -164,7 +164,7 @@ cs:
164
164
  groups_count: Skupiny
165
165
  last_comment_by: Poslední komentář od
166
166
  no_comments_yet: Zatím žádné komentáře
167
- open: Otevřená diskuse
167
+ open: Otevřít diskusi
168
168
  participants_count: Účastníci
169
169
  update:
170
170
  invalid: Při aktualizaci rozpravy došlo k chybě.
@@ -1 +1,2 @@
1
+ ---
1
2
  da: