decidim-budgets 0.29.2 → 0.30.0.rc2

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.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/budgets/budget_list_item/vote_action.erb +2 -2
  3. data/app/cells/decidim/budgets/budgets_list/main_list.erb +1 -1
  4. data/app/cells/decidim/budgets/budgets_list/show.erb +1 -1
  5. data/app/cells/decidim/budgets/project_history_cell.rb +48 -0
  6. data/app/cells/decidim/budgets/project_metadata_cell.rb +3 -3
  7. data/app/cells/decidim/budgets/project_vote_button/show.erb +4 -2
  8. data/app/cells/decidim/budgets/project_vote_button_cell.rb +4 -0
  9. data/app/commands/decidim/budgets/admin/create_budget.rb +1 -1
  10. data/app/commands/decidim/budgets/admin/create_project.rb +1 -1
  11. data/app/commands/decidim/budgets/admin/import_proposals_to_budgets.rb +1 -8
  12. data/app/commands/decidim/budgets/admin/update_budget.rb +1 -1
  13. data/app/commands/decidim/budgets/admin/update_project.rb +2 -2
  14. data/app/commands/decidim/budgets/admin/update_project_selection.rb +1 -1
  15. data/app/controllers/concerns/decidim/budgets/admin/filterable.rb +7 -11
  16. data/app/controllers/decidim/budgets/admin/budgets_controller.rb +12 -15
  17. data/app/controllers/decidim/budgets/admin/projects_controller.rb +61 -85
  18. data/app/controllers/decidim/budgets/orders_controller.rb +7 -3
  19. data/app/controllers/decidim/budgets/projects_controller.rb +7 -16
  20. data/app/forms/decidim/budgets/admin/budget_form.rb +0 -17
  21. data/app/forms/decidim/budgets/admin/project_form.rb +7 -33
  22. data/app/forms/decidim/budgets/admin/project_import_proposals_form.rb +0 -11
  23. data/app/helpers/decidim/budgets/projects_helper.rb +6 -31
  24. data/app/models/decidim/budgets/budget.rb +2 -0
  25. data/app/models/decidim/budgets/project.rb +21 -1
  26. data/app/packs/stylesheets/budgets.scss +6 -4
  27. data/app/permissions/decidim/budgets/admin/permissions.rb +4 -4
  28. data/app/presenters/decidim/budgets/admin_log/budget_presenter.rb +1 -1
  29. data/app/presenters/decidim/budgets/admin_log/project_presenter.rb +1 -1
  30. data/app/presenters/decidim/budgets/project_presenter.rb +28 -0
  31. data/app/queries/decidim/budgets/filtered_projects.rb +2 -2
  32. data/app/queries/decidim/budgets/metrics/budget_followers_metric_measure.rb +2 -2
  33. data/app/queries/decidim/budgets/metrics/budget_participants_metric_measure.rb +2 -2
  34. data/app/serializers/decidim/budgets/download_your_data_budgets_order_serializer.rb +2 -2
  35. data/app/views/decidim/budgets/admin/budgets/_actions.html.erb +21 -0
  36. data/app/views/decidim/budgets/admin/budgets/_budget-tr.html.erb +18 -0
  37. data/app/views/decidim/budgets/admin/budgets/_budgets-thead.html.erb +8 -0
  38. data/app/views/decidim/budgets/admin/budgets/_form.html.erb +0 -6
  39. data/app/views/decidim/budgets/admin/budgets/index.html.erb +16 -48
  40. data/app/views/decidim/budgets/admin/budgets/manage_trash.html.erb +19 -0
  41. data/app/views/decidim/budgets/admin/projects/_actions.html.erb +27 -0
  42. data/app/views/decidim/budgets/admin/projects/_bulk-actions.html.erb +0 -2
  43. data/app/views/decidim/budgets/admin/projects/_form.html.erb +6 -8
  44. data/app/views/decidim/budgets/admin/projects/_project-tr.html.erb +2 -27
  45. data/app/views/decidim/budgets/admin/projects/_projects-thead.html.erb +14 -0
  46. data/app/views/decidim/budgets/admin/projects/bulk_actions/_dropdown.html.erb +7 -10
  47. data/app/views/decidim/budgets/admin/projects/bulk_actions/_taxonomy_change.html.erb +23 -0
  48. data/app/views/decidim/budgets/admin/projects/index.html.erb +19 -21
  49. data/app/views/decidim/budgets/admin/projects/manage_trash.html.erb +26 -0
  50. data/app/views/decidim/budgets/admin/projects/update_attribute.js.erb +1 -1
  51. data/app/views/decidim/budgets/admin/proposals_imports/new.html.erb +0 -5
  52. data/app/views/decidim/budgets/budgets/index.html.erb +7 -2
  53. data/app/views/decidim/budgets/order_summary_mailer/order_summary.html.erb +0 -10
  54. data/app/views/decidim/budgets/orders/status.html.erb +52 -0
  55. data/app/views/decidim/budgets/projects/_order.html.erb +1 -1
  56. data/app/views/decidim/budgets/projects/_order_progress_summary_content.html.erb +4 -4
  57. data/app/views/decidim/budgets/projects/index.html.erb +11 -18
  58. data/app/views/decidim/budgets/projects/index.js.erb +1 -1
  59. data/app/views/decidim/budgets/projects/show.html.erb +20 -10
  60. data/config/locales/ar.yml +3 -10
  61. data/config/locales/bg.yml +3 -43
  62. data/config/locales/ca.yml +95 -42
  63. data/config/locales/cs.yml +101 -42
  64. data/config/locales/de.yml +95 -42
  65. data/config/locales/el.yml +3 -39
  66. data/config/locales/en.yml +95 -42
  67. data/config/locales/es-MX.yml +95 -42
  68. data/config/locales/es-PY.yml +95 -42
  69. data/config/locales/es.yml +95 -42
  70. data/config/locales/eu.yml +95 -42
  71. data/config/locales/fi-plain.yml +95 -42
  72. data/config/locales/fi.yml +94 -41
  73. data/config/locales/fr-CA.yml +38 -44
  74. data/config/locales/fr.yml +38 -44
  75. data/config/locales/ga-IE.yml +0 -3
  76. data/config/locales/gl.yml +3 -7
  77. data/config/locales/hu.yml +3 -40
  78. data/config/locales/id-ID.yml +3 -3
  79. data/config/locales/is-IS.yml +0 -3
  80. data/config/locales/it.yml +3 -5
  81. data/config/locales/ja.yml +92 -42
  82. data/config/locales/kaa.yml +0 -1
  83. data/config/locales/ko.yml +0 -20
  84. data/config/locales/lb.yml +3 -5
  85. data/config/locales/lt.yml +3 -41
  86. data/config/locales/lv.yml +3 -3
  87. data/config/locales/nl.yml +3 -24
  88. data/config/locales/no.yml +3 -8
  89. data/config/locales/pl.yml +5 -43
  90. data/config/locales/pt-BR.yml +4 -43
  91. data/config/locales/pt.yml +3 -5
  92. data/config/locales/ro-RO.yml +3 -17
  93. data/config/locales/ru.yml +3 -3
  94. data/config/locales/sk.yml +3 -3
  95. data/config/locales/sq-AL.yml +0 -16
  96. data/config/locales/sv.yml +94 -41
  97. data/config/locales/tr-TR.yml +3 -5
  98. data/config/locales/uk.yml +3 -3
  99. data/config/locales/zh-CN.yml +3 -4
  100. data/config/locales/zh-TW.yml +3 -39
  101. data/db/migrate/20200827154129_add_commentable_counter_cache_to_projects.rb +1 -1
  102. data/db/migrate/20210310120613_add_followable_counter_cache_to_budgets.rb +1 -1
  103. data/db/migrate/20240828103724_add_deleted_at_to_decidim_budgets_budgets.rb +8 -0
  104. data/db/migrate/20240916135141_add_deleted_at_to_decidim_budgets_projects.rb +8 -0
  105. data/decidim-budgets.gemspec +1 -1
  106. data/lib/decidim/api/budget_type.rb +3 -6
  107. data/lib/decidim/api/budgets_type.rb +4 -5
  108. data/lib/decidim/api/project_type.rb +6 -8
  109. data/lib/decidim/budgets/admin_engine.rb +16 -2
  110. data/lib/decidim/budgets/component.rb +4 -5
  111. data/lib/decidim/budgets/engine.rb +1 -0
  112. data/lib/decidim/budgets/project_serializer.rb +16 -14
  113. data/lib/decidim/budgets/seeds.rb +0 -2
  114. data/lib/decidim/budgets/version.rb +1 -1
  115. metadata +27 -22
  116. data/app/cells/decidim/budgets/project_tags/show.erb +0 -5
  117. data/app/cells/decidim/budgets/project_tags_cell.rb +0 -18
  118. data/app/commands/decidim/budgets/admin/destroy_budget.rb +0 -17
  119. data/app/commands/decidim/budgets/admin/update_project_category.rb +0 -48
  120. data/app/commands/decidim/budgets/admin/update_project_scope.rb +0 -54
  121. data/app/helpers/decidim/budgets/admin/application_helper.rb +0 -13
  122. data/app/views/decidim/budgets/admin/projects/bulk_actions/_recategorize.html.erb +0 -15
  123. data/app/views/decidim/budgets/admin/projects/bulk_actions/_scope-change.html.erb +0 -22
