decidim-accountability 0.28.3 → 0.29.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/accountability/highlighted_results_for_component_cell.rb +0 -3
  3. data/app/cells/decidim/accountability/project_cell.rb +1 -6
  4. data/app/cells/decidim/accountability/result_l_cell.rb +1 -2
  5. data/app/cells/decidim/accountability/result_metadata_cell.rb +0 -6
  6. data/app/cells/decidim/accountability/results_cell.rb +0 -2
  7. data/app/cells/decidim/accountability/status_cell.rb +11 -8
  8. data/app/commands/decidim/accountability/admin/create_imported_result.rb +18 -85
  9. data/app/commands/decidim/accountability/admin/create_result.rb +12 -86
  10. data/app/commands/decidim/accountability/admin/create_status.rb +3 -31
  11. data/app/commands/decidim/accountability/admin/create_timeline_entry.rb +3 -30
  12. data/app/commands/decidim/accountability/admin/has_result_command.rb +54 -0
  13. data/app/commands/decidim/accountability/admin/update_imported_result.rb +16 -70
  14. data/app/commands/decidim/accountability/admin/update_result.rb +10 -72
  15. data/app/commands/decidim/accountability/admin/update_status.rb +3 -39
  16. data/app/commands/decidim/accountability/admin/update_timeline_entry.rb +3 -38
  17. data/app/controllers/decidim/accountability/admin/results_controller.rb +1 -1
  18. data/app/controllers/decidim/accountability/admin/statuses_controller.rb +7 -8
  19. data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +8 -8
  20. data/app/controllers/decidim/accountability/results_controller.rb +1 -21
  21. data/app/helpers/decidim/accountability/application_helper.rb +0 -34
  22. data/app/helpers/decidim/accountability/breadcrumb_helper.rb +0 -4
  23. data/app/models/decidim/accountability/result.rb +1 -1
  24. data/app/models/decidim/accountability/status.rb +1 -1
  25. data/app/packs/src/decidim/accountability/index.js +1 -1
  26. data/app/services/decidim/accountability/results_csv_importer.rb +1 -1
  27. data/app/views/decidim/accountability/admin/results/index.html.erb +7 -15
  28. data/app/views/decidim/accountability/admin/statuses/index.html.erb +2 -2
  29. data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +1 -1
  30. data/app/views/decidim/accountability/results/_home_categories.html.erb +2 -2
  31. data/app/views/decidim/accountability/results/_nav_breadcrumb.html.erb +8 -8
  32. data/app/views/decidim/accountability/results/_project.html.erb +1 -1
  33. data/app/views/decidim/participatory_spaces/_result.html.erb +3 -3
  34. data/config/locales/ar.yml +0 -12
  35. data/config/locales/bg.yml +0 -12
  36. data/config/locales/ca.yml +0 -12
  37. data/config/locales/cs.yml +0 -13
  38. data/config/locales/da.yml +0 -11
  39. data/config/locales/de.yml +0 -12
  40. data/config/locales/el.yml +0 -12
  41. data/config/locales/en.yml +0 -12
  42. data/config/locales/es-MX.yml +0 -12
  43. data/config/locales/es-PY.yml +0 -12
  44. data/config/locales/es.yml +0 -12
  45. data/config/locales/eu.yml +0 -12
  46. data/config/locales/fi-plain.yml +0 -12
  47. data/config/locales/fi.yml +2 -14
  48. data/config/locales/fr-CA.yml +0 -12
  49. data/config/locales/fr.yml +0 -12
  50. data/config/locales/ga-IE.yml +0 -8
  51. data/config/locales/gl.yml +0 -12
  52. data/config/locales/he-IL.yml +0 -12
  53. data/config/locales/hu.yml +0 -12
  54. data/config/locales/id-ID.yml +0 -11
  55. data/config/locales/is-IS.yml +0 -12
  56. data/config/locales/it.yml +0 -12
  57. data/config/locales/ja.yml +0 -12
  58. data/config/locales/ko.yml +0 -12
  59. data/config/locales/lb.yml +0 -12
  60. data/config/locales/lt.yml +0 -12
  61. data/config/locales/lv.yml +0 -11
  62. data/config/locales/nl.yml +0 -12
  63. data/config/locales/no.yml +0 -12
  64. data/config/locales/pl.yml +0 -12
  65. data/config/locales/pt-BR.yml +0 -12
  66. data/config/locales/pt.yml +0 -12
  67. data/config/locales/ro-RO.yml +7 -21
  68. data/config/locales/ru.yml +0 -11
  69. data/config/locales/si-LK.yml +0 -5
  70. data/config/locales/sk.yml +0 -11
  71. data/config/locales/sl.yml +0 -4
  72. data/config/locales/sq-AL.yml +0 -12
  73. data/config/locales/sr-CS.yml +0 -11
  74. data/config/locales/sv.yml +25 -76
  75. data/config/locales/th-TH.yml +0 -1
  76. data/config/locales/tr-TR.yml +0 -12
  77. data/config/locales/uk.yml +0 -11
  78. data/config/locales/zh-CN.yml +0 -11
  79. data/config/locales/zh-TW.yml +0 -12
  80. data/decidim-accountability.gemspec +1 -1
  81. data/lib/decidim/accountability/component.rb +0 -4
  82. data/lib/decidim/accountability/seeds.rb +76 -67
  83. data/lib/decidim/accountability/test/factories.rb +0 -4
  84. data/lib/decidim/accountability/version.rb +1 -1
  85. data/lib/decidim/api/result_type.rb +1 -1
  86. metadata +25 -27
  87. data/app/commands/decidim/accountability/admin/destroy_result.rb +0 -43
  88. data/app/services/decidim/accountability/result_stats_calculator.rb +0 -49
  89. data/app/views/decidim/accountability/results/_stats_box.html.erb +0 -79
