decidim-budgets 0.26.2 → 0.27.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/budgets/order_activity_cell.rb +29 -0
  3. data/app/commands/decidim/budgets/add_line_item.rb +4 -2
  4. data/app/commands/decidim/budgets/admin/create_budget.rb +1 -1
  5. data/app/commands/decidim/budgets/admin/create_order_reminders.rb +66 -0
  6. data/app/commands/decidim/budgets/admin/create_project.rb +5 -2
  7. data/app/commands/decidim/budgets/admin/destroy_budget.rb +1 -1
  8. data/app/commands/decidim/budgets/admin/destroy_project.rb +1 -1
  9. data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +5 -2
  10. data/app/commands/decidim/budgets/admin/update_budget.rb +1 -1
  11. data/app/commands/decidim/budgets/admin/update_project.rb +5 -2
  12. data/app/commands/decidim/budgets/admin/update_project_category.rb +48 -0
  13. data/app/commands/decidim/budgets/admin/update_project_scope.rb +54 -0
  14. data/app/commands/decidim/budgets/admin/update_project_selection.rb +56 -0
  15. data/app/commands/decidim/budgets/cancel_order.rb +1 -1
  16. data/app/commands/decidim/budgets/checkout.rb +10 -3
  17. data/app/commands/decidim/budgets/remove_line_item.rb +1 -1
  18. data/app/controllers/decidim/budgets/admin/projects_controller.rb +149 -1
  19. data/app/controllers/decidim/budgets/projects_controller.rb +12 -12
  20. data/app/forms/decidim/budgets/admin/budget_form.rb +2 -2
  21. data/app/forms/decidim/budgets/admin/order_reminder_form.rb +75 -0
  22. data/app/forms/decidim/budgets/admin/project_form.rb +19 -3
  23. data/app/helpers/decidim/budgets/admin/project_bulk_actions_helper.rb +20 -0
  24. data/app/helpers/decidim/budgets/projects_helper.rb +29 -0
  25. data/app/jobs/decidim/budgets/send_vote_reminder_job.rb +16 -0
  26. data/app/mailers/decidim/budgets/vote_reminder_mailer.rb +39 -0
  27. data/app/models/decidim/budgets/order.rb +2 -3
  28. data/app/models/decidim/budgets/project.rb +12 -4
  29. data/app/packs/entrypoints/decidim_budgets_admin.js +1 -0
  30. data/app/packs/src/decidim/budgets/admin/projects.js +143 -0
  31. data/app/permissions/decidim/budgets/admin/permissions.rb +8 -3
  32. data/app/queries/decidim/budgets/filtered_projects.rb +1 -1
  33. data/app/serializers/decidim/budgets/{data_portability_budgets_order_serializer.rb → download_your_data_budgets_order_serializer.rb} +2 -2
  34. data/app/services/decidim/budgets/order_reminder_generator.rb +85 -0
  35. data/app/views/decidim/budgets/admin/budgets/index.html.erb +3 -0
  36. data/app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb +13 -0
  37. data/app/views/decidim/budgets/admin/projects/_form.html.erb +6 -0
  38. data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +50 -0
  39. data/app/views/decidim/budgets/admin/projects/bulk_actions/_change-selected.html.erb +15 -0
  40. data/app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb +36 -0
  41. data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +15 -0
  42. data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +25 -0
  43. data/app/views/decidim/budgets/admin/projects/index.html.erb +6 -54
  44. data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +26 -0
  45. data/app/views/decidim/budgets/projects/_filters.html.erb +4 -4
  46. data/app/views/decidim/budgets/projects/index.html.erb +28 -1
  47. data/app/views/decidim/budgets/projects/show.html.erb +6 -1
  48. data/app/views/decidim/budgets/vote_reminder_mailer/vote_reminder.html.erb +21 -0
  49. data/config/assets.rb +2 -1
  50. data/config/locales/ar.yml +4 -0
  51. data/config/locales/bg.yml +1 -0
  52. data/config/locales/ca.yml +49 -3
  53. data/config/locales/cs.yml +50 -0
  54. data/config/locales/de.yml +48 -0
  55. data/config/locales/el.yml +1 -0
  56. data/config/locales/en.yml +45 -0
  57. data/config/locales/es-MX.yml +43 -0
  58. data/config/locales/es-PY.yml +46 -0
  59. data/config/locales/es.yml +46 -0
  60. data/config/locales/eu.yml +1 -0
  61. data/config/locales/fi-plain.yml +46 -0
  62. data/config/locales/fi.yml +46 -0
  63. data/config/locales/fr-CA.yml +46 -0
  64. data/config/locales/fr.yml +47 -1
  65. data/config/locales/ga-IE.yml +1 -0
  66. data/config/locales/gl.yml +10 -0
  67. data/config/locales/hu.yml +19 -0
  68. data/config/locales/id-ID.yml +1 -0
  69. data/config/locales/is-IS.yml +2 -1
  70. data/config/locales/it.yml +1 -0
  71. data/config/locales/ja.yml +44 -0
  72. data/config/locales/lb.yml +1 -0
  73. data/config/locales/lt.yml +388 -0
  74. data/config/locales/lv.yml +1 -0
  75. data/config/locales/nl.yml +74 -12
  76. data/config/locales/no.yml +16 -0
  77. data/config/locales/pl.yml +1 -0
  78. data/config/locales/pt-BR.yml +1 -0
  79. data/config/locales/pt.yml +1 -0
  80. data/config/locales/ro-RO.yml +1 -0
  81. data/config/locales/ru.yml +1 -0
  82. data/config/locales/sk.yml +1 -0
  83. data/config/locales/sr-CS.yml +1 -0
  84. data/config/locales/sv.yml +25 -0
  85. data/config/locales/tr-TR.yml +1 -0
  86. data/config/locales/uk.yml +1 -0
  87. data/config/locales/zh-CN.yml +1 -0
  88. data/db/migrate/20200804175222_votes_enabled_to_votes_choices.rb +2 -2
  89. data/db/migrate/20220428072638_add_geolocalization_fields_to_projects.rb +9 -0
  90. data/lib/decidim/budgets/admin_engine.rb +3 -0
  91. data/lib/decidim/budgets/component.rb +7 -6
  92. data/lib/decidim/budgets/engine.rb +17 -0
  93. data/lib/decidim/budgets/test/factories.rb +11 -0
  94. data/lib/decidim/budgets/version.rb +1 -1
  95. metadata +38 -18
  96. data/app/services/decidim/budgets/project_search.rb +0 -45