@@ -13,13 +13,8 @@
13
13
  <% end %>
14
14
  </td>
15
15
  <td>
16
- <% if project.category %>
17
- <%= translated_attribute project.category.name %>
18
- <% end %>
16
+ <%= project.taxonomies.map { |taxonomy| decidim_sanitize_translated(taxonomy.name) }.join(", ") %>
19
17
  </td>
20
- <% if current_component.has_subscopes? %>
21
- <%= td_resource_scope_for(project.scope) %>
22
- <% end %>
23
18
  <td>
24
19
  <%= project.confirmed_orders_count %>
25
20
  </td>
@@ -36,26 +31,6 @@
36
31
  </td>
37
32
  <% end %>
38
33
  <td class="table-list__actions">
39
- <% if allowed_to? :update, :project, project: project %>
40
- <%= icon_link_to "pencil-line", resource_locator([budget, project]).edit, t("actions.edit", scope: "decidim.budgets"), class: "action-icon--edit" %>
41
- <% end %>
42
-
43
- <% if allowed_to? :update, :project, project: project %>
44
- <%= icon_link_to "folder-line", project_attachment_collections_path(project), t("actions.attachment_collections", scope: "decidim.budgets"), class: "action-icon--attachment_collections" %>
45
- <% end %>
46
-
47
- <% if allowed_to? :update, :project, project: project %>
48
- <%= icon_link_to "attachment-line", project_attachments_path(project), t("actions.attachments", scope: "decidim.budgets"), class: "action-icon--attachments" %>
49
- <% end %>
50
-
51
- <%= icon_link_to "eye-line", resource_locator([budget, project]).path, t("actions.preview", scope: "decidim.budgets"), target: :blank, class: "action-icon--preview", data: { "external-link": false } %>
52
-
53
- <%= resource_permissions_link(project) %>
54
-
55
- <% if allowed_to? :destroy, :project, project: project %>
56
- <%= icon_link_to "delete-bin-line", 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") } %>
57
- <% else %>
58
- <%= icon "delete-bin-line", class: "action-icon action-icon--disabled", role: "img", aria_label: t("actions.destroy", scope: "decidim.budgets") %>
59
- <% end %>
34
+ <%= render partial: "decidim/budgets/admin/projects/actions", locals: { project:, view: } %>
60
35
  </td>
