decidim-proposals 0.28.1 → 0.28.3
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.
- checksums.yaml +4 -4
- data/app/cells/decidim/proposals/proposal_l_cell.rb +1 -1
- data/app/controllers/concerns/decidim/proposals/orderable.rb +1 -1
- data/app/helpers/decidim/proposals/application_helper.rb +1 -1
- data/app/packs/entrypoints/participatory_texts_admin.js +2 -0
- data/app/packs/stylesheets/decidim/proposals/admin/participatory_texts.scss +23 -0
- data/app/presenters/decidim/proposals/admin_log/proposal_presenter.rb +1 -5
- data/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb +1 -3
- data/app/presenters/decidim/proposals/log/valuation_assignment_presenter.rb +1 -1
- data/app/views/decidim/proposals/admin/participatory_texts/index.html.erb +6 -3
- data/app/views/decidim/proposals/admin/proposal_answers/_form.html.erb +1 -1
- data/app/views/decidim/proposals/admin/proposals/_bulk-actions.html.erb +10 -6
- data/app/views/decidim/proposals/admin/proposals/index.html.erb +2 -0
- data/app/views/decidim/proposals/proposals/_proposal_aside.html.erb +4 -2
- data/app/views/decidim/proposals/proposals/compare.html.erb +1 -1
- data/app/views/decidim/proposals/proposals/preview.html.erb +1 -1
- data/config/assets.rb +1 -0
- data/config/locales/ar.yml +1 -7
- data/config/locales/bg.yml +696 -1
- data/config/locales/ca.yml +10 -10
- data/config/locales/cs.yml +5 -5
- data/config/locales/de.yml +20 -20
- data/config/locales/el.yml +0 -6
- data/config/locales/en.yml +5 -5
- data/config/locales/es-MX.yml +6 -6
- data/config/locales/es-PY.yml +6 -6
- data/config/locales/es.yml +6 -6
- data/config/locales/eu.yml +9 -9
- data/config/locales/fi-plain.yml +4 -4
- data/config/locales/fi.yml +13 -13
- data/config/locales/fr-CA.yml +6 -6
- data/config/locales/fr.yml +6 -6
- data/config/locales/ga-IE.yml +6 -0
- data/config/locales/gl.yml +1 -7
- data/config/locales/hu.yml +1 -5
- data/config/locales/id-ID.yml +0 -2
- data/config/locales/is-IS.yml +0 -3
- data/config/locales/it.yml +1 -3
- data/config/locales/ja.yml +6 -6
- data/config/locales/lt.yml +0 -6
- data/config/locales/lv.yml +0 -2
- data/config/locales/nl.yml +1 -7
- data/config/locales/no.yml +0 -6
- data/config/locales/pl.yml +103 -2
- data/config/locales/pt-BR.yml +0 -2
- data/config/locales/pt.yml +0 -6
- data/config/locales/ro-RO.yml +0 -5
- data/config/locales/ru.yml +0 -3
- data/config/locales/sk.yml +0 -2
- data/config/locales/sv.yml +104 -52
- data/config/locales/tr-TR.yml +3 -3
- data/config/locales/uk.yml +0 -3
- data/config/locales/zh-CN.yml +0 -2
- data/config/locales/zh-TW.yml +0 -6
- data/lib/decidim/proposals/component.rb +2 -4
- data/lib/decidim/proposals/proposal_serializer.rb +51 -0
- data/lib/decidim/proposals/seeds.rb +5 -1
- data/lib/decidim/proposals/test/factories.rb +13 -1
- data/lib/decidim/proposals/version.rb +1 -1
- metadata +26 -25
- data/app/presenters/decidim/proposals/log/resource_presenter.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e4bd14ec5e23a0ba39c81c825c919ceaadbba6c9a2f47498a8f1a2d0bf59dd6
|
4
|
+
data.tar.gz: 757238cf1ff370f483d05ce6a569f4cd41aa5f06191342b374a583babc10d570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a08f20046706481335121d31d830f25e2255b76cec1b93aa4bc38e63145498aa8111995505a8f4ac007cbf245d252466b90f744d5bd51b80fc9e74bc2db82af3
|
7
|
+
data.tar.gz: 3ae92e1d44a2c9bdbce252029947d91dca471f9a00d3f932980ce55f2b796e4ecd7abf83c394f746dd4651dcb736f7c2bc88abc566cd72127b4fa4ca7dfc4066
|
@@ -29,7 +29,7 @@ module Decidim
|
|
29
29
|
hash << model.endorsements_count
|
30
30
|
hash << model.comments_count
|
31
31
|
hash << Digest::MD5.hexdigest(model.component.cache_key_with_version)
|
32
|
-
hash << Digest::MD5.hexdigest(
|
32
|
+
hash << Digest::MD5.hexdigest(resource_image_url) if resource_image_url
|
33
33
|
hash << render_space? ? 1 : 0
|
34
34
|
if current_user
|
35
35
|
hash << current_user.cache_key_with_version
|
@@ -35,7 +35,7 @@ module Decidim
|
|
35
35
|
|
36
36
|
def fetch_default_order
|
37
37
|
default_order = current_settings.default_sort_order.presence || component_settings.default_sort_order
|
38
|
-
return order_by_default if default_order == "
|
38
|
+
return order_by_default if default_order == "automatic"
|
39
39
|
|
40
40
|
possible_orders.include?(default_order) ? default_order : order_by_default
|
41
41
|
end
|
@@ -139,7 +139,7 @@ module Decidim
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def show_voting_rules?
|
142
|
-
return false
|
142
|
+
return false if !votes_enabled? || current_settings.votes_blocked?
|
143
143
|
|
144
144
|
return true if vote_limit_enabled?
|
145
145
|
return true if threshold_per_proposal_enabled?
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#participatory-text {
|
2
|
+
li {
|
3
|
+
@apply py-4 hover:cursor-move;
|
4
|
+
|
5
|
+
a {
|
6
|
+
@apply font-bold flex;
|
7
|
+
|
8
|
+
> svg {
|
9
|
+
@apply text-2xl fill-black;
|
10
|
+
}
|
11
|
+
|
12
|
+
&[aria-expanded="true"] {
|
13
|
+
& > svg {
|
14
|
+
@apply rotate-90 transition-transform;
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
span {
|
19
|
+
@apply ml-auto;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
@@ -15,13 +15,9 @@ module Decidim
|
|
15
15
|
class ProposalPresenter < Decidim::Log::BasePresenter
|
16
16
|
private
|
17
17
|
|
18
|
-
def resource_presenter
|
19
|
-
@resource_presenter ||= Decidim::Proposals::Log::ResourcePresenter.new(action_log.resource, h, action_log.extra["resource"])
|
20
|
-
end
|
21
|
-
|
22
18
|
def diff_fields_mapping
|
23
19
|
{
|
24
|
-
title:
|
20
|
+
title: :i18n,
|
25
21
|
body: "Decidim::Proposals::AdminLog::ValueTypes::ProposalTitleBodyPresenter",
|
26
22
|
state: "Decidim::Proposals::AdminLog::ValueTypes::ProposalStatePresenter",
|
27
23
|
answered_at: :date,
|
data/app/presenters/decidim/proposals/admin_log/value_types/proposal_title_body_presenter.rb
CHANGED
@@ -5,12 +5,10 @@ module Decidim
|
|
5
5
|
module AdminLog
|
6
6
|
module ValueTypes
|
7
7
|
class ProposalTitleBodyPresenter < Decidim::Log::ValueTypes::DefaultPresenter
|
8
|
-
include Decidim::TranslatableAttributes
|
9
|
-
|
10
8
|
def present
|
11
9
|
return unless value
|
12
10
|
|
13
|
-
translated_value =
|
11
|
+
translated_value = h.decidim_escape_translated(value)
|
14
12
|
return if translated_value.blank?
|
15
13
|
|
16
14
|
renderer = Decidim::ContentRenderers::HashtagRenderer.new(translated_value)
|
@@ -15,6 +15,7 @@
|
|
15
15
|
<div class="row column">
|
16
16
|
<p class="mt-3"><%= t(".info_1") %></p>
|
17
17
|
<ul id="participatory-text" class="draggable-list js-connect js-list-actives accordion mb-m mt-2.5 ml-2.5 mr-2.5"
|
18
|
+
data-component="accordion"
|
18
19
|
data-accordion
|
19
20
|
data-sort-url="#"
|
20
21
|
data-multi-expand="true"
|
@@ -22,11 +23,13 @@
|
|
22
23
|
<%= form.fields_for(:proposals) do |prop_form| %>
|
23
24
|
<% proposal = @drafts[prop_form.index] %>
|
24
25
|
|
25
|
-
<li class="
|
26
|
-
<a
|
26
|
+
<li class="draggable-content is-active" data-accordion-item draggable="true">
|
27
|
+
<a data-open="true" data-controls="article-<%= proposal.id %>">
|
28
|
+
<%= icon "arrow-right-s-line" %>
|
29
|
+
<%= preview_participatory_text_section_title(proposal) %>
|
27
30
|
<span class="mr-m"><%= icon "menu-line", class: "fill-black" %></span>
|
28
31
|
</a>
|
29
|
-
<div
|
32
|
+
<div data-tab-content id="article-<%= proposal.id %>">
|
30
33
|
<%= render "article-preview", { form: prop_form, proposal: } %>
|
31
34
|
</div>
|
32
35
|
</li>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<h2 class="card-title"><%= t ".title", title: present(proposal).title %></h2>
|
6
6
|
</div>
|
7
7
|
|
8
|
-
<% if
|
8
|
+
<% if Decidim.module_installed?(:templates) %>
|
9
9
|
<%= render "decidim/templates/admin/proposal_answer_templates/template_chooser", form: f %>
|
10
10
|
<% end %>
|
11
11
|
|
@@ -10,13 +10,17 @@
|
|
10
10
|
|
11
11
|
<% if allowed_to? :import, :proposals %>
|
12
12
|
<%= import_dropdown do %>
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<% current_component.manifest.import_manifests.each do |import_manifest| %>
|
17
|
-
<li class="imports--file imports--<%= import_manifest.name %>">
|
18
|
-
<%= link_to import_manifest.message(:label, self), admin_imports_path(current_component, name: import_manifest.name) %>
|
13
|
+
<%= link_to new_proposals_import_path do %>
|
14
|
+
<li class="imports--component imports--proposals">
|
15
|
+
<%= t("actions.import", scope: "decidim.proposals", name: t("models.proposal.name", scope: "decidim.proposals.admin")) %>
|
19
16
|
</li>
|
17
|
+
<% current_component.manifest.import_manifests.each do |import_manifest| %>
|
18
|
+
<%= link_to admin_imports_path(current_component, name: import_manifest.name) do %>
|
19
|
+
<li class="imports--file imports--<%= import_manifest.name %>">
|
20
|
+
<%= import_manifest.message(:label, self) %>
|
21
|
+
</li>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
20
24
|
<% end %>
|
21
25
|
<% end %>
|
22
26
|
<% end %>
|
@@ -6,8 +6,10 @@
|
|
6
6
|
<%= t(".title") %>
|
7
7
|
<span id="js-selected-proposals-count" class="component-counter component-counter--inline" title="<%= t("decidim.proposals.admin.proposals.index.selected") %>"></span>
|
8
8
|
</div>
|
9
|
+
<div class="flex items-center gap-x-4">
|
9
10
|
<%= render partial: "bulk-actions" %>
|
10
11
|
<%= render partial: "decidim/admin/components/resource_action" %>
|
12
|
+
</div>
|
11
13
|
</h1>
|
12
14
|
</div>
|
13
15
|
<%= admin_filter_selector(:proposals) %>
|
@@ -10,7 +10,10 @@
|
|
10
10
|
<% if (@proposal.amendable? && allowed_to?(:edit, :proposal, proposal: @proposal)) || (amendments_enabled? && @proposal.amendable? && current_component.current_settings.amendment_creation_enabled && can_participate_in_private_space?) || amendments_enabled? && can_react_to_emendation?(@proposal) || @proposal.withdrawable_by?(current_user) %>
|
11
11
|
<section class="layout-aside__section layout-aside__buttons">
|
12
12
|
<% if @proposal.amendable? && allowed_to?(:edit, :proposal, proposal: @proposal) %>
|
13
|
-
<%= link_to
|
13
|
+
<%= link_to edit_proposal_path(@proposal), class: "button button__sm button__transparent-secondary w-full" do %>
|
14
|
+
<span><%= t("edit_proposal", scope: "decidim.proposals.proposals.show") %></span>
|
15
|
+
<%= icon "pencil-line" %>
|
16
|
+
<% end %>
|
14
17
|
<% else %>
|
15
18
|
<%= amend_button_for @proposal %>
|
16
19
|
<% end %>
|
@@ -22,7 +25,6 @@
|
|
22
25
|
<% if @proposal.withdrawable_by?(current_user) %>
|
23
26
|
<%= action_authorized_link_to :withdraw, withdraw_proposal_path(@proposal), method: :put, class: "button button__sm button__transparent-secondary w-full", title: t("withdraw_btn_hint", scope: "decidim.proposals.proposals.show" ), data: { confirm: t("withdraw_confirmation_html", scope: "decidim.proposals.proposals.show" ) } do %>
|
24
27
|
<span><%= t("withdraw_proposal", scope: "decidim.proposals.proposals.show") %></span>
|
25
|
-
<%= icon "pencil-line" %>
|
26
28
|
<% end %>
|
27
29
|
<% end %>
|
28
30
|
</section>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<%= render partial: "wizard_header", locals: { callout_help_text_class: "warning" } %>
|
9
9
|
|
10
|
-
<div class="proposal__container my-10">
|
10
|
+
<div class="proposal__container my-10 flex flex-col gap-4">
|
11
11
|
<h2 class="h3 text-secondary"><%= present(@proposal).title(links: true, html_escape: true) %></h2>
|
12
12
|
|
13
13
|
<% unless component_settings.participatory_texts_enabled? %>
|
data/config/assets.rb
CHANGED
@@ -5,5 +5,6 @@ base_path = File.expand_path("..", __dir__)
|
|
5
5
|
Decidim::Webpacker.register_path("#{base_path}/app/packs")
|
6
6
|
Decidim::Webpacker.register_entrypoints(
|
7
7
|
decidim_proposals: "#{base_path}/app/packs/entrypoints/decidim_proposals.js",
|
8
|
+
participatory_texts_admin: "#{base_path}/app/packs/entrypoints/participatory_texts_admin.js",
|
8
9
|
decidim_proposals_admin: "#{base_path}/app/packs/entrypoints/decidim_proposals_admin.js"
|
9
10
|
)
|
data/config/locales/ar.yml
CHANGED
@@ -157,9 +157,7 @@ ar:
|
|
157
157
|
comments_enabled: تم تمكين التعليقات
|
158
158
|
comments_max_length: الحد الأقصى لطول التعليقات (اترك 0 لاستعمال القيمة الافتراضية)
|
159
159
|
default_sort_order: التصنيف الافتراضي للاقتراح
|
160
|
-
default_sort_order_help: الافتراضي يعني أنه إذا تم تمكين الدعم، سيتم عرض المقترحات عشوائياً، وإذا تم حظر الدعم، فسيتم فرزها حسب الأكثر دعم.
|
161
160
|
default_sort_order_options:
|
162
|
-
default: الافتراضي
|
163
161
|
most_commented: صاحبة الأكثر تعليقات
|
164
162
|
most_endorsed: صاحبة أكثر تأييدات
|
165
163
|
most_followed: صاحبة أكثر متابعات
|
@@ -186,7 +184,6 @@ ar:
|
|
186
184
|
proposal_wizard_step_1_help_text: اقتراح الاقتراح "إنشاء" نص مساعدة الخطوة
|
187
185
|
proposal_wizard_step_2_help_text: اقتراح الاقتراح "قارن" نص خطوة المساعدة
|
188
186
|
proposal_wizard_step_3_help_text: نص اقتراح "إكمال" تعليمات نص المعالج
|
189
|
-
proposal_wizard_step_4_help_text: اقتراح الاقتراح "نشر" نص تعليمات الخطوة
|
190
187
|
resources_permissions_enabled: يمكن تعيين أذونات الإجراءات لكل اقتراح
|
191
188
|
scope_id: نطاق
|
192
189
|
scopes_enabled: النطاقات مفعلة
|
@@ -211,9 +208,7 @@ ar:
|
|
211
208
|
creation_enabled: يمكن للمشارِكين إنشاء اقتراحات
|
212
209
|
creation_enabled_readonly: يتم تعطيل هذا الإعداد عند تفعيل وظيفة النصوص التشاركية. لتحميل الاقتراحات كنص تشاركي، يرجى النقر على زر النصوص التشاركية واتباع التعليمات.
|
213
210
|
default_sort_order: التصنيف الافتراضي للاقتراح
|
214
|
-
default_sort_order_help: الافتراضي يعني أنه إذا تم تمكين الدعم، سيتم عرض المقترحات عشوائياً، وإذا تم حظر الدعم، فسيتم فرزها حسب الأكثر دعم.
|
215
211
|
default_sort_order_options:
|
216
|
-
default: الافتراضي
|
217
212
|
most_commented: صاحبة الأكثر تعليقات
|
218
213
|
most_endorsed: صاحبة أكثر تأييدات
|
219
214
|
most_followed: صاحبة أكثر متابعات
|
@@ -742,7 +737,6 @@ ar:
|
|
742
737
|
discard: تجاهل هذه المسودة
|
743
738
|
discard_confirmation: هل أنت متأكد من أنك تريد التخلص من مسودة الاقتراح؟
|
744
739
|
send: معاينة
|
745
|
-
title: تحرير مسودة الاقتراح
|
746
740
|
filters:
|
747
741
|
activity: نشاطي
|
748
742
|
all: الكل
|
@@ -861,7 +855,7 @@ ar:
|
|
861
855
|
step_1: إنشاء اقتراحك
|
862
856
|
step_2: قارن
|
863
857
|
step_3: إكمال
|
864
|
-
step_4:
|
858
|
+
step_4: نشر اقتراحك
|
865
859
|
title: خطوات إنشاء الاقتراحات
|
866
860
|
proposals_picker:
|
867
861
|
choose_proposals: اختيار الاقتراحات
|