@@ -0,0 +1,50 @@
1
+ <tr data-id="<%= project.id %>">
2
+ <td>
3
+ <%= check_box_tag "project_ids_s[]", project.id, false, class: "js-check-all-resources js-project-list-check js-resource-id-#{project.id}" %><br>
4
+ </td>
5
+ <td>
6
+ <%= project.id %><br>
7
+ </td>
8
+ <td>
9
+ <%= translated_attribute(project.title) %><br>
10
+ </td>
11
+ <td>
12
+ <% if project.category %>
13
+ <%= translated_attribute project.category.name %>
14
+ <% end %>
15
+ </td>
16
+ <%= td_resource_scope_for(project.scope) %>
17
+ <td>
18
+ <%= project.confirmed_orders_count %>
19
+ </td>
20
+ <td>
21
+ <% if project.selected? %>
22
+ <%= content_tag :strong, t("projects.index.selected", scope: "decidim.budgets.admin"), class: "text-success" %>
23
+ <% else %>
24
+ <%= content_tag :span, "x", class: "text-muted" %>
25
+ <% end %>
26
+ </td>
27
+ <td class="table-list__actions">
28
+ <%= icon_link_to "eye", resource_locator([budget, project]).path, t("actions.preview", scope: "decidim.budgets"), target: :blank, class: "action-icon--preview" %>
29
+
30
+ <% if allowed_to? :update, :project, project: project %>
31
+ <%= icon_link_to "pencil", resource_locator([budget, project]).edit, t("actions.edit", scope: "decidim.budgets"), class: "action-icon--edit" %>
32
+ <% end %>
33
+
34
+ <% if allowed_to? :update, :project, project: project %>
35
+ <%= icon_link_to "folder", project_attachment_collections_path(project), t("actions.attachment_collections", scope: "decidim.budgets"), class: "action-icon--attachment_collections" %>
36
+ <% end %>
37
+
38
+ <% if allowed_to? :update, :project, project: project %>
39
+ <%= icon_link_to "paperclip", project_attachments_path(project), t("actions.attachments", scope: "decidim.budgets"), class: "action-icon--attachments" %>
40
+ <% end %>
41
+
42
+ <%= resource_permissions_link(project) %>
43
+
44
+ <% if allowed_to? :destroy, :project, project: project %>
45
+ <%= icon_link_to "circle-x", resource_locator([budget, project]).show, t("actions.destroy", scope: "decidim.budgets"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.budgets") } %>
46
+ <% else %>
47
+ <%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.destroy", scope: "decidim.budgets") %>
48
+ <% end %>
49
+ </td>
50
+ </tr>
@@ -0,0 +1,15 @@
1
+ <div id="js-change-selected-projects-actions" class="hide js-bulk-action-form">
2
+ <%= form_tag(update_selected_budget_projects_path, method: :post, remote: true, id: "js-form-change-selected-projects", class: "flex--cc flex-gap--1") do %>
3
+ <div class="checkboxes hide">
4
+ <% projects.each do |project| %>
5
+ <%= check_box_tag "project_ids[]", project.id, false, class: "js-check-all-resources js-resource-id-#{project.id}" %>
6
+ <% end %>
7
+ </div>
8
+
9
+ <%= bulk_selections %>
10
+
11
+ <%= submit_tag(t("decidim.budgets.admin.projects.index.update"), id: "js-submit-edit-selected", class: "button small button--simple float-left") %>
12
+
13
+ <button id="js-cancel-edit-selected" class="button tiny clear compact js-cancel-bulk-action" type="button"><%= t("decidim.budgets.admin.projects.index.cancel") %></button>
14
+ <% end %>
15
+ </div>
@@ -0,0 +1,36 @@
1
+ <div id="js-bulk-actions-wrapper">
2
+ <button
3
+ id="js-bulk-actions-button"
4
+ class="button button--nomargin tiny success light dropdown hide"
5
+ type="button"
6
+ data-toggle="js-bulk-actions-dropdown">
7
+ <%= t("decidim.budgets.admin.projects.index.actions") %>
8
+ </button>
9
+
10
+ <div
11
+ id="js-bulk-actions-dropdown"
12
+ class="dropdown-pane"
13
+ data-position="bottom"
14
+ data-alignment="right"
15
+ data-dropdown="dropdown"
16
+ data-auto-focus="false"
17
+ data-events="resize">
18
+ <ul class="list-reset">
19
+ <li>
20
+ <button type="button" data-action="recategorize-projects">
21
+ <%= t("decidim.budgets.admin.projects.index.change_category") %>
22
+ </button>
23
+ </li>
24
+ <li>
25
+ <button type="button" data-action="scope-change-projects">
26
+ <%= t("decidim.budgets.admin.projects.index.change_scope") %>
27
+ </button>
28
+ </li>
29
+ <li>
30
+ <button type="button" data-action="change-selected-projects">
31
+ <%= t("decidim.budgets.admin.projects.index.change_selected") %>
32
+ </button>
33
+ </li>
34
+ </ul>
35
+ </div>
36
+ </div>
@@ -0,0 +1,15 @@
1
+ <div id="js-recategorize-projects-actions" class="hide js-bulk-action-form">
2
+ <%= form_tag(update_category_budget_projects_path, method: :post, remote: true, id: "js-form-recategorize-projects", class: "flex--cc flex-gap--1") do %>
3
+ <div class="checkboxes hide">
4
+ <% projects.each do |project| %>
5
+ <%= check_box_tag "project_ids[]", project.id, false, class: "js-check-all-resources js-resource-id-#{project.id}" %>
6
+ <% end %>
7
+ </div>
8
+
9
+ <%= bulk_categories_select current_component.categories %>
10
+
11
+ <%= submit_tag(t("decidim.budgets.admin.projects.index.update"), id: "js-submit-edit-category", class: "button small button--simple float-left") %>
12
+
13
+ <button id="js-cancel-edit-category" class="button tiny clear compact js-cancel-bulk-action" type="button"><%= t("decidim.budgets.admin.projects.index.cancel") %></button>
14
+ <% end %>
15
+ </div>
@@ -0,0 +1,25 @@
1
+ <div id="js-scope-change-projects-actions" class="hide js-bulk-action-form">
2
+ <%= form_tag(update_scope_budget_projects_path, method: :post, remote: true, id: "js-form-scope-change-projects", class: "flex--cc flex-gap--1") do %>
3
+ <div class="checkboxes hide">
4
+ <% projects.each do |project| %>
5
+ <%= check_box_tag "project_ids[]", project.id, false, class: "js-check-all-resources js-resource-id-#{project.id}" %>
6
+ <% end %>
7
+ </div>
8
+
9
+ <%= scopes_picker_tag(
10
+ :scope_id,
11
+ try(:current_participatory_space)&.scope,
12
+ field: t("models.project.fields.scope", scope: "decidim.budgets")
13
+ ) %>
14
+
15
+ <%= submit_tag(
16
+ t("decidim.budgets.admin.projects.index.update_scope_button"),
17
+ id: "js-submit-scope-change-projects",
18
+ class: "button small button--simple float-left"
19
+ ) %>
20
+
21
+ <button id="js-cancel-scope-change-projects" class="button tiny clear compact js-cancel-bulk-action" type="button">
22
+ <%= t("decidim.budgets.admin.projects.index.cancel") %>
23
+ </button>
24
+ <% end %>
25
+ </div>
@@ -4,14 +4,9 @@
4
4
  <div>
5
5
  <%= link_to translated_attribute(budget.title), budgets_path %> &gt;
6
6
  <%= t(".title") %>
7
+ <span id="js-selected-resources-count" class="component-counter component-counter--inline" title="<%= t("decidim.budgets.admin.projects.index.selected") %>"></span>
7
8
  </div>
8
- <div class="flex--cc flex-gap--1">
9
- <%= link_to t("actions.import", scope: "decidim.budgets", name: t("models.project.name", scope: "decidim.budgets.admin")), new_budget_proposals_import_path(budget), class: "button tiny button--title" if allowed_to? :import_proposals, :project %>
10
- <% if allowed_to? :export, :budget %>
11
- <%= export_dropdown(current_component, budget.id) %>
12
- <% end %>
13
- <%= link_to t("actions.new", scope: "decidim.budgets", name: t("models.project.name", scope: "decidim.budgets.admin")), new_budget_project_path, class: "button tiny button--title new" if allowed_to? :create, :project %>
14
- </div>
9
+ <%= render partial: "bulk-actions" %>
15
10
  </h2>
16
11
  </div>
17
12
 
@@ -21,6 +16,7 @@
21
16
  <table class="table-list">
22
17
  <thead>
23
18
  <tr>
19
+ <th><%= check_box_tag "projects_bulk", "all", false, class: "js-check-all" %></th>
24
20
  <th><%= sort_link(query, :id, t("models.project.fields.id", scope: "decidim.budgets"), default_order: :desc) %>
25
21
  <th><%= sort_link(query, :title, t("models.project.fields.title", scope: "decidim.budgets")) %></th>
26
22
  <th><%= sort_link(query, :category_name, t("models.project.fields.category", scope: "decidim.budgets") ) %></th>
@@ -32,53 +28,7 @@
32
28
  </thead>
33
29
  <tbody>
34
30
  <% projects.each do |project| %>
35
- <tr data-id="<%= project.id %>">
36
- <td>
37
- <%= project.id %><br>
38
- </td>
39
- <td>
40
- <%= translated_attribute(project.title) %><br>
41
- </td>
42
- <td>
43
- <% if project.category %>
44
- <%= translated_attribute project.category.name %>
45
- <% end %>
46
- </td>
47
- <%= td_resource_scope_for(project.scope) %>
48
- <td>
49
- <%= project.confirmed_orders_count %>
50
- </td>
51
- <td>
52
- <% if project.selected? %>
53
- <%= content_tag :strong, t(".selected"), class: "text-success" %>
54
- <% else %>
55
- <%= content_tag :span, "×", class: "text-muted" %>
56
- <% end %>
57
- </td>
58
- <td class="table-list__actions">
59
- <%= icon_link_to "eye", resource_locator([budget, project]).path, t("actions.preview", scope: "decidim.budgets"), target: :blank, class: "action-icon--preview" %>
60
-
61
- <% if allowed_to? :update, :project, project: project %>
62
- <%= icon_link_to "pencil", resource_locator([budget, project]).edit, t("actions.edit", scope: "decidim.budgets"), class: "action-icon--edit" %>
63
- <% end %>
64
-
65
- <% if allowed_to? :update, :project, project: project %>
66
- <%= icon_link_to "folder", project_attachment_collections_path(project), t("actions.attachment_collections", scope: "decidim.budgets"), class: "action-icon--attachment_collections" %>
67
- <% end %>
68
-
69
- <% if allowed_to? :update, :project, project: project %>
70
- <%= icon_link_to "paperclip", project_attachments_path(project), t("actions.attachments", scope: "decidim.budgets"), class: "action-icon--attachments" %>
71
- <% end %>
72
-
73
- <%= resource_permissions_link(project) %>
74
-
75
- <% if allowed_to? :destroy, :project, project: project %>
76
- <%= icon_link_to "circle-x", resource_locator([budget, project]).show, t("actions.destroy", scope: "decidim.budgets"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.budgets") } %>
77
- <% else %>
78
- <%= icon "circle-x", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.destroy", scope: "decidim.budgets") %>
79
- <% end %>
80
- </td>
81
- </tr>
31
+ <%= render partial: "project-tr", locals: { project: project } %>
82
32
  <% end %>
83
33
  </tbody>
84
34
  </table>
@@ -91,3 +41,5 @@
91
41
  <strong><%= t ".pending_orders" %>:&nbsp;</strong><span><%= pending_orders.count %></span>
92
42
  </div>
93
43
  </div>
44
+
45
+ <%= javascript_pack_tag "decidim_budgets_admin" %>
@@ -0,0 +1,26 @@
1
+ <% if flash.now[:error].present? %>
2
+ $("<%= form_selector %> <%= attribute_selector %>").addClass("is-invalid-input")
3
+ $("<%= escape_javascript(render partial: %q{decidim/admin/shared/js-callout}, locals: { css: %q{alert}, text: flash.now[:error] }) %>").appendTo(".callout-wrapper");
4
+ <% end %>
5
+
6
+ <% if flash.now[:alert].present? %>
7
+ $("<%= form_selector %> <%= attribute_selector %>").removeClass("is-invalid-input")
8
+ $("<%= escape_javascript(render partial: %q{decidim/admin/shared/js-callout}, locals: { css: %q{warning}, text: flash.now[:alert] }) %>").appendTo(".callout-wrapper");
9
+ <% end %>
10
+
11
+ <% if flash.now[:notice].present? %>
12
+ $("<%= escape_javascript(render partial: %q{decidim/admin/shared/js-callout}, locals: { css: %q{success}, text: flash.now[:notice] }) %>").appendTo(".callout-wrapper");
13
+
14
+ <% project_ids.each do |id| %>
15
+ $(".table-list [data-id='<%= id %>']")
16
+ .replaceWith("<%= escape_javascript(render partial: %q{project-tr}, locals: { project: Decidim::Budgets::Project.find(id) }) %>");
17
+ <% end %>
18
+
19
+ $("<%= form_selector %> <%= attribute_selector %>").removeClass("is-invalid-input")
20
+ $(".js-check-all").prop('checked', false);
21
+ $(".js-check-all-resources").prop('checked', false);
22
+ window.hideBulkActionsButton();
23
+ window.hideBulkActionForms();
24
+ window.showOtherActionsButtons();
25
+ window.selectedResourcesCountUpdate();
26
+ <% end %>
@@ -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="projects">
10
10
  <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
@@ -15,15 +15,15 @@
15
15
  </div>
16
16
 
17
17
  <% if voting_finished? %>
18
- <%= form.check_boxes_tree :status, filter_status_values, legend_title: t(".status"), "aria-controls": "projects" %>
18
+ <%= form.check_boxes_tree :with_any_status, filter_status_values, legend_title: t(".status"), "aria-controls": "projects" %>
19
19
  <% end %>
20
20
 
21
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" %>
22
+ <%= form.check_boxes_tree :with_any_scope, resource_filter_scope_values(budget.scope), legend_title: t(".scope"), "aria-controls": "projects" %>
23
23
  <% end %>
24
24
 
25
25
  <% if current_participatory_space.categories.any? %>
26
- <%= form.check_boxes_tree :category_id, filter_categories_values, legend_title: t(".category"), "aria-controls": "projects" %>
26
+ <%= form.check_boxes_tree :with_any_category, filter_categories_values, legend_title: t(".category"), "aria-controls": "projects" %>
27
27
  <% end %>
28
28
 
29
29
  <%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
@@ -5,6 +5,31 @@
5
5
 
6
6
  <div class="voting-wrapper">
7
7
  <div class="row columns">
8
+ <% if component_settings.geocoding_enabled? %>
9
+ <%= dynamic_map_for projects_data_for_map(all_geocoded_projects) do %>
10
+ <template id="marker-popup">
11
+ <div class="map-info__content">
12
+ <h3>${title}</h3>
13
+ <div id="bodyContent">
14
+ <p>{{html body}}</p>
15
+ <div class="map__date-address">
16
+ <div class="address card__extra">
17
+ <div class="address__icon">{{html icon}}</div>
18
+ <div class="address__details">
19
+ <span>${address}</span><br>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <div class="map-info__button">
24
+ <a href="${link}" class="button button--sc">
25
+ <%= t(".view_project") %>
26
+ </a>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </template>
31
+ <% end %>
32
+ <% end %>
8
33
  <% if voting_finished? %>
9
34
  <h2 class="heading2">
10
35
  <%= t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)) %>