61
36
  </tr>
@@ -0,0 +1,14 @@
1
+ <thead>
2
+ <tr>
3
+ <th><%= check_box_tag "projects_bulk", "all", false, class: "js-check-all" %></th>
4
+ <th><%= sort_link(query, :id, t("models.project.fields.id", scope: "decidim.budgets"), default_order: :desc) %></th>
5
+ <th class="!text-left"><%= sort_link(query, :title, t("models.project.fields.title", scope: "decidim.budgets")) %></th>
6
+ <th><%= sort_link(query, :taxonomies_name, t("models.project.fields.taxonomies", scope: "decidim.budgets") ) %></th>
7
+ <th><%= sort_link(query, :confirmed_orders_count, t("index.confirmed_orders_count")) %></th>
8
+ <th><%= sort_link(query, :selected, t("projects.index.selected", scope: "decidim.budgets.admin")) %></th>
9
+ <% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
10
+ <th><%= t("models.project.fields.map", scope: "decidim.budgets") %></th>
11
+ <% end %>
12
+ <th><%= t("actions.title", scope: "decidim.budgets") %></th>
13
+ </tr>
14
+ </thead>
@@ -17,16 +17,13 @@
17
17
  data-auto-focus="false"
18
18
  data-events="resize">
19
19
  <ul>
