decidim-budgets 0.29.1 → 0.29.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/budgets/budgets_list/main_list.erb +1 -1
- data/app/cells/decidim/budgets/budgets_list/show.erb +1 -1
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +6 -2
- data/app/forms/decidim/budgets/admin/budget_form.rb +1 -1
- data/app/forms/decidim/budgets/admin/project_form.rb +1 -1
- data/app/forms/decidim/budgets/admin/project_import_proposals_form.rb +1 -1
- data/app/packs/stylesheets/budgets.scss +6 -2
- data/app/permissions/decidim/budgets/permissions.rb +2 -0
- data/app/views/decidim/budgets/budgets/index.html.erb +1 -1
- data/app/views/decidim/budgets/projects/_order.html.erb +1 -1
- data/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb +1 -1
- data/app/views/decidim/budgets/projects/index.html.erb +10 -2
- data/app/views/decidim/budgets/projects/index.js.erb +10 -0
- data/app/views/decidim/budgets/projects/show.html.erb +14 -9
- data/config/locales/ar.yml +1 -3
- data/config/locales/bg.yml +1 -2
- data/config/locales/bn-BD.yml +1 -0
- data/config/locales/bs-BA.yml +22 -0
- data/config/locales/ca-IT.yml +388 -0
- data/config/locales/ca.yml +1 -1
- data/config/locales/cs.yml +1 -1
- data/config/locales/de.yml +4 -4
- data/config/locales/el.yml +0 -1
- data/config/locales/es-MX.yml +1 -1
- data/config/locales/es-PY.yml +1 -1
- data/config/locales/eu.yml +93 -84
- data/config/locales/fi-plain.yml +15 -15
- data/config/locales/fi.yml +68 -68
- data/config/locales/fr-CA.yml +4 -4
- data/config/locales/fr.yml +3 -3
- data/config/locales/ga-IE.yml +0 -4
- data/config/locales/gl.yml +0 -7
- data/config/locales/hu.yml +2 -3
- data/config/locales/id-ID.yml +0 -3
- data/config/locales/is-IS.yml +0 -3
- data/config/locales/it.yml +23 -5
- data/config/locales/ko.yml +8 -0
- data/config/locales/lb.yml +0 -4
- data/config/locales/lt.yml +0 -1
- data/config/locales/lv.yml +0 -3
- data/config/locales/nl.yml +2 -3
- data/config/locales/no.yml +0 -7
- data/config/locales/pl.yml +0 -1
- data/config/locales/pt-BR.yml +2 -3
- data/config/locales/pt.yml +0 -5
- data/config/locales/ro-RO.yml +1 -2
- data/config/locales/ru.yml +0 -3
- data/config/locales/sk.yml +0 -3
- data/config/locales/sq-AL.yml +10 -3
- data/config/locales/sv.yml +3 -3
- data/config/locales/tr-TR.yml +0 -5
- data/config/locales/uk.yml +0 -3
- data/config/locales/zh-CN.yml +0 -5
- data/config/locales/zh-TW.yml +0 -1
- data/decidim-budgets.gemspec +1 -1
- data/lib/decidim/api/budget_type.rb +6 -0
- data/lib/decidim/api/budgets_type.rb +1 -3
- data/lib/decidim/api/project_type.rb +13 -0
- data/lib/decidim/budgets/version.rb +1 -1
- metadata +16 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb2c40b3a5eb29eb321fb61dd190aca4b01b62baa67c7d707a177a960533c9ff
|
4
|
+
data.tar.gz: 5ddc4377e8081598538121012523991c3448aba16923108b287557cf4d963932
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83210fb9f507d38d1b00baee67316c5223f0e8faf1f7e2bd16d037cac9846d35e4d9c8160e2d7beee0a0ed801dec765f62919fa6019c447bcb6bde0fe0712d74
|
7
|
+
data.tar.gz: b275657a91a71f6fc8b16ca0001777fb2ebe420b7895ad081e8040edc585e66526ad8245e93c688b5a2bcb9cd898b1fc1555f6e2d00531bfaeee5de68d5519e6
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<h2 class="h5 md:h3 decorator"><%= t(:count, scope: i18n_scope, count: budgets.length) %></h2>
|
2
2
|
|
3
|
-
<%= render partial: "decidim/shared/orders", formats: [:html], locals: { orders: AVAILABLE_ORDERS, i18n_scope: "decidim.budgets.budgets_list.orders" } %>
|
3
|
+
<%= render partial: "decidim/shared/orders", formats: [:html], locals: { orders: AVAILABLE_ORDERS, i18n_scope: "decidim.budgets.budgets_list.orders", css_class: "items-start ml-6", b_css_class: "!justify-start pb-0 pl-0" } %>
|
4
4
|
|
5
5
|
<%= render :card_list %>
|
@@ -75,7 +75,7 @@ module Decidim
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def all_proposals
|
78
|
-
Decidim::Proposals::Proposal.where(component: origin_component).accepted
|
78
|
+
Decidim::Proposals::Proposal.where(component: origin_component).published.not_hidden.not_withdrawn.accepted.order(:published_at)
|
79
79
|
end
|
80
80
|
|
81
81
|
def origin_component
|
@@ -87,9 +87,13 @@ module Decidim
|
|
87
87
|
# because otherwise duplicates could be created until the component is
|
88
88
|
# published.
|
89
89
|
original_proposal.linked_resources(:projects, "included_proposals", component_published: false).any? do |project|
|
90
|
-
project.
|
90
|
+
component_budgets.exists?(project.decidim_budgets_budget_id)
|
91
91
|
end
|
92
92
|
end
|
93
|
+
|
94
|
+
def component_budgets
|
95
|
+
@component_budgets ||= Decidim::Budgets::Budget.where(component: form.budget.component)
|
96
|
+
end
|
93
97
|
end
|
94
98
|
end
|
95
99
|
end
|
@@ -11,7 +11,7 @@ module Decidim
|
|
11
11
|
|
12
12
|
translatable_attribute :title, String
|
13
13
|
attribute :weight, Integer, default: 0
|
14
|
-
translatable_attribute :description,
|
14
|
+
translatable_attribute :description, Decidim::Attributes::RichText
|
15
15
|
attribute :total_budget, Integer, default: 0
|
16
16
|
attribute :decidim_scope_id, Integer
|
17
17
|
|
@@ -11,7 +11,7 @@ module Decidim
|
|
11
11
|
include Decidim::ApplicationHelper
|
12
12
|
|
13
13
|
translatable_attribute :title, String
|
14
|
-
translatable_attribute :description,
|
14
|
+
translatable_attribute :description, Decidim::Attributes::RichText
|
15
15
|
|
16
16
|
attribute :address, String
|
17
17
|
attribute :latitude, Float
|
@@ -34,7 +34,7 @@ module Decidim
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def scope
|
37
|
-
@scope ||= @scope_id ? current_component.scopes.find_by(id: @scope_id) : current_component.scope
|
37
|
+
@scope ||= @attributes["scope_id"].value ? current_component.scopes.find_by(id: @attributes["scope_id"].value) : current_component.scope
|
38
38
|
end
|
39
39
|
|
40
40
|
def scope_id
|
@@ -71,8 +71,12 @@
|
|
71
71
|
}
|
72
72
|
}
|
73
73
|
|
74
|
+
&__projects__container {
|
75
|
+
@apply -mt-12 sm:mt-0;
|
76
|
+
}
|
77
|
+
|
74
78
|
&__card__list-project {
|
75
|
-
@apply ml-auto rounded py-3 px-
|
79
|
+
@apply ml-auto rounded py-3 px-4 bg-background w-[30%] min-w-[120px] flex flex-col justify-center items-center lg:flex-row lg:justify-around lg:place-items-center;
|
76
80
|
}
|
77
81
|
|
78
82
|
&__card__list-project__amount {
|
@@ -132,7 +136,7 @@
|
|
132
136
|
}
|
133
137
|
|
134
138
|
&__list--header {
|
135
|
-
@apply
|
139
|
+
@apply flex items-center justify-between -ml-2 md:ml-0;
|
136
140
|
}
|
137
141
|
|
138
142
|
&-list {
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%= cell("decidim/budgets/budgets_header", current_workflow) %>
|
18
18
|
</section>
|
19
19
|
|
20
|
-
<section class="layout-main__section layout-main__heading">
|
20
|
+
<section class="layout-main__section layout-main__heading flex flex-col items-start">
|
21
21
|
<%= cell("decidim/budgets/budgets_list", current_workflow) %>
|
22
22
|
</section>
|
23
23
|
<% end %>
|
@@ -1 +1 @@
|
|
1
|
-
<%= order_selector available_orders, i18n_scope: "decidim.budgets.projects.orders" %>
|
1
|
+
<%= order_selector available_orders, i18n_scope: "decidim.budgets.projects.orders", css_class: "items-start pl-4" %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<div class="budget-summary__progressbar--meter" style="width: <%= current_order_budget_percent %>%"> </div>
|
27
27
|
</div>
|
28
28
|
<div class="budget-summary__progressbar-marks">
|
29
|
-
<span class="budget-summary__progressbar-legend"
|
29
|
+
<span class="budget-summary__progressbar-legend">
|
30
30
|
<strong id="order-total-budget<%= "-responsive" if responsive %>" class="budget-summary__progressbar-legend-strong">
|
31
31
|
<%= render partial: "decidim/budgets/projects/order_total_budget" %>
|
32
32
|
</strong>
|
@@ -1,4 +1,12 @@
|
|
1
|
-
<%
|
1
|
+
<% add_decidim_meta_tags(
|
2
|
+
description: translated_attribute(budget.description),
|
3
|
+
title: t("decidim.components.pagination.page_title",
|
4
|
+
component_name: t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)),
|
5
|
+
current_page: projects.current_page,
|
6
|
+
total_pages: projects.total_pages ),
|
7
|
+
url: budget_url(budget),
|
8
|
+
resource: budget) %>
|
9
|
+
|
2
10
|
<%= append_javascript_pack_tag "decidim_budgets" %>
|
3
11
|
<%= append_stylesheet_pack_tag "decidim_budgets" %>
|
4
12
|
|
@@ -56,7 +64,7 @@
|
|
56
64
|
</section>
|
57
65
|
<% end %>
|
58
66
|
|
59
|
-
<section id="projects" class="layout-main__section layout-main__heading">
|
67
|
+
<section id="projects" class="layout-main__section layout-main__heading budget__projects__container">
|
60
68
|
<%= render partial: "projects" %>
|
61
69
|
</section>
|
62
70
|
<% else %>
|
@@ -8,4 +8,14 @@ $order.html('<%= j(render partial: "order").strip.html_safe %>');
|
|
8
8
|
$projectsCount.html('<%= j(render partial: "count").strip.html_safe %>');
|
9
9
|
$orderFilterInput.val('<%= order %>');
|
10
10
|
|
11
|
+
var $map = $("#map");
|
12
|
+
var controller = $map.data("map-controller");
|
13
|
+
if (controller) {
|
14
|
+
var markerData = JSON.parse('<%= escape_javascript projects_data_for_map(all_geocoded_projects).to_json.html_safe %>');
|
15
|
+
controller.clearMarkers();
|
16
|
+
if (markerData.length > 0){
|
17
|
+
controller.addMarkers(markerData);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
11
21
|
document.dispatchEvent(new CustomEvent("ajax:loaded", { detail: $projects[0] }));
|
@@ -1,15 +1,17 @@
|
|
1
1
|
<% add_decidim_meta_tags(
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
title: translated_attribute(project.title),
|
3
|
+
description: translated_attribute(project.description),
|
4
|
+
resource: project,
|
5
|
+
url: resource_locator([project.budget, project]).url
|
6
|
+
) %>
|
5
7
|
|
6
8
|
<%
|
7
|
-
edit_link(
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
)
|
9
|
+
edit_link(
|
10
|
+
resource_locator([project.budget, project]).edit,
|
11
|
+
:update,
|
12
|
+
:project,
|
13
|
+
project:
|
14
|
+
)
|
13
15
|
%>
|
14
16
|
|
15
17
|
<%= append_javascript_pack_tag "decidim_budgets" %>
|
@@ -37,6 +39,7 @@ edit_link(
|
|
37
39
|
</div>
|
38
40
|
<% end %>
|
39
41
|
<%= cell("decidim/budgets/project_selected_status", project, as_label: true) %>
|
42
|
+
|
40
43
|
<h1 class="h1 decorator budget__definition-project__title editor-content">
|
41
44
|
<%= decidim_sanitize translated_attribute project.title %>
|
42
45
|
</h1>
|
@@ -67,8 +70,10 @@ edit_link(
|
|
67
70
|
</div>
|
68
71
|
<% end %>
|
69
72
|
</section>
|
73
|
+
|
70
74
|
<section class="layout-main__section layout-main__buttons" data-buttons>
|
71
75
|
<%= cell "decidim/comments_button", nil %>
|
76
|
+
|
72
77
|
<div class="ml-auto">
|
73
78
|
<%= cell "decidim/budgets/project_tags", project %>
|
74
79
|
</div>
|
data/config/locales/ar.yml
CHANGED
@@ -8,7 +8,6 @@ ar:
|
|
8
8
|
total_budget: الميزانية الإجمالية
|
9
9
|
project:
|
10
10
|
decidim_category_id: الفئة
|
11
|
-
decidim_scope_id: نطاق
|
12
11
|
description: وصف
|
13
12
|
proposal_ids: المقترحات ذات الصلة
|
14
13
|
title: عنوان
|
@@ -31,7 +30,6 @@ ar:
|
|
31
30
|
actions:
|
32
31
|
attachment_collections: المجلدات
|
33
32
|
attachments: مرفقات
|
34
|
-
confirm_destroy: هل أنت متأكد أنك تريد حذف هذا المشروع؟
|
35
33
|
destroy: حذف
|
36
34
|
edit: تعديل
|
37
35
|
edit_projects: إدارة المشاريع
|
@@ -117,7 +115,6 @@ ar:
|
|
117
115
|
other: "%{count} مشاريع"
|
118
116
|
filters:
|
119
117
|
category: الفئة
|
120
|
-
scope: نطاق
|
121
118
|
search: بحث
|
122
119
|
show:
|
123
120
|
budget: ميزانية
|
@@ -127,6 +124,7 @@ ar:
|
|
127
124
|
components:
|
128
125
|
budgets:
|
129
126
|
actions:
|
127
|
+
comment: تعليق
|
130
128
|
vote: تصويت
|
131
129
|
name: الميزانيات
|
132
130
|
settings:
|
data/config/locales/bg.yml
CHANGED
@@ -11,7 +11,7 @@ bg:
|
|
11
11
|
project:
|
12
12
|
budget_amount: Бюджетна сума
|
13
13
|
decidim_category_id: Категория
|
14
|
-
decidim_scope_id:
|
14
|
+
decidim_scope_id: Обхват
|
15
15
|
description: Описание
|
16
16
|
proposal_ids: Свързани предложения
|
17
17
|
proposals: Предложения
|
@@ -44,7 +44,6 @@ bg:
|
|
44
44
|
actions:
|
45
45
|
attachment_collections: Папки
|
46
46
|
attachments: Прикачени файлове
|
47
|
-
confirm_destroy: Сигурни ли сте, че искате да изтриете този проект?
|
48
47
|
destroy: Изтрий
|
49
48
|
edit: Редактирай
|
50
49
|
edit_projects: Обедини проекти
|
@@ -0,0 +1 @@
|
|
1
|
+
bn:
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
bs:
|
3
|
+
decidim:
|
4
|
+
budgets:
|
5
|
+
order_summary_mailer:
|
6
|
+
order_summary:
|
7
|
+
selected_projects: 'Projekti koje ste izabrali su:'
|
8
|
+
subject: Glasali ste na prostoru za diskusiju %{space_name}
|
9
|
+
projects:
|
10
|
+
orders:
|
11
|
+
highest_cost: Najveća cena
|
12
|
+
label: Poređaj projekte po
|
13
|
+
lowest_cost: Najniža cena
|
14
|
+
most_voted: Najviše glasova
|
15
|
+
random: Slučajan redosled
|
16
|
+
components:
|
17
|
+
budgets:
|
18
|
+
settings:
|
19
|
+
global:
|
20
|
+
vote_minimum_budget_projects_number: Minimum projekata za glasanje
|
21
|
+
vote_rule_minimum_budget_projects_enabled: 'Omogući pravilo: Minimalni broj projekata o kojima se glasa'
|
22
|
+
vote_rule_threshold_percent_enabled: 'Omogući pravilo: Minimalni procenta budžeta'
|