@@ -33,4 +58,6 @@
33
58
  </div>
34
59
  </div>
35
60
 
36
- <%= javascript_pack_tag("decidim_budgets") %>
61
+ <% content_for :js_content do %>
62
+ <%= javascript_pack_tag "decidim_budgets" %>
63
+ <% end %>
@@ -55,6 +55,9 @@ edit_link(
55
55
  </div>
56
56
  <div class="columns mediumlarge-8 mediumlarge-pull-4">
57
57
  <div class="section">
58
+ <% if component_settings.geocoding_enabled? && project.geocoded? %>
59
+ <%= render partial: "decidim/shared/static_map", locals: { icon_name: "projects", geolocalizable: project } %>
60
+ <% end %>
58
61
  <%= cell("decidim/budgets/project_selected_status", project, as_label: true) %>
59
62
  <%= decidim_sanitize_editor translated_attribute project.description %>
60
63
  <%= cell "decidim/budgets/project_tags", project, context: { extra_classes: ["tags--project"] } %>
@@ -68,4 +71,6 @@ edit_link(
68
71
 
69
72
  <%= comments_for project, polymorphic: [project.budget] %>
70
73
 
71
- <%= javascript_pack_tag("decidim_budgets") %>
74
+ <% content_for :js_content do %>
75
+ <%= javascript_pack_tag "decidim_budgets" %>
76
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <p><%= t(".email_intro") %></p>
2
+
3
+ <p><%= t(".email_budgets") %></p>
4
+
5
+ <ul>
6
+ <% @orders.each do |order| %>
7
+ <li>
8
+ <%= link_to(
9
+ translated_attribute(order.budget.title),
10
+ routes.budget_url(order.budget, host: @organization.host)
11
+ ) %>
12
+ </li>
13
+ <% end %>
14
+ </ul>
15
+
16
+ <p><%= t(".email_outro") %></p>
17
+
18
+ <%= link_to(
19
+ t(".email_link"),
20
+ routes.root_url(host: @organization.host)
21
+ ) %>
data/config/assets.rb CHANGED
@@ -4,6 +4,7 @@ base_path = File.expand_path("..", __dir__)
4
4
 
5
5
  Decidim::Webpacker.register_path("#{base_path}/app/packs")
6
6
  Decidim::Webpacker.register_entrypoints(
7
- decidim_budgets: "#{base_path}/app/packs/entrypoints/decidim_budgets.js"
7
+ decidim_budgets: "#{base_path}/app/packs/entrypoints/decidim_budgets.js",
8
+ decidim_budgets_admin: "#{base_path}/app/packs/entrypoints/decidim_budgets_admin.js"
8
9
  )
9
10
  Decidim::Webpacker.register_stylesheet_import("stylesheets/decidim/budgets/budgets")
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ar:
2
3
  activemodel:
3
4
  attributes:
@@ -60,6 +61,9 @@ ar:
60
61
  title: تحرير المشروع
61
62
  update: تحديث
62
63
  index:
64
+ actions: الإجراءات
65
+ cancel: إلغاء
66
+ change_category: تغيير الفئة
63
67
  finished_orders: الانتهاء من الأصوات
64
68
  pending_orders: في انتظار الأصوات
65
69
  title: مشاريع
@@ -1,3 +1,4 @@
1
+ ---
1
2
  bg:
2
3
  activemodel:
3
4
  attributes:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ca:
2
3
  activemodel:
3
4
  attributes:
@@ -88,16 +89,40 @@ ca:
88
89
  title: Editar projecte
89
90
  update: Actualitzar
90
91
  index:
92
+ actions: Accions
93
+ cancel: Cancel·lar
94
+ change_category: Canviar categoria
95
+ change_scope: Canviar àmbit
96
+ change_selected: Canviar la selecció
97
+ deselect_implementation: Deseleccionar
91
98
  finished_orders: Vots finalitzats
92
99
  pending_orders: Vots en procés
100
+ select_for_implementation: Seleccionar
93
101
  selected: Seleccionat
94
102
  title: Projectes
103
+ update: Actualitzar
104
+ update_scope_button: Actualitzar àmbit
95
105
  new:
96
106
  create: Crear
97
107
  title: Nou projecte
98
108
  update:
99
109
  invalid: S'ha produït un error en actualitzar aquest projecte
100
110
  success: Projecte actualitzat correctament
111
+ update_category:
112
+ invalid: 'Aquestes propostes ja tenien la categoria %{subject_name}: %{projects}.'
113
+ select_a_category: Si us plau, selecciona una categoria
114
+ select_a_project: Si us plau, selecciona un projecte
115
+ success: 'Els projectes s''han actualitzat correctament a la categoria %{subject_name}: %{projects}.'
116
+ update_scope:
117
+ invalid: 'Aquests projectes ja estaven assignats a l''àmbit %{subject_name}: %{projects}.'
118
+ select_a_project: Si us plau, selecciona un projecte
119
+ select_a_scope: Si us plau, selecciona un àmbit
120
+ success: 'Els projectes s''han actualitzat correctament a l''àmbit %{subject_name}: %{projects}.'
121
+ update_selected:
122
+ invalid: 'Aquests projectes ja estaven seleccionats: %{projects}.'
123
+ select_a_project: Si us plau, selecciona un projecte
124
+ select_a_selection: Si us plau, fes una selecció
125
+ success: 'Selecció de projectes modificada correctament: %{projects}.'
101
126
  proposals_imports:
102
127
  create:
103
128
  invalid: S'ha produït un error en importar les propostes en projectes
@@ -110,6 +135,12 @@ ca:
110
135
  origin_component_id: Component d'origen
111
136
  select_component: Selecciona un component
112
137
  title: Importar propostes
138
+ reminders:
139
+ orders:
140
+ description: Les usuàries rebran un correu amb els enllaços als pressupostos on tenen "comandes" pendents.
141
+ title:
142
+ one: Estàs a punt d'enviar un correu recordatori a %{count} usuària
143
+ other: Estàs a punt d'enviar un correu recordatori a les usuàries %{count}
113
144
  admin_log:
114
145
  budget:
115
146
  create: "%{user_name} ha creat el pressupost %{resource_name} a l'espai %{space_name}"
@@ -141,6 +172,8 @@ ca:
141
172
  show: Mostra els projectes
142
173
  vote: Vota
143
174
  voted_on: Has votat a %{links}
175
+ last_activity:
176
+ new_vote_at_html: "<span>Nova votació pressupostària a %{link}</span>"
144
177
  limit_announcement:
145
178
  cant_vote: No pots votar a aquests pressupostos. <a href="%{landing_path}"> Prova amb un altre pressupost </a>.
146
179
  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>.
@@ -154,6 +187,7 @@ ca:
154
187
  fields:
155
188
  category: Categoria
156
189
  id: ID
190
+ scope: Àmbit
157
191
  title: Títol
158
192
  order_summary_mailer:
159
193
  order_summary:
@@ -170,13 +204,13 @@ ca:
170
204
  title: Confirmar vot
171
205
  budget_excess:
172
206
  budget_excess:
173
- description: Aquest projecte sobrepassa el pressupost màxim i no es pot afegir. Si ho desitges, pots eliminar un projecte ja seleccionat per afegir aquest o donar suport d'acord amb les teves preferències.
207
+ description: Aquest projecte sobrepassa el pressupost màxim i no es pot afegir. Si ho desitges, pots eliminar un projecte ja seleccionat per afegir aquest o votar d'acord amb les teves preferències.
174
208
  title: Pressupost excedit
175
209
  close: Tancar
176
- description: Aquest projecte sobrepassa el pressupost màxim i no es pot afegir. Si ho desitges, pots eliminar un projecte ja seleccionat per afegir aquest o donar suport d'acord amb les teves preferències.
210
+ description: Aquest projecte sobrepassa el pressupost màxim i no es pot afegir. Si ho desitges, pots eliminar un projecte ja seleccionat per afegir aquest o votar d'acord amb les teves preferències.
177
211
  ok: D'acord
178
212
  projects_excess:
179
- description: Aquest projecte sobrepassa el pressupost màxim i no es pot afegir. Si ho desitges, pots eliminar un projecte ja seleccionat per afegir aquest o donar suport d'acord amb les teves preferències.
213
+ description: Aquest projecte sobrepassa el pressupost màxim i no es pot afegir. Si ho desitges, pots eliminar un projecte ja seleccionat per afegir aquest o votar d'acord amb les teves preferències.
180
214
  title: Màxim de projectes excedit
181
215
  budget_summary:
182
216
  are_you_sure: Segur que vols cancel·lar el teu vot?
@@ -226,6 +260,8 @@ ca:
226
260
  filter: Filtra
227
261
  filter_by: Filtra per
228
262
  unfold: Desplegar
263
+ index:
264
+ view_project: Veure projecte
229
265
  order_progress:
230
266
  vote: Vota
231
267
  order_selected_projects:
@@ -259,6 +295,15 @@ ca:
259
295
  show:
260
296
  budget: Pressupost
261
297
  view_all_projects: Veure tots els projectes
298
+ vote_reminder_mailer:
299
+ vote_reminder:
300
+ email_budgets: 'Àrees a les quals no has finalitzat el vot:'
301
+ email_intro: Has iniciat la votació als pressupostos participatius, però no l'has completat.
302
+ email_link: Ves-hi i segueix votant
303
+ email_outro: Si us plau, recorda completar el vot. Per votar, primer has de seleccionar la proposta o propostes que vols votar i a després confirmar el teu vot amb el botó "Votar".
304
+ email_subject:
305
+ one: Tens un vot no finalitzat a la votació dels pressupostos participatius
306
+ other: Tens alguns vots no finalitzats a la votació dels pressupostos participatius
262
307
  components:
263
308
  budgets:
264
309
  actions:
@@ -274,6 +319,7 @@ ca:
274
319
  errors:
275
320
  budget_voting_rule_only_one: Cal activar com a mínim una norma per a la votació
276
321
  budget_voting_rule_required: Es requereix una norma per a la votació
322
+ geocoding_enabled: Geolocalització habilitada
277
323
  landing_page_content: Pàgina d'inici de pressupostos
278
324
  more_information_modal: Finestra de "Més informació"
279
325
  projects_per_page: Projectes per pàgina
@@ -1,3 +1,4 @@
1
+ ---
1
2
  cs:
2
3
  activemodel:
3
4
  attributes:
@@ -90,16 +91,40 @@ cs:
90
91
  title: Upravit projekt
91
92
  update: Aktualizace
92
93
  index:
94
+ actions: Akce
95
+ cancel: Zrušit
96
+ change_category: Změnit kategorii
97
+ change_scope: Změnit rozsah
98
+ change_selected: Změnit vybrané
99
+ deselect_implementation: Zrušit výběr
93
100
  finished_orders: Dokončené hlasy
94
101
  pending_orders: Čeká na hlasování
102
+ select_for_implementation: Vybrat
95
103
  selected: Vybrané
96
104
  title: Projekty
105
+ update: Aktualizovat
106
+ update_scope_button: Aktualizovat rozsah
97
107
  new:
98
108
  create: Vytvořit
99
109
  title: Nový projekt
100
110
  update:
101
111
  invalid: Při aktualizaci tohoto projektu došlo k problému
102
112
  success: Projekt byl úspěšně aktualizován
113
+ update_category:
114
+ invalid: 'Tyto projekty již mají kategorii %{subject_name}: %{projects}.'
115
+ select_a_category: Vyberte prosím kategorii
116
+ select_a_project: Vyberte projekt
117
+ success: 'Projekty byly úspěšně aktualizovány do kategorie %{subject_name}: %{projects}.'
118
+ update_scope:
119
+ invalid: 'Tyto projekty již mají rozsah %{subject_name}: %{projects}.'
120
+ select_a_project: Vyberte projekt
121
+ select_a_scope: Vyberte prosím rozsah
122
+ success: 'Projekty byly úspěšně aktualizovány na rozsah %{subject_name}: %{projects}.'
123
+ update_selected:
124
+ invalid: 'Tyto projekty již mají stejný výběr: %{projects}.'
125
+ select_a_project: Vyberte projekt
126
+ select_a_selection: Vyberte prosím výběr
127
+ success: 'Výběr projektů byl úspěšně změněn: %{projects}.'
103
128
  proposals_imports:
104
129
  create:
105
130
  invalid: Při importu návrhů do projektů došlo k problému
@@ -112,6 +137,14 @@ cs:
112
137
  origin_component_id: Původ komponenty
113
138
  select_component: Vyberte součást
114
139
  title: Importovat návrhy
140
+ reminders:
141
+ orders:
142
+ description: Uživatelé obdrží e-mail s odkazy na rozpočty, kde se čeká na vyjádření.
143
+ title:
144
+ one: Chystáte se odeslat připomenutí e-mailu %{count} uživateli
145
+ few: Chystáte se odeslat připomenutí e-mailu %{count} uživatelům
146
+ many: Chystáte se odeslat připomenutí e-mailu %{count} uživatelům
147
+ other: Chystáte se odeslat připomenutí e-mailu %{count} uživatelům
115
148
  admin_log:
116
149
  budget:
117
150
  create: "%{user_name} vytvořil %{resource_name} rozpočet ve skupině %{space_name}"
@@ -143,6 +176,8 @@ cs:
143
176
  show: Zobrazit projekty
144
177
  vote: Hlasovat
145
178
  voted_on: Hlasovali jste pro %{links}
179
+ last_activity:
180
+ new_vote_at_html: "<span>Nové hlasování o rozpočtu v %{link}</span>"
146
181
  limit_announcement:
147
182
  cant_vote: O tomto rozpočtu nelze hlasovat. <a href="%{landing_path}">Zkuste jiný rozpočet</a>.
148
183
  limit_reached: Máte aktivní hlasy v %{links}. Chcete-li hlasovat o tomto rozpočtu, musíte <a href="%{landing_path}">smazat svůj hlas a začít znovu</a>.
@@ -156,6 +191,7 @@ cs:
156
191
  fields:
157
192
  category: Kategorie
158
193
  id: ID
194
+ scope: Rozsah
159
195
  title: Titul
160
196
  order_summary_mailer:
161
197
  order_summary:
@@ -230,6 +266,8 @@ cs:
230
266
  filter: Filtr
231
267
  filter_by: Filtrovat podle
232
268
  unfold: Rozbalit
269
+ index:
270
+ view_project: Zobrazit projekt
233
271
  order_progress:
234
272
  vote: Hlasovat
235
273
  order_selected_projects:
@@ -267,6 +305,17 @@ cs:
267
305
  show:
268
306
  budget: Rozpočet
269
307
  view_all_projects: Zobrazit všechny projekty
308
+ vote_reminder_mailer:
309
+ vote_reminder:
310
+ email_budgets: 'Oblasti, kde máte nedokončené hlasování:'
311
+ email_intro: Zahájili jste hlasování o participačním rozpočtu, ale nedokončili jste ho.
312
+ email_link: Pokračovat v hlasování
313
+ email_outro: Nezapomeňte prosím dokončit hlasování. Chcete-li hlasovat, musíte nejprve vybrat návrh nebo návrhy, o kterých chcete hlasovat, a potvrdit svůj hlas pomocí tlačítka "Hlasování".
314
+ email_subject:
315
+ one: Máte nedokončené hlasování v participativním rozpočtovém hlasování
316
+ few: Máte nedokončené hlasování v participativním rozpočtovém hlasování
317
+ many: Máte nedokončená hlasování v participativním rozpočtovém hlasování
318
+ other: Máte nedokončené hlasování v participativním rozpočtovém hlasování
270
319
  components:
271
320
  budgets:
272
321
  actions:
@@ -282,6 +331,7 @@ cs:
282
331
  errors:
283
332
  budget_voting_rule_only_one: Pouze jedno hlasovací pravidlo musí být povoleno
284
333
  budget_voting_rule_required: Je vyžadováno jedno pravidlo hlasování
334
+ geocoding_enabled: Geokódování aktivováno
285
335
  landing_page_content: Úvodní stránka rozpočtů
286
336
  more_information_modal: Více informací
287
337
  projects_per_page: Počet projektů na stránku