20
- <li>
21
- <button type="button" data-action="recategorize-projects">
22
- <%= t("decidim.budgets.admin.projects.index.change_category") %>
23
- </button>
24
- </li>
25
- <li>
26
- <button type="button" data-action="scope-change-projects">
27
- <%= t("decidim.budgets.admin.projects.index.change_scope") %>
28
- </button>
29
- </li>
20
+ <% if current_component_taxonomy_filters&.any? %>
21
+ <li>
22
+ <button type="button" data-action="taxonomy-change-projects">
23
+ <%= t("decidim.budgets.admin.projects.index.change_taxonomies") %>
24
+ </button>
25
+ </li>
26
+ <% end %>
30
27
  <li>
31
28
  <button type="button" data-action="change-selected-projects">
32
29
  <%= t("decidim.budgets.admin.projects.index.change_selected") %>
@@ -0,0 +1,23 @@
1
+ <div id="js-taxonomy-change-projects-actions" class="item_show__header__action-options js-bulk-action-form hide">
2
+ <%= form_tag(update_taxonomies_budget_projects_path, method: :post, id: "js-form-taxonomy-change-projects", class: "form form-defaults w-full") do %>
3
+ <div class="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
+ <% current_component_taxonomy_filters.each do |filter| %>
10
+ <div class="row column">
11
+ <label class="w-full font-semibold block mb-4" for="taxonomies_for_filter_<%= filter.id %>">
12
+ <%= decidim_sanitize_translated(filter.name) %>
13
+ <%= select_tag "taxonomies[]", options_for_select(taxonomy_items_options_for_filter(filter)), include_blank: I18n.t("decidim.taxonomies.prompt"), class: "w-full mt-2", id: "taxonomies_for_filter_#{filter.id}" %>
14
+ </label>
15
+ </div>
16
+ <% end %>
17
+
18
+ <div class="flex justify-end gap-x-4 mt-4">
19
+ <%= submit_tag(t("decidim.budgets.admin.projects.index.change_taxonomies"), id: "js-submit-taxonomy-change-projects", class: "button button__sm button__secondary small button--simple float-left") %>
20
+ <button class="button button__sm button__secondary js-cancel-bulk-action" type="button"><%= t("decidim.budgets.admin.projects.index.cancel") %></button>
21
+ </div>
22
+ <% end %>
23
+ </div>
@@ -1,6 +1,6 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="card">
3
- <div class="item_show__header">
3
+ <div class="item_show__header item_show__header--with-action-options">
4
4
  <h1 class="item_show__header-title">
5
5
  <div>
6
6
  <%= link_to decidim_escape_translated(budget.title), budgets_path %> &gt;
@@ -9,33 +9,31 @@
9
9
  </div>
10
10
  <%= render partial: "bulk-actions" %>
11
11
  </h1>
12
+
13
+ <%= render partial: "decidim/budgets/admin/projects/bulk_actions/taxonomy_change" %>
12
14
  </div>
13
15
  <%= admin_filter_selector(:projects) %>
14
16
  <div class="table-scroll">
15
17
  <table class="table-list">
16
- <thead>
17
- <tr>
18
- <th><%= check_box_tag "projects_bulk", "all", false, class: "js-check-all" %></th>
19
- <th><%= sort_link(query, :id, t("models.project.fields.id", scope: "decidim.budgets"), default_order: :desc) %></th>
20
- <th class="!text-left"><%= sort_link(query, :title, t("models.project.fields.title", scope: "decidim.budgets")) %></th>
21
- <th><%= sort_link(query, :category_name, t("models.project.fields.category", scope: "decidim.budgets") ) %></th>
22
- <% if current_component.has_subscopes? %>
23
- <%= th_scope_sort_link %>
24
- <% end %>
25
- <th><%= sort_link(query, :confirmed_orders_count, t("index.confirmed_orders_count")) %></th>
26
- <th><%= sort_link(query, :selected, t(".selected")) %></th>
27
- <% if maps_enabled? && Decidim::Map.available?(:static, :geocoding) %>
28
- <th><%= t("models.project.fields.map", scope: "decidim.budgets") %></th>
29
- <% end %>
30
- <th><%= t("actions.title", scope: "decidim.budgets") %></th>
31
- </tr>
32
- </thead>
18
+ <%= render partial: "projects-thead" %>
33
19
  <tbody>