@@ -5,83 +5,21 @@ module Decidim
5
5
  module Admin
6
6
  # This command is executed when the user changes a Result from the admin
7
7
  # panel.
8
- class UpdateResult < Decidim::Command
9
- # Initializes an UpdateResult Command.
10
- #
11
- # form - The form from which to get the data.
12
- # result - The current instance of the result to be updated.
13
- def initialize(form, result)
14
- @form = form
15
- @result = result
16
- end
17
-
18
- # Updates the result if valid.
19
- #
20
- # Broadcasts :ok if successful, :invalid otherwise.
21
- def call
22
- return broadcast(:invalid) if form.invalid?
8
+ class UpdateResult < Decidim::Commands::UpdateResource
9
+ include Decidim::Accountability::Admin::HasResultCommand
23
10
 
24
- transaction do
25
- update_result
26
- link_proposals
27
- link_meetings
28
- link_projects
29
- send_notifications if should_notify_followers?
30
- end
31
-
32
- broadcast(:ok)
33
- end
11
+ fetch_form_attributes :scope, :category, :parent_id, :title, :description, :start_date, :end_date,
12
+ :progress, :decidim_accountability_status_id, :external_id, :weight
34
13
 
35
14
  private
36
15
 
37
- attr_reader :result, :form
38
-
39
- def update_result
40
- Decidim.traceability.update!(
41
- result,
42
- form.current_user,
43
- scope: @form.scope,
44
- category: @form.category,
45
- parent_id: @form.parent_id,
46
- title: @form.title,
47
- description: @form.description,
48
- start_date: @form.start_date,
49
- end_date: @form.end_date,
50
- progress: @form.progress,
51
- decidim_accountability_status_id: @form.decidim_accountability_status_id,
52
- external_id: @form.external_id.presence,
53
- weight: @form.weight
54
- )
55
- end
56
-
57
- def proposals
58
- @proposals ||= result.sibling_scope(:proposals).where(id: form.proposal_ids)
59
- end
60
-
61
- def projects
62
- @projects ||= result.sibling_scope(:projects).where(id: form.project_ids)
63
- end
64
-
65
- def meeting_ids
66
- @meeting_ids ||= proposals.flat_map do |proposal|
67
- proposal.linked_resources(:meetings, "proposals_from_meeting").pluck(:id)
68
- end.uniq
69
- end
70
-
71
- def meetings
72
- @meetings ||= result.sibling_scope(:meetings).where(id: meeting_ids)
73
- end
74
-
75
- def link_proposals
76
- result.link_resources(proposals, "included_proposals")
77
- end
78
-
79
- def link_projects
80
- result.link_resources(projects, "included_projects")
81
- end
16
+ alias result resource
82
17
 
