decidim-budgets 0.22.0 → 0.23.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +38 -3
- data/app/assets/stylesheets/decidim/budgets/budget/_budget-list.scss +5 -0
- data/app/cells/decidim/budgets/base_cell.rb +22 -0
- data/app/cells/decidim/budgets/budget_cell.rb +21 -0
- data/app/cells/decidim/budgets/budget_information_modal/show.erb +28 -0
- data/app/cells/decidim/budgets/budget_information_modal_cell.rb +22 -0
- data/app/cells/decidim/budgets/budget_list_item/show.erb +22 -0
- data/app/cells/decidim/budgets/budget_list_item_cell.rb +40 -0
- data/app/cells/decidim/budgets/budget_m/data.erb +12 -0
- data/app/cells/decidim/budgets/budget_m/footer.erb +5 -0
- data/app/cells/decidim/budgets/budget_m_cell.rb +16 -0
- data/app/cells/decidim/budgets/budgets_header/show.erb +7 -0
- data/app/cells/decidim/budgets/budgets_header_cell.rb +14 -0
- data/app/cells/decidim/budgets/budgets_list/card_list.erb +7 -0
- data/app/cells/decidim/budgets/budgets_list/highlighted.erb +11 -0
- data/app/cells/decidim/budgets/budgets_list/show.erb +20 -0
- data/app/cells/decidim/budgets/budgets_list/voted.erb +43 -0
- data/app/cells/decidim/budgets/budgets_list_cell.rb +39 -0
- data/app/cells/decidim/budgets/limit_announcement_cell.rb +52 -0
- data/app/cells/decidim/budgets/project_list_item/project_data.erb +17 -3
- data/app/cells/decidim/budgets/project_list_item/project_data_vote_button.erb +2 -2
- data/app/cells/decidim/budgets/project_list_item/project_text.erb +11 -5
- data/app/cells/decidim/budgets/project_list_item/show.erb +3 -3
- data/app/cells/decidim/budgets/project_list_item_cell.rb +8 -28
- data/app/cells/decidim/budgets/project_m/data.erb +1 -1
- data/app/cells/decidim/budgets/project_m_cell.rb +4 -0
- data/app/cells/decidim/budgets/project_selected_status_cell.rb +28 -0
- data/app/cells/decidim/budgets/project_tags/show.erb +5 -0
- data/app/cells/decidim/budgets/project_tags_cell.rb +18 -0
- data/app/cells/decidim/budgets/project_voted_hint_cell.rb +33 -0
- data/app/cells/decidim/budgets/project_votes_count_cell.rb +44 -0
- data/app/commands/decidim/budgets/add_line_item.rb +7 -10
- data/app/commands/decidim/budgets/admin/create_budget.rb +48 -0
- data/app/commands/decidim/budgets/admin/create_project.rb +12 -7
- data/app/commands/decidim/budgets/admin/destroy_budget.rb +42 -0
- data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +26 -25
- data/app/commands/decidim/budgets/admin/update_budget.rb +48 -0
- data/app/commands/decidim/budgets/admin/update_project.rb +8 -1
- data/app/commands/decidim/budgets/checkout.rb +6 -6
- data/app/commands/decidim/budgets/remove_line_item.rb +3 -2
- data/app/controllers/concerns/decidim/budgets/needs_current_order.rb +14 -2
- data/app/controllers/concerns/decidim/budgets/orderable.rb +3 -7
- data/app/controllers/decidim/budgets/admin/application_controller.rb +10 -2
- data/app/controllers/decidim/budgets/admin/attachment_collections_controller.rb +1 -1
- data/app/controllers/decidim/budgets/admin/attachments_controller.rb +2 -2
- data/app/controllers/decidim/budgets/admin/budgets_controller.rb +82 -0
- data/app/controllers/decidim/budgets/admin/projects_controller.rb +7 -7
- data/app/controllers/decidim/budgets/admin/proposals_imports_controller.rb +10 -2
- data/app/controllers/decidim/budgets/application_controller.rb +23 -0
- data/app/controllers/decidim/budgets/budgets_controller.rb +24 -0
- data/app/controllers/decidim/budgets/line_items_controller.rb +9 -5
- data/app/controllers/decidim/budgets/orders_controller.rb +20 -6
- data/app/controllers/decidim/budgets/projects_controller.rb +19 -18
- data/app/forms/decidim/budgets/admin/budget_form.rb +39 -0
- data/app/forms/decidim/budgets/admin/project_form.rb +14 -10
- data/app/forms/decidim/budgets/admin/project_import_proposals_form.rb +4 -0
- data/app/helpers/decidim/budgets/admin/application_helper.rb +13 -0
- data/app/helpers/decidim/budgets/application_helper.rb +10 -0
- data/app/helpers/decidim/budgets/projects_helper.rb +0 -4
- data/app/mailers/decidim/budgets/order_summary_mailer.rb +5 -3
- data/app/models/decidim/budgets/budget.rb +34 -0
- data/app/models/decidim/budgets/line_item.rb +4 -4
- data/app/models/decidim/budgets/order.rb +23 -19
- data/app/models/decidim/budgets/project.rb +34 -5
- data/app/permissions/decidim/budgets/admin/permissions.rb +23 -10
- data/app/permissions/decidim/budgets/permissions.rb +28 -6
- data/app/presenters/decidim/budgets/admin_log/budget_presenter.rb +42 -0
- data/app/queries/decidim/budgets/filtered_projects.rb +9 -1
- data/app/queries/decidim/budgets/metrics/budget_followers_metric_measure.rb +3 -2
- data/app/queries/decidim/budgets/metrics/budget_participants_metric_measure.rb +6 -5
- data/app/serializers/decidim/budgets/data_portability_budgets_order_serializer.rb +3 -2
- data/app/services/decidim/budgets/project_search.rb +12 -24
- data/app/types/decidim/budgets/budget_type.rb +24 -0
- data/app/types/decidim/budgets/budgets_type.rb +6 -6
- data/app/types/decidim/budgets/project_type.rb +2 -1
- data/app/views/decidim/budgets/admin/budgets/_form.html.erb +23 -0
- data/app/views/decidim/budgets/admin/budgets/edit.html.erb +7 -0
- data/app/views/decidim/budgets/admin/budgets/index.html.erb +58 -0
- data/app/views/decidim/budgets/admin/budgets/new.html.erb +7 -0
- data/app/views/decidim/budgets/admin/projects/_form.html.erb +12 -4
- data/app/views/decidim/budgets/admin/projects/edit.html.erb +2 -2
- data/app/views/decidim/budgets/admin/projects/index.html.erb +20 -7
- data/app/views/decidim/budgets/admin/projects/new.html.erb +2 -2
- data/app/views/decidim/budgets/admin/proposals_imports/new.html.erb +1 -1
- data/app/views/decidim/budgets/budgets/index.html.erb +5 -0
- data/app/views/decidim/budgets/order_summary_mailer/order_summary.html.erb +1 -0
- data/app/views/decidim/budgets/projects/_budget_confirm.html.erb +3 -3
- data/app/views/decidim/budgets/projects/_budget_summary.html.erb +19 -6
- data/app/views/decidim/budgets/projects/_filters.html.erb +6 -2
- data/app/views/decidim/budgets/projects/_linked_projects.html.erb +1 -1
- data/app/views/decidim/budgets/projects/_order_progress.html.erb +10 -6
- data/app/views/decidim/budgets/projects/_order_selected_projects.html.erb +3 -3
- data/app/views/decidim/budgets/projects/_project_budget_button.html.erb +36 -7
- data/app/views/decidim/budgets/projects/index.html.erb +12 -4
- data/app/views/decidim/budgets/projects/show.html.erb +22 -13
- data/config/locales/am-ET.yml +1 -0
- data/config/locales/ar.yml +2 -11
- data/config/locales/bg.yml +6 -0
- data/config/locales/ca.yml +102 -10
- data/config/locales/cs.yml +108 -16
- data/config/locales/da.yml +1 -0
- data/config/locales/de.yml +120 -28
- data/config/locales/el.yml +3 -9
- data/config/locales/en.yml +101 -9
- data/config/locales/eo.yml +1 -0
- data/config/locales/es-MX.yml +101 -9
- data/config/locales/es-PY.yml +101 -9
- data/config/locales/es.yml +102 -10
- data/config/locales/et.yml +1 -0
- data/config/locales/eu.yml +5 -8
- data/config/locales/fi-plain.yml +102 -10
- data/config/locales/fi.yml +103 -11
- data/config/locales/fr-CA.yml +101 -9
- data/config/locales/fr.yml +101 -9
- data/config/locales/gl.yml +70 -10
- data/config/locales/hr.yml +1 -0
- data/config/locales/hu.yml +2 -7
- data/config/locales/id-ID.yml +2 -6
- data/config/locales/is-IS.yml +0 -6
- data/config/locales/is.yml +114 -0
- data/config/locales/it.yml +71 -9
- data/config/locales/ja-JP.yml +1 -0
- data/config/locales/ja.yml +262 -0
- data/config/locales/ko-KR.yml +1 -0
- data/config/locales/ko.yml +1 -0
- data/config/locales/lt.yml +1 -0
- data/config/locales/{lv-LV.yml → lv.yml} +2 -10
- data/config/locales/mt.yml +1 -0
- data/config/locales/nl.yml +88 -10
- data/config/locales/no.yml +25 -9
- data/config/locales/om-ET.yml +1 -0
- data/config/locales/pl.yml +114 -22
- data/config/locales/pt-BR.yml +2 -7
- data/config/locales/pt.yml +3 -9
- data/config/locales/ro-RO.yml +3 -10
- data/config/locales/ru.yml +2 -9
- data/config/locales/si-LK.yml +1 -0
- data/config/locales/sk.yml +2 -11
- data/config/locales/sl.yml +0 -4
- data/config/locales/so-SO.yml +1 -0
- data/config/locales/sr-CS.yml +0 -2
- data/config/locales/sv.yml +101 -9
- data/config/locales/sw-KE.yml +1 -0
- data/config/locales/ti-ER.yml +1 -0
- data/config/locales/tr-TR.yml +153 -34
- data/config/locales/uk.yml +2 -9
- data/config/locales/vi-VN.yml +1 -0
- data/config/locales/vi.yml +1 -0
- data/config/locales/zh-CN.yml +260 -0
- data/config/locales/zh-TW.yml +1 -0
- data/db/migrate/20200617105120_create_decidim_budgets.rb +15 -0
- data/db/migrate/20200629072626_rename_budget_to_budget_ammount.rb +7 -0
- data/db/migrate/20200629134013_add_budget_reference_to_project.rb +7 -0
- data/db/migrate/20200706142609_add_budget_reference_to_order.rb +7 -0
- data/db/migrate/20200714103519_move_budgets_to_own_model.rb +109 -0
- data/db/migrate/20200717140012_add_scope_to_budgets.rb +7 -0
- data/db/migrate/20200728075039_add_selected_at_to_project.rb +7 -0
- data/db/migrate/20200804175222_votes_enabled_to_votes_choices.rb +35 -0
- data/db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb +9 -0
- data/lib/decidim/budgets.rb +1 -0
- data/lib/decidim/budgets/admin_engine.rb +10 -5
- data/lib/decidim/budgets/component.rb +83 -38
- data/lib/decidim/budgets/engine.rb +8 -6
- data/lib/decidim/budgets/test/factories.rb +42 -13
- data/lib/decidim/budgets/version.rb +1 -1
- data/lib/decidim/budgets/workflows.rb +17 -0
- data/lib/decidim/budgets/workflows/all.rb +20 -0
- data/lib/decidim/budgets/workflows/base.rb +132 -0
- data/lib/decidim/budgets/workflows/one.rb +33 -0
- metadata +89 -20
- data/app/cells/decidim/budgets/project_list_item/project_data_number.erb +0 -3
- data/app/cells/decidim/budgets/project_list_item/project_data_votes.erb +0 -7
@@ -1,13 +1,24 @@
|
|
1
|
-
<div class="card budget-summary" data-progress-reference data-safe-url="<%=
|
1
|
+
<div class="card budget-summary" data-progress-reference data-safe-url="<%= budget_url(budget) %>">
|
2
2
|
<div class="card__content">
|
3
3
|
<% if include_heading %>
|
4
4
|
<% if current_order_checked_out? %>
|
5
|
-
<h3 class="heading3"
|
5
|
+
<h3 class="heading3">
|
6
|
+
<%= t(".checked_out.title") %>
|
7
|
+
<% unless current_workflow.single? %>
|
8
|
+
<small><%= translated_attribute(budget.title) %></small>
|
9
|
+
<% end %>
|
10
|
+
</h3>
|
6
11
|
<p>
|
7
|
-
<%= raw t(".checked_out.description", cancel_link: link_to(t(".cancel_order"),
|
12
|
+
<%= raw t(".checked_out.description", cancel_link: link_to(t(".cancel_order"), budget_order_path(return_to: "budget"), method: :delete, class: "cancel-order", data: { confirm: t(".are_you_sure") })) %>
|
8
13
|
</p>
|
9
14
|
<% else %>
|
10
|
-
<h3 class="heading3"
|
15
|
+
<h3 class="heading3">
|
16
|
+
<% if current_workflow.single? %>
|
17
|
+
<%= t(".title") %>
|
18
|
+
<% else %>
|
19
|
+
<%= translated_attribute(budget.title) %>
|
20
|
+
<% end %>
|
21
|
+
</h3>
|
11
22
|
<p>
|
12
23
|
<% if current_order.minimum_projects_rule? %>
|
13
24
|
<%= t(".description_minimum_projects_rule", minimum_number: current_order.minimum_projects) %>
|
@@ -18,10 +29,10 @@
|
|
18
29
|
<% end %>
|
19
30
|
<% end %>
|
20
31
|
|
21
|
-
<div class="budget-summary__total" data-total-budget="<%=
|
32
|
+
<div class="budget-summary__total" data-total-budget="<%= budget.total_budget %>">
|
22
33
|
<span class="mini-title"><%= t("total_budget") %>
|
23
34
|
<strong class="mini-title__strong mini-title__strong--highlight">
|
24
|
-
<%= budget_to_currency(
|
35
|
+
<%= budget_to_currency(budget.total_budget) %>
|
25
36
|
</strong>
|
26
37
|
</span>
|
27
38
|
</div>
|
@@ -34,6 +45,8 @@
|
|
34
45
|
<%= render partial: "order_total_budget" %>
|
35
46
|
</span>
|
36
47
|
</div>
|
48
|
+
|
49
|
+
<%= cell("decidim/budgets/budget_information_modal", budget) %>
|
37
50
|
</div>
|
38
51
|
|
39
52
|
<%= render partial: "order_selected_projects" %>
|
@@ -14,8 +14,12 @@
|
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
|
17
|
-
<% if
|
18
|
-
<%= form.check_boxes_tree :
|
17
|
+
<% if voting_finished? %>
|
18
|
+
<%= form.check_boxes_tree :status, filter_status_values, legend_title: t(".status"), "aria-controls": "projects" %>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<% if current_component.has_subscopes? %>
|
22
|
+
<%= form.check_boxes_tree :scope_id, resource_filter_scope_values(budget.scope), legend_title: t(".scope"), "aria-controls": "projects" %>
|
19
23
|
<% end %>
|
20
24
|
|
21
25
|
<% if current_participatory_space.categories.any? %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% resources.each do |project| %>
|
3
3
|
<div class="card--list__item">
|
4
4
|
<%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
|
5
|
-
<%= link_to resource_locator(project).path, class: "card--list__text card__link card__link--block" do %>
|
5
|
+
<%= link_to resource_locator([project.budget, project]).path, class: "card--list__text card__link card__link--block" do %>
|
6
6
|
<h5 class="card--list__heading">
|
7
7
|
<%= translated_attribute(project.title) %>
|
8
8
|
</h5>
|
@@ -1,27 +1,31 @@
|
|
1
1
|
<div id="order-progress">
|
2
2
|
<div class="budget-summary__progressbox" data-current-budget="<%= current_order ? current_order.total_budget : 0 %>">
|
3
3
|
<div class="progress budget-progress" role="progressbar" aria-valuenow="<%= current_order_budget_percent %>" aria-valuetext="<%= current_order_budget_percent %>%" aria-valuemin="0" aria-valuemax="100">
|
4
|
-
<div class="progress-meter progress-meter--minimum" style="width: <%=
|
4
|
+
<div class="progress-meter progress-meter--minimum" style="width: <%= current_order_budget_percent_minimum %>%"></div>
|
5
5
|
<!--Change width and text dynamically.-->
|
6
6
|
<div class="progress-meter budget-progress__meter" style="width: <%= current_order_budget_percent %>%">
|
7
7
|
<span class="progress-meter-text progress-meter-text--right"><%= current_order_budget_percent %>%</span>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
|
-
<%
|
11
|
-
<button class="button small button--sc" data-toggle="budget-confirm" <%= budget_confirm_disabled_attr
|
10
|
+
<% if !current_order_checked_out? && voting_open? %>
|
11
|
+
<button class="button small button--sc" data-toggle="budget-confirm" <%= budget_confirm_disabled_attr %>>
|
12
|
+
<%= t(".vote") %>
|
13
|
+
</button>
|
12
14
|
<% end %>
|
13
15
|
</div>
|
14
16
|
|
15
17
|
<div class="progressbox-fixed-wrapper" data-progressbox-fixed>
|
16
18
|
<div class="budget-summary__progressbox budget-summary__progressbox--fixed">
|
17
19
|
<div class="progress budget-progress budget-progress--fixed" role="progressbar" aria-valuenow="<%= current_order_budget_percent %>" aria-valuetext="<%= current_order_budget_percent %>%" aria-valuemin="0" aria-valuemax="100">
|
18
|
-
<div class="progress-meter progress-meter--minimum" style="width: <%=
|
20
|
+
<div class="progress-meter progress-meter--minimum" style="width: <%= current_order_budget_percent_minimum %>%"></div>
|
19
21
|
<div class="progress-meter budget-progress__meter" style="width: <%= current_order_budget_percent %>%">
|
20
22
|
<span class="progress-meter-text progress-meter-text--right"><%= current_order_budget_percent %>%</span>
|
21
23
|
</div>
|
22
24
|
</div>
|
23
|
-
<%
|
24
|
-
<button class="button small button--sc" data-toggle="budget-confirm" <%= budget_confirm_disabled_attr
|
25
|
+
<% if !current_order_checked_out? && voting_open? %>
|
26
|
+
<button class="button small button--sc" data-toggle="budget-confirm" <%= budget_confirm_disabled_attr %>>
|
27
|
+
<%= t(".vote") %>
|
28
|
+
</button>
|
25
29
|
<% end %>
|
26
30
|
</div>
|
27
31
|
</div>
|
@@ -9,12 +9,12 @@
|
|
9
9
|
<ul class="budget-summary__selected-list">
|
10
10
|
<% current_order.projects.each do |project| %>
|
11
11
|
<li class="budget-summary__selected-item">
|
12
|
-
<%= link_to translated_attribute(project.title), project %>
|
12
|
+
<%= link_to translated_attribute(project.title), resource_locator([budget, project]).path %>
|
13
13
|
<strong class="budget-summary__selected-number">
|
14
|
-
<%= budget_to_currency project.
|
14
|
+
<%= budget_to_currency project.budget_amount %>
|
15
15
|
</strong>
|
16
16
|
<% unless current_order_checked_out? %>
|
17
|
-
<%= button_to
|
17
|
+
<%= button_to budget_order_line_item_path(project_id: project), method: :delete, remote: true, data: { disable: true }, form: { style: "display: inline" } do %>
|
18
18
|
<%= icon("trash", aria_label: t(".remove"), role: "img") %>
|
19
19
|
<% end %>
|
20
20
|
<% end %>
|
@@ -1,11 +1,40 @@
|
|
1
1
|
<div id="project-<%= project.id %>-budget-button">
|
2
|
-
<% if
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
<% if voted_for?(project) %>
|
3
|
+
<%= action_authorized_button_to(
|
4
|
+
"vote",
|
5
|
+
t(".added"),
|
6
|
+
budget_order_line_item_path(budget, project_id: project),
|
7
|
+
method: :delete,
|
8
|
+
remote: true,
|
9
|
+
data: {
|
10
|
+
disable: true,
|
11
|
+
budget: project.budget_amount,
|
12
|
+
"redirect-url": budget_project_path(budget, project)
|
13
|
+
},
|
14
|
+
disabled: !can_have_order? || current_order_checked_out?,
|
15
|
+
class: "button expanded button--sc success",
|
16
|
+
"aria-label": t(".added_descriptive", resource_name: translated_attribute(project.title))
|
17
|
+
) %>
|
18
|
+
<% elsif current_user.present? %>
|
19
|
+
<%= action_authorized_button_to(
|
20
|
+
"vote",
|
21
|
+
t(".add"),
|
22
|
+
budget_order_line_item_path(budget, project_id: project),
|
23
|
+
method: :post,
|
24
|
+
remote: true,
|
25
|
+
data: {
|
26
|
+
disable: true,
|
27
|
+
budget: project.budget_amount,
|
28
|
+
add: true,
|
29
|
+
"redirect-url": budget_project_path(budget, project)
|
30
|
+
},
|
31
|
+
disabled: !can_have_order? || current_order_checked_out?,
|
32
|
+
class: "button expanded button--sc",
|
33
|
+
"aria-label": t(".add_descriptive", resource_name: translated_attribute(project.title))
|
34
|
+
) %>
|
8
35
|
<% else %>
|
9
|
-
<button class="button expanded button--sc
|
36
|
+
<button class="button expanded button--sc" data-toggle="loginModal">
|
37
|
+
<%= t(".add") %>
|
38
|
+
</button>
|
10
39
|
<% end %>
|
11
40
|
</div>
|
@@ -1,15 +1,23 @@
|
|
1
1
|
<%= render partial: "decidim/shared/component_announcement" %>
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
<%= cell("decidim/budgets/limit_announcement", budget) %>
|
4
|
+
|
5
|
+
<div class="row columns">
|
6
|
+
<% if voting_finished? %>
|
7
|
+
<h2 class="heading2">
|
8
|
+
<%= t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)) %>
|
9
|
+
</h2>
|
10
|
+
<% else %>
|
5
11
|
<%= render partial: "budget_summary", locals: { include_heading: true } %>
|
6
|
-
|
7
|
-
|
12
|
+
<% end %>
|
13
|
+
</div>
|
14
|
+
|
8
15
|
<div class="row columns">
|
9
16
|
<h3 class="section-heading">
|
10
17
|
<%= render partial: "count" %>
|
11
18
|
</h3>
|
12
19
|
</div>
|
20
|
+
|
13
21
|
<div class="row">
|
14
22
|
<div class="columns mediumlarge-4 large-3">
|
15
23
|
<%= render partial: "filters_small_view" %>
|
@@ -5,21 +5,26 @@
|
|
5
5
|
|
6
6
|
<%
|
7
7
|
edit_link(
|
8
|
-
resource_locator(project).edit,
|
8
|
+
resource_locator([project.budget, project]).edit,
|
9
9
|
:update,
|
10
10
|
:project,
|
11
11
|
project: project
|
12
12
|
)
|
13
13
|
%>
|
14
14
|
|
15
|
+
<%= cell("decidim/budgets/limit_announcement", budget) %>
|
16
|
+
|
15
17
|
<div class="row column view-header">
|
16
|
-
<%
|
18
|
+
<% unless voting_finished? %>
|
17
19
|
<%= render partial: "budget_summary", locals: { include_heading: false } %>
|
18
20
|
<% end %>
|
19
|
-
|
20
|
-
|
21
|
-
<%=
|
22
|
-
|
21
|
+
|
22
|
+
<div class="m-bottom">
|
23
|
+
<%= link_to resource_locator(budget).path(filter_link_params), class: "muted-link" do %>
|
24
|
+
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
25
|
+
<%= t(".view_all_projects") %>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
23
28
|
<h2 class="heading2"><%= translated_attribute project.title %></h2>
|
24
29
|
</div>
|
25
30
|
<div class="row">
|
@@ -29,14 +34,17 @@ edit_link(
|
|
29
34
|
<div class="card__content">
|
30
35
|
<div class="m-bottom">
|
31
36
|
<span class="definition-data__title"><%= t(".budget") %></span>
|
32
|
-
<span class="definition-data__number"><%= budget_to_currency project.
|
37
|
+
<span class="definition-data__number"><%= budget_to_currency project.budget_amount %></span>
|
33
38
|
</div>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
39
|
+
|
40
|
+
<%= cell("decidim/budgets/project_votes_count", project, layout: :one_line, class: "display-block") %>
|
41
|
+
|
42
|
+
<% if voting_finished? %>
|
43
|
+
<%= cell("decidim/budgets/project_voted_hint", project, class: "display-block") %>
|
44
|
+
<% elsif voting_open? %>
|
45
|
+
<%= render partial: "project_budget_button", locals: { project: project } %>
|
38
46
|
<% end %>
|
39
|
-
|
47
|
+
|
40
48
|
<%= render partial: "decidim/shared/follow_button", locals: { followable: project, large: false } %>
|
41
49
|
</div>
|
42
50
|
</div>
|
@@ -44,8 +52,9 @@ edit_link(
|
|
44
52
|
</div>
|
45
53
|
<div class="columns mediumlarge-8 mediumlarge-pull-4">
|
46
54
|
<div class="section">
|
55
|
+
<%= cell("decidim/budgets/project_selected_status", project, as_label: true) %>
|
47
56
|
<%= decidim_sanitize translated_attribute project.description %>
|
48
|
-
<%= cell "decidim/
|
57
|
+
<%= cell "decidim/budgets/project_tags", project, context: { extra_classes: ["tags--project"] } %>
|
49
58
|
</div>
|
50
59
|
<%= linked_resources_for project, :proposals, "included_proposals" %>
|
51
60
|
<%= linked_resources_for project, :results, "included_projects" %>
|
@@ -0,0 +1 @@
|
|
1
|
+
am:
|
data/config/locales/ar.yml
CHANGED
@@ -2,7 +2,6 @@ ar:
|
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
4
|
project:
|
5
|
-
budget: ميزانية
|
6
5
|
decidim_category_id: الفئة
|
7
6
|
decidim_scope_id: نطاق
|
8
7
|
description: وصف
|
@@ -26,7 +25,6 @@ ar:
|
|
26
25
|
destroy: حذف
|
27
26
|
edit: تعديل
|
28
27
|
import: استيراد مقترحات للمشاريع
|
29
|
-
new: مشروع جديد
|
30
28
|
preview: معاينة
|
31
29
|
title: أفعال
|
32
30
|
admin:
|
@@ -71,7 +69,6 @@ ar:
|
|
71
69
|
title: عنوان
|
72
70
|
projects:
|
73
71
|
budget_confirm:
|
74
|
-
are_you_sure: هل توافق؟ بمجرد تأكيد تصويتك ، لا يمكنك تغييره.
|
75
72
|
cancel: إلغاء
|
76
73
|
confirm: تؤكد
|
77
74
|
description: هذه هي المشاريع التي اخترتها لتكون جزءًا من الميزانية.
|
@@ -120,13 +117,6 @@ ar:
|
|
120
117
|
other: المشاريع المختارة
|
121
118
|
view: رأي
|
122
119
|
project:
|
123
|
-
count:
|
124
|
-
zero: "%{count} يدعم"
|
125
|
-
one: 1 الدعم
|
126
|
-
two: "%{count} يدعم"
|
127
|
-
few: "%{count} يدعم"
|
128
|
-
many: "%{count} يدعم"
|
129
|
-
other: "%{count} يدعم"
|
130
120
|
view: رأي
|
131
121
|
show:
|
132
122
|
budget: ميزانية
|
@@ -148,7 +138,8 @@ ar:
|
|
148
138
|
announcement: إعلان
|
149
139
|
comments_blocked: تم حظر التعليقات
|
150
140
|
show_votes: إظهار الأصوات
|
151
|
-
|
141
|
+
votes_choices:
|
142
|
+
enabled: تم تمكين التصويت
|
152
143
|
orders:
|
153
144
|
checkout:
|
154
145
|
error: حدثت مشكلة أثناء معالجة تصويتك
|
data/config/locales/ca.yml
CHANGED
@@ -1,12 +1,19 @@
|
|
1
1
|
ca:
|
2
2
|
activemodel:
|
3
3
|
attributes:
|
4
|
+
budget:
|
5
|
+
decidim_scope_id: Àmbit
|
6
|
+
description: Descripció
|
7
|
+
title: Títol
|
8
|
+
total_budget: Pressupost total
|
9
|
+
weight: Pes
|
4
10
|
project:
|
5
|
-
|
11
|
+
budget_amount: Import del pressupost
|
6
12
|
decidim_category_id: Categoria
|
7
13
|
decidim_scope_id: Àmbit
|
8
14
|
description: Descripció
|
9
15
|
proposal_ids: Propostes relacionades
|
16
|
+
selected: Seleccionat per implementar
|
10
17
|
title: Títol
|
11
18
|
activerecord:
|
12
19
|
models:
|
@@ -21,12 +28,33 @@ ca:
|
|
21
28
|
confirm_destroy: Estàs segura que vols eliminar aquest projecte?
|
22
29
|
destroy: Esborrar
|
23
30
|
edit: Editar
|
31
|
+
edit_projects: Gestionar projectes
|
24
32
|
import: Importa propostes a projectes
|
25
|
-
new: Nou
|
33
|
+
new: Nou %{name}
|
26
34
|
preview: Previsualitzar
|
27
35
|
title: Accions
|
28
36
|
admin:
|
37
|
+
budgets:
|
38
|
+
create:
|
39
|
+
invalid: S'ha produït un error en crear aquest pressupost
|
40
|
+
success: Pressupost creat correctament
|
41
|
+
destroy:
|
42
|
+
invalid: S'ha produït un error en eliminar aquest pressupost
|
43
|
+
success: Pressupost eliminat correctament
|
44
|
+
edit:
|
45
|
+
title: Edita el pressupost
|
46
|
+
update: Actualitza el pressupost
|
47
|
+
index:
|
48
|
+
title: Pressupostos
|
49
|
+
new:
|
50
|
+
create: Crea pressupost
|
51
|
+
title: Nou pressupost
|
52
|
+
update:
|
53
|
+
invalid: S'ha produït un error en actualitzar aquest pressupost
|
54
|
+
success: Pressupost actualitzat correctament
|
29
55
|
models:
|
56
|
+
budget:
|
57
|
+
name: Pressupost
|
30
58
|
project:
|
31
59
|
name: Projecte
|
32
60
|
projects:
|
@@ -41,6 +69,7 @@ ca:
|
|
41
69
|
index:
|
42
70
|
finished_orders: Vots finalitzats
|
43
71
|
pending_orders: Vots en procés
|
72
|
+
selected: Seleccionat
|
44
73
|
title: Projectes
|
45
74
|
new:
|
46
75
|
create: Crear
|
@@ -57,11 +86,39 @@ ca:
|
|
57
86
|
no_components: No hi ha cap component de propostes en aquest espai participatiu per importar les propostes a projectes.
|
58
87
|
select_component: Selecciona un component
|
59
88
|
admin_log:
|
89
|
+
budget:
|
90
|
+
create: "%{user_name} ha creat el pressupost %{resource_name} a l'espai %{space_name}"
|
91
|
+
delete: "%{user_name} ha eliminat el pressupost %{resource_name} de l'espai %{space_name}"
|
92
|
+
update: "%{user_name} ha actualitzat el pressupost %{resource_name} de l'espai %{space_name}"
|
60
93
|
project:
|
61
94
|
create: "%{user_name} ha creat el projecte %{resource_name} a l'espai %{space_name}"
|
62
95
|
delete: "%{user_name} ha eliminat el projecte %{resource_name} de l'espai %{space_name}"
|
63
96
|
update: "%{user_name} ha actualitzat el projecte %{resource_name} de l'espai %{space_name}"
|
97
|
+
budget:
|
98
|
+
view: Veure tots els projectes de pressupost
|
99
|
+
budget_information_modal:
|
100
|
+
back_to: Tornar a %{component_name}
|
101
|
+
close_modal: Tancar el modal
|
102
|
+
continue: Continuar
|
103
|
+
more_information: Més informació
|
104
|
+
budgets_list:
|
105
|
+
cancel_order:
|
106
|
+
more_than_one: eliminar el teu vot a %{name} i començar de nou
|
107
|
+
only_one: eliminar el teu vot i començar de nou.
|
108
|
+
finished_message: Has finalitzat el procés de votació. Gràcies per participar-hi!
|
109
|
+
highlighted_cta: Votar a %{name}
|
110
|
+
if_change_opinion: Si has canviat d'opinió, pots
|
111
|
+
my_budgets: Els meus pressupostos
|
112
|
+
voted_on: Has votat a %{links}
|
113
|
+
limit_announcement:
|
114
|
+
cant_vote: No pots votar a aquests pressupostos. <a href="%{landing_path}"> Prova amb un altre pressupost </a>.
|
115
|
+
limit_reached: Tens vots actius a %{links}. Per votar en aquest pressupot has d' <a href="%{landing_path}">esborrar el teu vot i començar de nou</a>.
|
64
116
|
models:
|
117
|
+
budget:
|
118
|
+
fields:
|
119
|
+
name: Nom
|
120
|
+
projects_count: Número de projectes
|
121
|
+
total_budget: Pressupost total
|
65
122
|
project:
|
66
123
|
fields:
|
67
124
|
title: Títol
|
@@ -69,11 +126,11 @@ ca:
|
|
69
126
|
order_summary:
|
70
127
|
selected_projects: 'Els projectes que has seleccionat són:'
|
71
128
|
subject: Has votat a l'espai de participació %{space_name}
|
72
|
-
voted_on_space: Has votat
|
73
|
-
voted_on_space_with_scope: Has votat
|
129
|
+
voted_on_space: Has votat al pressupost %{budget_name} de l'espai de participació %{space_name}.
|
130
|
+
voted_on_space_with_scope: Has votat al pressupost %{budget_name} de l'espai de participació %{space_name} de %{scope_name} (%{scope_type}).
|
74
131
|
projects:
|
75
132
|
budget_confirm:
|
76
|
-
are_you_sure:
|
133
|
+
are_you_sure: Si canvies d'opinió, pots modificar el teu vot més tard.
|
77
134
|
cancel: Cancel·lar
|
78
135
|
confirm: Confirmar
|
79
136
|
description: Aquests són els projectes que has seleccionat per formar part del pressupost.
|
@@ -101,6 +158,11 @@ ca:
|
|
101
158
|
category: Categoria
|
102
159
|
scope: Àmbit
|
103
160
|
search: Cerca
|
161
|
+
status: Estat
|
162
|
+
status_values:
|
163
|
+
all: Tots
|
164
|
+
not_selected: No seleccionat
|
165
|
+
selected: Seleccionat
|
104
166
|
filters_small_view:
|
105
167
|
close_modal: Tancar finestra
|
106
168
|
filter: Filtra
|
@@ -120,18 +182,22 @@ ca:
|
|
120
182
|
lowest_cost: Menor cost
|
121
183
|
most_voted: Més votats
|
122
184
|
random: Ordre aleatori
|
185
|
+
selected: Seleccionat
|
123
186
|
project:
|
124
187
|
add: Afegir el projecte %{resource_name} al teu vot
|
125
|
-
count:
|
126
|
-
one: 1 suport
|
127
|
-
other: "%{count} suports"
|
128
188
|
remove: Esborrar el projecte %{resource_name} del teu vot
|
189
|
+
selected: Seleccionat
|
129
190
|
view: Veure
|
191
|
+
votes:
|
192
|
+
one: vot
|
193
|
+
other: vots
|
194
|
+
you_voted: Has votat
|
130
195
|
project_budget_button:
|
131
196
|
add: Afegir al teu vot
|
132
197
|
add_descriptive: Afegir el projecte %{resource_name} al teu vot
|
133
198
|
added: Afegit al teu vot
|
134
199
|
added_descriptive: El projecte %{resource_name} s'ha afegit al teu vot
|
200
|
+
projects_for: Projectes per a %{name}
|
135
201
|
show:
|
136
202
|
budget: Pressupost
|
137
203
|
view_all_projects: Veure tots els projectes
|
@@ -144,22 +210,48 @@ ca:
|
|
144
210
|
global:
|
145
211
|
announcement: Avís
|
146
212
|
comments_enabled: Comentaris habilitats
|
213
|
+
comments_max_length: Longitud màxima dels comentaris (deixa 0 si vols mantenir la configuració per defecte)
|
147
214
|
form:
|
148
215
|
errors:
|
149
216
|
budget_voting_rule_only_one: Cal activar com a mínim una norma per a la votació
|
150
217
|
budget_voting_rule_required: Es requereix una norma per a la votació
|
218
|
+
landing_page_content: Pàgina d'inici de pressupostos
|
219
|
+
more_information_modal: Finestra de "Més informació"
|
151
220
|
projects_per_page: Projectes per pàgina
|
152
221
|
resources_permissions_enabled: Es poden establir permisos d'accions per a cada trobada
|
222
|
+
scope_id: Àmbit
|
223
|
+
scopes_enabled: Àmbits habilitats
|
224
|
+
title: Títol
|
153
225
|
total_budget: Pressupost total
|
154
|
-
vote_minimum_budget_projects_number:
|
226
|
+
vote_minimum_budget_projects_number: Número màxim de projectes a votar
|
155
227
|
vote_rule_minimum_budget_projects_enabled: 'Activar norma: Número mínim de projectes a votar'
|
156
228
|
vote_rule_threshold_percent_enabled: 'Activar norma: percentatge mínim del pressupost'
|
157
229
|
vote_threshold_percent: Percentatge del pressupost mínim per fer el vot
|
230
|
+
workflow: Workflow
|
231
|
+
workflow_choices:
|
232
|
+
all: 'Votar a tots: permet a les participants votar a tots els pressupostos.'
|
233
|
+
one: 'Votar a un: permet a les participants votar a qualsevol pressupost, però només a un.'
|
158
234
|
step:
|
159
235
|
announcement: Avís
|
160
236
|
comments_blocked: Comentaris bloquejats
|
237
|
+
highlighted_heading: Capçalera destacada
|
238
|
+
landing_page_content: Pàgina d'inici de pressupostos
|
239
|
+
list_heading: Títol de la llista
|
240
|
+
more_information_modal: Finestra de "Més informació"
|
161
241
|
show_votes: Mostra els suports
|
162
|
-
|
242
|
+
title: Títol
|
243
|
+
votes: Votació
|
244
|
+
votes_choices:
|
245
|
+
disabled: Votació inhabilitada
|
246
|
+
enabled: S'ha habilitat la votació
|
247
|
+
finished: Votació finalitzada
|
248
|
+
events:
|
249
|
+
budgets:
|
250
|
+
budget_published:
|
251
|
+
email_intro: 'Ja està activa la fase %{resource_title} per a %{participatory_space_title}. Pots veure-la des d''aquesta pàgina:'
|
252
|
+
email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai %{participatory_space_title}. Pots deixar de rebre notificacions a través de l'enllaç anterior.
|
253
|
+
email_subject: El component %{resource_title} ja està actiu per %{participatory_space_title}.
|
254
|
+
notification_title: El pressupost <a href="%{resource_path}">%{resource_title}</a> a %{participatory_space_title} ja està actiu.
|
163
255
|
orders:
|
164
256
|
checkout:
|
165
257
|
error: S'ha produït un error en processar el teu vot
|