34
- <% projects.each do |project| %>
35
- <%= render partial: "project-tr", locals: { project: } %>
36
- <% end %>
20
+ <%= render partial: "decidim/budgets/admin/projects/project-tr",
21
+ collection: projects,
22
+ as: :project,
23
+ locals: { view: :index } %>
37
24
  </tbody>
38
25
  </table>
26
+ <% if allowed_to? :manage_trash, :project, participatory_space: current_participatory_space %>
27
+ <div class="card mt-4">
28
+ <%= link_to manage_trash_budget_projects_path(budget), class: "flex items-center underline text-secondary" do %>
29
+ <%= icon "delete-bin-2-line", class: "mr-2 fill-current text-secondary", role: "img" %>
30
+ <%= t("actions.view_deleted_projects", scope: "decidim.budgets") %>
31
+ <span class="ml-2">
32
+ <%= icon_with_tooltip("information-line", t("actions.deleted_budgets_info", scope: "decidim.budgets")) %>
33
+ </span>
34
+ <% end %>
35
+ </div>
36
+ <% end %>
39
37
  <%= decidim_paginate projects %>
40
38
  </div>
41
39
  <div class="card-divider">
@@ -0,0 +1,26 @@
1
+ <% add_decidim_page_title(t(".title")) %>
2
+ <div class="card">
3
+ <div class="item_show__header">
4
+ <h1 class="item_show__header-title">
5
+ <div>
6
+ <%= link_to decidim_escape_translated(budget.title), budgets_path %> &gt;
7
+ <%= t(".title") %>
8
+ <span id="js-selected-resources-count" class="component-counter" title="<%= t("decidim.budgets.admin.projects.index.selected") %>"></span>
9
+ </div>
10
+ <%= render partial: "bulk-actions" %>
11
+ </h1>
12
+ </div>
13
+ <%= admin_filter_selector(:projects) %>
14
+ <div class="table-scroll">
15
+ <table class="table-list">
16
+ <%= render partial: "projects-thead" %>
17
+ <tbody>
18
+ <%= render partial: "decidim/budgets/admin/projects/project-tr",
19
+ collection: trashable_deleted_collection,
20
+ as: :project,
21
+ locals: { view: :deleted } %>
22
+ </tbody>
23
+ </table>
24
+ <%= decidim_paginate projects %>
25
+ </div>
26
+ </div>
@@ -17,7 +17,7 @@
17
17
 
18
18
  <% project_ids.each do |id| %>
19
19
  $(".table-list [data-id='<%= id %>']")
20
- .replaceWith("<%= escape_javascript(render partial: %q(project-tr), locals: { project: Decidim::Budgets::Project.find(id) }) %>");
20
+ .replaceWith("<%= escape_javascript(render partial: %q(project-tr), locals: { project: Decidim::Budgets::Project.find(id), view: :index }) %>");
21
21
  <% end %>
22
22
 
23
23
  $("<%= form_selector %> <%= attribute_selector %>").removeClass("is-invalid-input")
@@ -17,11 +17,6 @@
17
17
  <div class="row column">
18
18
  <%= f.select :origin_component_id, @form.origin_components_collection, prompt: t(".select_component"), label: t(".origin_component_id") %>
19
19
  </div>
20
- <% if current_component.scopes_enabled? %>
21
- <div class="row column">
22
- <%= scopes_select_field f, :scope_id, root: budget.scope %>
23
- </div>
24
- <% end %>
25
20
  <div class="row column">
26
21
  <%= f.number_field :default_budget, label: t(".default_budget") %>
27
22
  </div>