83
- def link_meetings
84
- result.link_resources(meetings, "meetings_through_proposals")
18
+ def run_after_hooks
19
+ link_proposals
20
+ link_meetings
21
+ link_projects
22
+ send_notifications if should_notify_followers?
85
23
  end
86
24
 
87
25
  def send_notifications
@@ -3,46 +3,10 @@
3
3
  module Decidim
4
4
  module Accountability
5
5
  module Admin
6
- # This command is executed when the user changes a Result from the admin
6
+ # This command is executed when the user changes a Status from the admin
7
7
  # panel.
8
- class UpdateStatus < Decidim::Command
9
- # Initializes an UpdateStatus Command.
10
- #
11
- # form - The form from which to get the data.
12
- # status - The current instance of the status to be updated.
13
- def initialize(form, status, user)
14
- @form = form
15
- @status = status
16
- @user = user
17
- end
18
-
19
- # Updates the status if valid.
20
- #
21
- # Broadcasts :ok if successful, :invalid otherwise.
22
- def call
23
- return broadcast(:invalid) if form.invalid?
24
-
25
- transaction do
26
- update_status
27
- end
28
-
29
- broadcast(:ok)
30
- end
31
-
32
- private
33
-
34
- attr_reader :status, :form
35
-
36
- def update_status
37
- Decidim.traceability.update!(
38
- status,
39
- @user,
40
- key: @form.key,
41
- name: @form.name,
42
- description: @form.description,
43
- progress: @form.progress
44
- )
45
- end
8
+ class UpdateStatus < Decidim::Commands::UpdateResource
9
+ fetch_form_attributes :key, :name, :description, :progress
46
10
  end
47
11
  end
48
12
  end
@@ -3,45 +3,10 @@
3
3
  module Decidim
4
4
  module Accountability
5
5
  module Admin
6
- # This command is executed when the user changes a Result from the admin
6
+ # This command is executed when the user changes a TimelineEntry from the admin
7
7
  # panel.
8
- class UpdateTimelineEntry < Decidim::Command
9
- # Initializes an UpdateTimelineEntry Command.
10
- #
11
- # form - The form from which to get the data.
12
- # timeline_entry - The current instance of the timeline_entry to be updated.
13
- def initialize(form, timeline_entry, user)
14
- @form = form
15
- @timeline_entry = timeline_entry
16
- @user = user
17
- end
18
-
19
- # Updates the timeline_entry if valid.
20
- #
21
- # Broadcasts :ok if successful, :invalid otherwise.
22
- def call
23
- return broadcast(:invalid) if form.invalid?
24
-
25
- transaction do
26
- update_timeline_entry
27
- end
28
-
29
- broadcast(:ok)
30
- end
31
-
32
- private
33
-
34
- attr_reader :timeline_entry, :form
35
-
36
- def update_timeline_entry
37
- Decidim.traceability.update!(
38
- timeline_entry,
39
- @user,
40
- entry_date: form.entry_date,
41
- title: form.title,
42
- description: form.description
43
- )
44
- end
8
+ class UpdateTimelineEntry < Decidim::Commands::UpdateResource
9
+ fetch_form_attributes :entry_date, :title, :description
45
10
  end
46
11
  end