@@ -1,4 +1,9 @@
1
- <% add_decidim_page_title component_name %>
1
+ <% add_decidim_meta_tags(
2
+ description: translated_attribute(current_component.participatory_space.try(:description)),
3
+ title: component_name,
4
+ url: budgets_url,
5
+ resource: current_component) %>
6
+
2
7
  <%= append_javascript_pack_tag "decidim_budgets" %>
3
8
  <%= append_stylesheet_pack_tag "decidim_budgets", media: "all" %>
4
9
 
@@ -17,7 +22,7 @@
17
22
  <%= cell("decidim/budgets/budgets_header", current_workflow) %>
18
23
  </section>
19
24
 
20
- <section class="layout-main__section layout-main__heading">
25
+ <section class="layout-main__section layout-main__heading flex flex-col items-start">
21
26
  <%= cell("decidim/budgets/budgets_list", current_workflow) %>
22
27
  </section>
23
28
  <% end %>
@@ -1,18 +1,8 @@
1
- <% if @component.try(:scopes_enabled) %>
2
- <%= t(
3
- ".voted_on_space_with_scope",
4
- budget_name: translated_attribute(@budget.title),
5
- space_name: translated_attribute(@space.title),
6
- scope_name: translated_attribute(@component.scope.name),
7
- scope_type: translated_attribute(@component.scope.scope_type.name)
8
- ) %>
9
- <% else %>
10
1
  <%= t(
11
2
  ".voted_on_space",
12
3
  budget_name: translated_attribute(@budget.title),
13
4
  space_name: translated_attribute(@space.title)
14
5
  ) %>
15
- <% end %>
16
6
 
17
7
  <p><%= t(".selected_projects") %></p>
18
8
 
@@ -0,0 +1,52 @@
1
+ <%= render layout: "layouts/decidim/shared/layout_center" do %>
2
+ <div class="flex flex-col gap-4 items-center text-center my-12">
3
+ <div class="success-image">
4
+ <svg class="animation-success__checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
5
+ <circle class="animation-success__checkmark__circle" cx="26" cy="26" r="25" fill="none" />
6
+ <path class="animation-success__checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8" />
7
+ </svg>
8
+ </div>
9
+
10
+ <h1 class="h1 inline-block">
11
+ <%= t("title", scope: "decidim.budgets.order.status") %>
12
+ </h1>
13
+
14
+ <p>
15
+ <%= t(
16
+ "votes_count",
17
+ scope: "decidim.budgets.order.status",
18
+ count: current_order.total_projects,
19
+ budget_name: translated_attribute(current_order.budget.title)
20
+ ) %>
21
+ </p>
22
+
23
+ <% if pending_to_vote_budgets.present? %>
24
+ <p class="text-bold">
25
+ <%= t("pending_to_vote_budgets", scope: "decidim.budgets.order.status", count: pending_to_vote_budgets.count) %>
26
+ </p>
27
+ <% end %>
28
+ </div>
29
+
30
+ <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
31
+ <button class="button button__sm md:button__lg button__text-secondary">
32
+ <span><%= t("share_vote", scope: "decidim.budgets.order.status") %></span>
33
+ <%= icon "share-line", class: "fill-current" %>
34
+ </button>
35
+
36
+ <button class="button button__sm md:button__lg button__transparent-secondary">
37
+ <span><%= t("download_vote", scope: "decidim.budgets.order.status") %></span>
38
+ <%= icon "download-line", class: "fill-current" %>
39
+ </button>
40
+
41
+ <%= link_to budgets_path, class: "button button__sm md:button__lg button__secondary" do %>
42
+ <span>
43
+ <% if pending_to_vote_budgets.present? %>
44
+ <%= t("continue_voting", scope: "decidim.budgets.order.status") %>
45
+ <% else %>
46
+ <%= t("view_votes", scope: "decidim.budgets.order.status", count: current_order.total_projects) %>
47
+ <% end %>
48
+ </span>
49
+ <%= icon "arrow-right-line", class: "fill-current" %>
50
+ <% end %>
51
+ </div>
52
+ <% 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" %>
@@ -23,10 +23,10 @@
23
23
  <div class="budget-progress" role="progressbar" aria-label="<%= t("budget", scope: "decidim.budgets.projects.order_progress") %>" aria-valuenow="<%= current_order_budget_percent %>" aria-valuetext="<%= current_order_budget_percent %> %" aria-valuemin="0" aria-valuemax="100">
24
24
  <div class="budget-summary__progressbar--minimum" style="width: <%= current_order_budget_percent_minimum %>%">
25
25
  </div>
26
- <div class="budget-summary__progressbar--meter" style="width: <%= current_order_budget_percent %>%"> </div>
26
+ <div class="budget-summary__progressbar--meter bg-success" 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" style="width: <%= current_order_budget_percent_minimum %>%;">
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>
@@ -59,7 +59,7 @@
59
59
  <% end %>
60
60
  </div>
61
61
  <div class="budget-summary__button-modal">
62
- <button type="button" data-dialog-open="budget-modal-info" aria-haspopup="dialog" tabindex="0" class="button button__text button__xs">
62
+ <button type="button" data-dialog-open="budget-modal-info" aria-haspopup="dialog" tabindex="0" class="button button__text button__xs underline font-bold">
63
63
  <%= t("more_information", scope: "decidim.budgets.budget_information_modal") %>
64
64
  </button>
65
65
  </div>
@@ -69,7 +69,7 @@
69
69
  <div class="budget-progress relative" role="progressbar" aria-valuenow="<%= current_order_budget_percent %>" aria-valuetext="<%= current_order_budget_percent %>%" aria-valuemin="0" aria-valuemax="100">
70
70
  <div class="budget-summary__progressbar--minimum" style="width: <%= current_order_budget_percent_minimum %>%">
71
71
  </div>
72
- <div class="budget-summary__progressbar--meter" style="width: <%= current_order_budget_percent %>%">
72
+ <div class="budget-summary__progressbar--meter bg-success" style="width: <%= current_order_budget_percent %>%">
73
73
  </div>
74
74
  </div>
75
75
  <div class="budget-summary__progressbar-marks">
@@ -1,4 +1,12 @@
1
- <% add_decidim_page_title t("decidim.budgets.projects.projects_for", name: translated_attribute(budget.title)) %>
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
 
@@ -27,22 +35,7 @@
27
35
 
28
36
  <% if Decidim::Map.available?(:geocoding, :dynamic) && component_settings.geocoding_enabled? %>
29
37
  <div class="budget-list__map">
30
- <%= dynamic_map_for projects_data_for_map(all_geocoded_projects) do %>
31
- <template id="marker-popup">
32
- <div class="space-y-6">
33
- <a href="${link}" class="card__list">
34
- <div class="card__list-content">
35
- <h3 class="h4 card__list-title">${title}</h3>
36
- <div class="card__list-metadata">
37
- {{each JSON.parse(items)}}
38
- <span>{{html icon}}{{html text}}</span>
39
- {{/each}}
40
- </div>
41
- </div>
42
- </a>
43
- </div>
44
- </template>
45
- <% end %>
38
+ <%= cell "decidim/map", all_geocoded_projects, metadata_card: "decidim/budgets/project_metadata" %>
46
39
  </div>
47
40
  <% end %>
48
41
 
@@ -56,7 +49,7 @@
56
49
  </section>
57
50
  <% end %>
58
51
 
59
- <section id="projects" class="layout-main__section layout-main__heading">
52
+ <section id="projects" class="layout-main__section layout-main__heading budget__projects__container">
60
53
  <%= render partial: "projects" %>
61
54
  </section>
62
55
  <% else %>
@@ -11,7 +11,7 @@ $orderFilterInput.val('<%= order %>');
11
11
  var $map = $("#map");
12
12
  var controller = $map.data("map-controller");
13
13
  if (controller) {
14
- var markerData = JSON.parse('<%= escape_javascript projects_data_for_map(all_geocoded_projects).to_json.html_safe %>');
14
+ var markerData = JSON.parse('<%= escape_javascript cell("decidim/map", all_geocoded_projects, metadata_card: "decidim/budgets/project_metadata").geocoded_data.to_json.html_safe %>');
15
15
  controller.clearMarkers();
16
16
  if (markerData.length > 0){
17
17
  controller.addMarkers(markerData);
@@ -1,6 +1,8 @@
1
1
  <% add_decidim_meta_tags(
2
2
  title: translated_attribute(project.title),
3
- description: translated_attribute(project.description)
3
+ description: translated_attribute(project.description),
4
+ resource: project,
5
+ url: resource_locator([project.budget, project]).url
4
6
  ) %>
5
7
 
6
8
  <%
@@ -37,9 +39,17 @@ edit_link(
37
39
  </div>
38
40
  <% end %>
39
41
  <%= cell("decidim/budgets/project_selected_status", project, as_label: true) %>
40
- <h1 class="h1 decorator budget__definition-project__title editor-content">
41
- <%= decidim_sanitize translated_attribute project.title %>
42
- </h1>
42
+
43
+ <div class="layout-author">
44
+ <div class="relative flex items-center justify-center w-full">
45
+ <div class="w-10/12 flex items-center gap-4">
46
+ <h1 class="h1 decorator budget__definition-project__title editor-content">
47
+ <%= decidim_sanitize translated_attribute project.title %>
48
+ </h1>
49
+ </div>
50
+ <%= render "decidim/shared/resource_actions", resource: project, skip_report: true %>
51
+ </div>
52
+ </div>
43
53
  </section>
44
54
  <section class="layout-main__section">
45
55
  <div class="editor-content">
@@ -67,10 +77,14 @@ edit_link(
67
77
  </div>
68
78
  <% end %>
69
79
  </section>
80
+
81
+ <%= cell("decidim/tags", project) %>
82
+
70
83
  <section class="layout-main__section layout-main__buttons" data-buttons>
71
84
  <%= cell "decidim/comments_button", nil %>
72
- <div class="ml-auto">
73
- <%= cell "decidim/budgets/project_tags", project %>
85
+
86
+ <div class="ml-auto lg:ml-0">
87
+ <%= cell "decidim/share_widget", project %>
74
88
  </div>
75
89
  </section>
76
90
 
@@ -88,10 +102,6 @@ edit_link(
88
102
  <%= budget_to_currency project.budget_amount %>
89
103
  </div>
90
104
  </section>
91
- <section class="layout-aside__section actions__secondary">
92
- <%= render partial: "decidim/shared/follow_button", class: "text-center", locals: { followable: project, large: false } %>
93
- <%= cell "decidim/share_button", nil %>
94
- </section>
95
105
  <% end %>
96
106
  <% content_for :item_footer do %>
97
107
  <%= comments_for project, polymorphic: [project.budget] %>
@@ -7,7 +7,6 @@ ar:
7
7
  title: العنوان
8
8
  total_budget: الميزانية الإجمالية
9
9
  project:
10
- decidim_category_id: الفئة
11
10
  description: وصف
12
11
  proposal_ids: المقترحات ذات الصلة
13
12
  title: عنوان
@@ -21,16 +20,10 @@ ar:
21
20
  many: مشاريع
22
21
  other: مشاريع
23
22
  decidim:
24
- admin:
25
- filters:
26
- projects:
27
- category_id_eq:
28
- label: الفئة
29
23
  budgets:
30
24
  actions:
31
25
  attachment_collections: المجلدات
32
26
  attachments: مرفقات
33
- destroy: حذف
34
27
  edit: تعديل
35
28
  edit_projects: إدارة المشاريع
36
29
  import: استيراد مقترحات للمشاريع
@@ -55,7 +48,6 @@ ar:
55
48
  index:
56
49
  actions: الإجراءات
57
50
  cancel: إلغاء
58
- change_category: تغيير الفئة
59
51
  finished_orders: الانتهاء من الأصوات
60
52
  pending_orders: في انتظار الأصوات
61
53
  selected_options:
@@ -88,8 +80,10 @@ ar:
88
80
  name: الإسم
89
81
  project:
90
82
  fields:
91
- category: الفئة
92
83
  title: عنوان
84
+ order:
85
+ status:
86
+ title: تم قبول تصويتك بنجاح
93
87
  projects:
94
88
  budget_confirm:
95
89
  cancel: إلغاء
@@ -114,7 +108,6 @@ ar:
114
108
  many: "%{count} مشاريع"
115
109
  other: "%{count} مشاريع"
116
110
  filters:
117
- category: الفئة
118
111
  search: بحث
119
112
  show:
120
113
  budget: ميزانية