47
12
  end
@@ -68,7 +68,7 @@ module Decidim
68
68
  def destroy
69
69
  enforce_permission_to(:destroy, :result, result:)
70
70
 
71
- DestroyResult.call(result, current_user) do
71
+ Decidim::Commands::DestroyResource.call(result, current_user) do
72
72
  on(:ok) do
73
73
  flash[:notice] = I18n.t("results.destroy.success", scope: "decidim.accountability.admin")
74
74
 
@@ -18,7 +18,7 @@ module Decidim
18
18
 
19
19
  @form = form(StatusForm).from_params(params)
20
20
 
21
- CreateStatus.call(@form, current_user) do
21
+ CreateStatus.call(@form) do
22
22
  on(:ok) do
23
23
  flash[:notice] = I18n.t("statuses.create.success", scope: "decidim.accountability.admin")
24
24
  redirect_to statuses_path
@@ -42,7 +42,7 @@ module Decidim
42
42
 
43
43
  @form = form(StatusForm).from_params(params)
44
44
 
45
- UpdateStatus.call(@form, status, current_user) do
45
+ UpdateStatus.call(@form, status) do
46
46
  on(:ok) do
47
47
  flash[:notice] = I18n.t("statuses.update.success", scope: "decidim.accountability.admin")
48
48
  redirect_to statuses_path
@@ -58,13 +58,12 @@ module Decidim
58
58
  def destroy
59
59
  enforce_permission_to(:destroy, :status, status:)
60
60
 
61
- Decidim.traceability.perform_action!("delete", status, current_user) do
62
- status.destroy!
61
+ Decidim::Commands::DestroyResource.call(status, current_user) do
62
+ on(:ok) do
63
+ flash[:notice] = I18n.t("statuses.destroy.success", scope: "decidim.accountability.admin")
64
+ redirect_to statuses_path
65
+ end
63
66
  end
64
-
65
- flash[:notice] = I18n.t("statuses.destroy.success", scope: "decidim.accountability.admin")
66
-
67
- redirect_to statuses_path
68
67
  end
69
68
 
70
69
  private
@@ -19,7 +19,7 @@ module Decidim
19
19
  @form = form(TimelineEntryForm).from_params(params)
20
20
  @form.decidim_accountability_result_id = params[:result_id]
21
21
 
22
- CreateTimelineEntry.call(@form, current_user) do
22
+ CreateTimelineEntry.call(@form) do
23
23
  on(:ok) do
24
24
  flash[:notice] = I18n.t("timeline_entries.create.success", scope: "decidim.accountability.admin")
25
25
  redirect_to result_timeline_entries_path(params[:result_id])
@@ -43,7 +43,7 @@ module Decidim
43
43
 
44
44
  @form = form(TimelineEntryForm).from_params(params)
45
45
 
46
- UpdateTimelineEntry.call(@form, timeline_entry, current_user) do
46
+ UpdateTimelineEntry.call(@form, timeline_entry) do
47
47
  on(:ok) do
48
48
  flash[:notice] = I18n.t("timeline_entries.update.success", scope: "decidim.accountability.admin")
49
49
  redirect_to result_timeline_entries_path(params[:result_id])
@@ -59,13 +59,13 @@ module Decidim
59
59
  def destroy
60
60
  enforce_permission_to(:destroy, :timeline_entry, timeline_entry:)
61
61
 
62
- Decidim.traceability.perform_action!("delete", timeline_entry, current_user) do
63
- timeline_entry.destroy!
64
- end
65
-
66
- flash[:notice] = I18n.t("timeline_entries.destroy.success", scope: "decidim.accountability.admin")
62
+ Decidim::Commands::DestroyResource.call(timeline_entry, current_user) do
63
+ on(:ok) do
64
+ flash[:notice] = I18n.t("timeline_entries.destroy.success", scope: "decidim.accountability.admin")
67
65
 
68
- redirect_to result_timeline_entries_path(params[:result_id])
66
+ redirect_to result_timeline_entries_path(params[:result_id])
67
+ end
68
+ end
69
69
  end
70
70
 
71
71
  private
@@ -5,12 +5,10 @@ module Decidim
5
5
  # Exposes the result resource so users can view them
6
6
  class ResultsController < Decidim::Accountability::ApplicationController
7
7
  include FilterResource
8
- include Decidim::TranslatableAttributes
9
-
10
8
  helper Decidim::TraceabilityHelper
11
9
  helper Decidim::Accountability::BreadcrumbHelper
12
10
 
13
- helper_method :results, :result, :first_class_categories, :count_calculator, :nav_paths
11
+ helper_method :results, :result, :first_class_categories, :count_calculator
14
12
 
15
13
  before_action :set_controller_breadcrumb
16
14
 
@@ -33,24 +31,6 @@ module Decidim
33
31
  @result ||= search_collection.includes(:timeline_entries).find_by(id: params[:id])
34
32
  end
35
33
 
36
- def next_result
37
- return if search_collection.size < 2
38
-
39
- search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].gt(result.id)).first
40
- end
41
-
42
- def prev_result
43
- return if search_collection.size < 2
44
-
45
- search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].lt(result.id)).last
46
- end
47
-
48
- def nav_paths
49
- return {} if result.blank?
50
-
51
- { prev_path: prev_result, next_path: next_result }.compact_blank.transform_values { |result| result_path(result) }
52
- end
53
-
54
34
  def search_collection
55
35
  Result.where(component: current_component)
56
36
  end
@@ -14,44 +14,10 @@ module Decidim
14
14
  number_to_percentage(number, precision: 1, strip_insignificant_zeros: true, locale: I18n.locale)
15
15
  end
16
16
 
17
- def display_count(count)
18
- heading_parent_level_results(count)
19
- end
20
-
21
- def active_class_if_current(scope)
22
- "class=active" if scope.to_s == current_scope.to_s
23
- end
24
-
25
17
  def component_name
26
18
  (defined?(current_component) && translated_attribute(current_component&.name).presence) || t("decidim.components.accountability.name")
27
19
  end
28
20
 
29
- def categories_label
30
- translated_attribute(component_settings.categories_label).presence || t("results.home.categories_label", scope: "decidim.accountability")
31
- end
32
-
33
- def subcategories_label
34
- translated_attribute(component_settings.subcategories_label).presence || t("results.home.subcategories_label", scope: "decidim.accountability")
35
- end
36
-
37
- def heading_parent_level_results(count)
38
- text = translated_attribute(component_settings.heading_parent_level_results).presence
39
- if text
40
- pluralize(count, text)
41
- else
42
- t("results.count.results_count", scope: "decidim.accountability", count:)
43
- end
44
- end
45
-
46
- def heading_leaf_level_results(count)
47
- text = translated_attribute(component_settings.heading_leaf_level_results).presence
48
- if text
49
- pluralize(count, text)
50
- else
51
- t("results.count.results_count", scope: "decidim.accountability", count:)
52
- end
53
- end
54
-
55
21
  def filter_items_for(participatory_space:, category:)
56
22
  [
57
23
  {
@@ -5,10 +5,6 @@ module Decidim
5
5
  # Helpers needed to render the navigation breadcrumbs in results.
6
6
  #
7
7
  module BreadcrumbHelper
8
- def stats_calculator
9
- @stats_calculator ||= ResultStatsCalculator.new(result)
10
- end
11
-
12
8
  def current_scope
13
9
  params[:filter][:with_scope] if params[:filter]
14
10
  end
@@ -56,7 +56,7 @@ module Decidim
56
56
  end
57
57
 
58
58
  # Public: There are two ways to update parent's progress:
59
- # - using weights, in which case each progress is multiplied by the weigth and them summed
59
+ # - using weights, in which case each progress is multiplied by the weight and them summed
60
60
  # - not using weights, and using the average of progress of each children
61
61
  def update_progress!
62
62
  self.progress = if children_use_weighted_progress?
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Accountability
5
5
  # The data store for a Status in the Decidim::Accountability component. It stores a
6
- # key, a localized name, a localized description and and associated progress number.
6
+ # key, a localized name, a localized description and associated progress number.
7
7
  class Status < Accountability::ApplicationRecord
8
8
  include Decidim::HasComponent
9
9
  include Decidim::TranslatableResource
@@ -2,7 +2,7 @@ import "diff"
2
2
  import "src/decidim/accountability/version_diff"
3
3
 
4
4
  $(() => {
5
- // Show category list on click when we are on a small scren
5
+ // Show category list on click when we are on a small screen
6
6
  if ($(window).width() < 768) {
7
7
  $(".category--section").click((event) => {
8
8
  $(event.currentTarget).next(".category--elements").toggleClass("active");
@@ -131,7 +131,7 @@ module Decidim
131
131
  Decidim::Accountability::Result.includes(:parent).references(:parent)
132
132
  .where(parents_decidim_accountability_results: { id: nil })
133
133
  .where.not(parent_id: nil).each do |result|
134
- DestroyResult.call(result, @extra_context[:current_user])
134
+ Decidim::Commands::DestroyResource.call(result, @extra_context[:current_user])
135
135
  end
136
136
  end
137
137
  end
@@ -9,20 +9,12 @@
9
9
 
10
10
  <%= export_dropdowns(query) %>
11
11
  <%= import_dropdown do %>
12
- <% if allowed_to?(:create, :result) && parent_result.nil? %>
13
- <%= link_to new_projects_import_path do %>
14
- <li class="imports--component imports--results">
15
- <%= t("actions.import", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")) %>
16
- </li>
17
- <% end %>
18
- <% end %>
19
- <% if allowed_to? :create, :result %>
20
- <%= link_to import_results_path do %>
21
- <li class="imports--component imports--results">
22
- <%= t("actions.import_csv", scope: "decidim.accountability") %>
23
- </li>
24
- <% end %>
25
- <% end %>
12
+ <li class="imports--component imports--results">
13
+ <%= link_to t("actions.import", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")), new_projects_import_path if allowed_to?(:create, :result) && parent_result.nil? %>
14
+ </li>
15
+ <li class="imports--component imports--results">
16
+ <%= link_to t("actions.import_csv", scope: "decidim.accountability"), import_results_path if allowed_to? :create, :result %>
17
+ </li>
26
18
  <% end %>
27
19
  <%= render partial: "decidim/accountability/admin/shared/subnav" unless parent_result %>
28
20
  <%= link_to t("actions.new_result", scope: "decidim.accountability"), new_result_path(parent_id: parent_result), class: "button button__sm button__secondary" if allowed_to? :create, :result %>
@@ -58,7 +50,7 @@
58
50
  <th>
59
51
  <%= sort_link(query, :created_at, t("models.result.fields.created_at", scope: "decidim.accountability") ) %>
60
52
  </th>
61
- <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
53
+ <th><%= t("actions.title", scope: "decidim.accountability") %></th>
62
54
  </tr>
63
55
  </thead>
64
56
  <tbody>
@@ -14,7 +14,7 @@
14
14
  <th><%= t("models.status.fields.name", scope: "decidim.accountability") %></th>
15
15
  <th><%= t("models.status.fields.description", scope: "decidim.accountability") %></th>
16
16
  <th><%= t("models.status.fields.progress", scope: "decidim.accountability") %></th>
17
- <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
17
+ <th><%= t("actions.title", scope: "decidim.accountability") %></th>
18
18
  </tr>
19
19
  </thead>
20
20
  <tbody>
@@ -22,7 +22,7 @@
22
22
  <tr data-id="<%= status.id %>">
23
23
  <td><%= status.key %><br></td>
24
24
  <td><%= translated_attribute(status.name) %></td>
25
- <td><%= truncate translated_attribute(status.description), lenght: 50 %></td>
25
+ <td><%= truncate translated_attribute(status.description), length: 50 %></td>
26
26
  <td><%= status.progress %></td>
27
27
  <td class="table-list__actions">
28
28
  <% if allowed_to? :update, :status, status: status %>
@@ -16,7 +16,7 @@
16
16
  <tr>
17
17
  <th><%= t("models.timeline_entry.fields.entry_date", scope: "decidim.accountability") %></th>
18
18
  <th><%= t("models.timeline_entry.fields.title", scope: "decidim.accountability") %></th>
19
- <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
19
+ <th><%= t("actions.title", scope: "decidim.accountability") %></th>
20
20
  </tr>
21
21
  </thead>
22
22
  <tbody>
@@ -9,12 +9,12 @@
9
9
  ) %>
10
10
 
11
11
  <div>
12
- <span class="accountability__grid-title"><%= categories_label %></span>
12
+ <span class="accountability__grid-title"><%= t("results.home.categories_label", scope: "decidim.accountability") %></span>
13
13
  <%= subelements.call %>
14
14
  </div>
15
15
 
16
16
  <div>
17
- <span class="accountability__grid-title"><%= subcategories_label %></span>
17
+ <span class="accountability__grid-title"><%= t("results.home.subcategories_label", scope: "decidim.accountability") %></span>
18
18
  <% if subelements.has_results? %>
19
19
  <div class="accountability__subgrid">
20
20
  <% category.subcategories.each do |subcategory| %>
@@ -1,35 +1,35 @@
1
- <div class="lines-breadcrumb">
1
+ <div>
2
2
  <%= link_to t(".global"), root_path %>
3
3
  <% if component_settings.display_progress_enabled? %>
4
- <span class="percentage"><%= display_percentage progress_calculator(current_scope, nil) %></span>
4
+ <span><%= display_percentage progress_calculator(current_scope, nil) %></span>
5
5
  <% end %>
6
6
 
7
7
  <% if category.present? && category.parent.present? %>
8
- <span class="breadcrumb--separator">></span>
8
+ <span>&gt;</span>
9
9
  <div>
10
10
  <%= link_to translated_attribute(category.parent.name), results_path(filter: { with_category: category.parent_id, with_scope: current_scope }) %>
11
11
  <% if component_settings.display_progress_enabled? %>
12
- <span class="percentage"><%= display_percentage progress_calculator(current_scope, category.parent_id) %></span>
12
+ <span><%= display_percentage progress_calculator(current_scope, category.parent_id) %></span>
13
13
  <% end %>
14
14
  </div>
15
15
  <% end %>
16
16
 
17
17
  <% if category.present? %>
18
- <span class="breadcrumb--separator">></span>
18
+ <span>&gt;</span>
19
19
  <div>
20
20
  <%= link_to translated_attribute(category.name), results_path(filter: { with_category: category.id, with_scope: current_scope }) %>
21
21
  <% if component_settings.display_progress_enabled? %>
22
- <span class="percentage"><%= display_percentage progress_calculator(current_scope, category.id) %></span>
22
+ <span><%= display_percentage progress_calculator(current_scope, category.id) %></span>
23
23
  <% end %>
24
24
  </div>
25
25
  <% end %>
26
26
 
27
27
  <% if result && result.parent.present? %>
28
- <span class="breadcrumb--separator">></span>
28
+ <span>&gt;</span>
29
29
  <div>
30
30
  <%= link_to translated_attribute(result.parent.title), result_path(result.parent, filter: { with_category: current_scope }) %>
31
31
  <% if component_settings.display_progress_enabled? %>
32
- <span class="percentage"><%= display_percentage result.parent.progress %></span>
32
+ <span><%= display_percentage result.parent.progress %></span>
33
33
  <% end %>
34
34
  </div>
35
35
  <% end %>
@@ -1,4 +1,4 @@
1
- <%= render layout: "layouts/decidim/shared/layout_item", locals: nav_paths do %>
1
+ <%= render layout: "layouts/decidim/shared/layout_item" do %>
2
2
  <%= cell("decidim/accountability/project", result) %>
3
3
 
4
4
  <section class="layout-main__section layout-main__buttons" data-buttons>
@@ -6,7 +6,7 @@
6
6
  <%= translated_attribute(result.title) %>
7
7
  </h4>
8
8
 
9
- <div class="card--meta">
9
+ <div>
10
10
  <% if result.start_date %>
11
11
  <strong><%= t("models.result.fields.start_date", scope: "decidim.accountability") %></strong>
12
12
  <span><%= l result.start_date, format: :short %></span>
@@ -25,8 +25,8 @@
25
25
  <% end %>
26
26
 
27
27
  <% if result.progress.present? %>
28
- <div class="card--list__data">
29
- <span class="card--list__data__number"><%= display_percentage result.progress %></span>
28
+ <div>
29
+ <span><%= display_percentage result.progress %></span>
30
30
  </div>
31
31
  <% end %>
32
32
  </div>
@@ -181,15 +181,7 @@ ar:
181
181
  search: البحث عن الإجراءات
182
182
  show:
183
183
  stats:
184
- attendees: الحضور
185
184
  back_to_resource: العودة إلى النتيجة
186
- comments: التعليقات
187
- contributions: مساهمات
188
- last_edited_by: التعديل الأخير تم بواسطة
189
- last_updated_at: آخر تحديث في
190
- meetings: اجتماعات
191
- proposals: اقتراحات
192
- votes: الدعم
193
185
  timeline:
194
186
  title: تطور المشروع
195
187
  admin:
@@ -208,16 +200,12 @@ ar:
208
200
  name: المسائلة
209
201
  settings:
210
202
  global:
211
- categories_label: اسم "الفئات"
212
203
  comments_enabled: تم تمكين التعليقات
213
204
  comments_max_length: الحد الأقصى لطول التعليقات (اترك ال0 للقيمة الافتراضية)
214
205
  display_progress_enabled: عرض التقدم
215
- heading_leaf_level_results: اسم "المشاريع"
216
- heading_parent_level_results: اسم "النتائج"
217
206
  intro: مقدمة
218
207
  scope_id: النطاق
219
208
  scopes_enabled: النطاقات مفعلة
220
- subcategories_label: اسم "الفئات الفرعية"
221
209
  step:
222
210
  comments_blocked: تم حظر التعليقات
223
211
  events:
@@ -235,15 +235,7 @@ bg:
235
235
  search: Търсене на действия
236
236
  show:
237
237
  stats:
238
- attendees: Присъстващи
239
238
  back_to_resource: Върни се към резултата
240
- comments: Коментари
241
- contributions: Предложения
242
- last_edited_by: Последна промяна на
243
- last_updated_at: Последно обновен на
244
- meetings: Срещи
245
- proposals: Предложения
246
- votes: Поддръжки
247
239
  timeline:
248
240
  title: Развитие на проекта
249
241
  admin:
@@ -262,16 +254,12 @@ bg:
262
254
  name: Отговорност
263
255
  settings:
264
256
  global:
265
- categories_label: Име за "категории"
266
257
  comments_enabled: Коментарите са разрешени
267
258
  comments_max_length: Максимална дължина на коментарите (Оставете 0 за стойност по подразбиране)
268
259
  display_progress_enabled: Показвай развитието
269
- heading_leaf_level_results: Име за "Проекти"
270
- heading_parent_level_results: Име за "Резултати"
271
260
  intro: Въведение
272
261
  scope_id: Сфера
273
262
  scopes_enabled: Сферите са разрешени
274
- subcategories_label: Име за "подкатегории"
275
263
  step:
276
264
  comments_blocked: Коментарите са блокирани
277
265
  events: