decidim-accountability 0.28.1 → 0.29.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) 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/timeline.erb +2 -2
  4. data/app/cells/decidim/accountability/project_cell.rb +16 -9
  5. data/app/cells/decidim/accountability/result_l_cell.rb +1 -2
  6. data/app/cells/decidim/accountability/result_metadata_cell.rb +0 -6
  7. data/app/cells/decidim/accountability/results_cell.rb +0 -2
  8. data/app/cells/decidim/accountability/status/status.erb +1 -1
  9. data/app/cells/decidim/accountability/status_cell.rb +12 -8
  10. data/app/commands/decidim/accountability/admin/create_imported_result.rb +18 -85
  11. data/app/commands/decidim/accountability/admin/create_result.rb +12 -86
  12. data/app/commands/decidim/accountability/admin/create_status.rb +3 -31
  13. data/app/commands/decidim/accountability/admin/create_timeline_entry.rb +3 -30
  14. data/app/commands/decidim/accountability/admin/has_result_command.rb +54 -0
  15. data/app/commands/decidim/accountability/admin/update_imported_result.rb +16 -70
  16. data/app/commands/decidim/accountability/admin/update_result.rb +10 -72
  17. data/app/commands/decidim/accountability/admin/update_status.rb +3 -39
  18. data/app/commands/decidim/accountability/admin/update_timeline_entry.rb +3 -38
  19. data/app/controllers/decidim/accountability/admin/results_controller.rb +1 -1
  20. data/app/controllers/decidim/accountability/admin/statuses_controller.rb +7 -8
  21. data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +8 -8
  22. data/app/controllers/decidim/accountability/results_controller.rb +21 -19
  23. data/app/events/decidim/accountability/base_result_event.rb +4 -0
  24. data/app/helpers/decidim/accountability/application_helper.rb +0 -34
  25. data/app/helpers/decidim/accountability/breadcrumb_helper.rb +0 -4
  26. data/app/models/decidim/accountability/result.rb +1 -1
  27. data/app/models/decidim/accountability/status.rb +1 -1
  28. data/app/packs/src/decidim/accountability/index.js +1 -1
  29. data/app/services/decidim/accountability/results_csv_importer.rb +1 -1
  30. data/app/views/decidim/accountability/admin/results/index.html.erb +1 -1
  31. data/app/views/decidim/accountability/admin/statuses/index.html.erb +2 -2
  32. data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +1 -1
  33. data/app/views/decidim/accountability/results/_home_categories.html.erb +2 -2
  34. data/app/views/decidim/accountability/results/_nav_breadcrumb.html.erb +8 -8
  35. data/app/views/decidim/accountability/results/_project.html.erb +1 -1
  36. data/app/views/decidim/accountability/results/_scope_filters.html.erb +2 -2
  37. data/app/views/decidim/accountability/results/_search.html.erb +4 -4
  38. data/app/views/decidim/participatory_spaces/_result.html.erb +3 -3
  39. data/config/locales/ar.yml +0 -12
  40. data/config/locales/bg.yml +6 -12
  41. data/config/locales/ca.yml +1 -12
  42. data/config/locales/cs.yml +0 -12
  43. data/config/locales/da.yml +0 -11
  44. data/config/locales/de.yml +1 -12
  45. data/config/locales/el.yml +0 -12
  46. data/config/locales/en.yml +1 -12
  47. data/config/locales/es-MX.yml +5 -16
  48. data/config/locales/es-PY.yml +5 -16
  49. data/config/locales/es.yml +7 -18
  50. data/config/locales/eu.yml +4 -15
  51. data/config/locales/fi-plain.yml +1 -12
  52. data/config/locales/fi.yml +1 -12
  53. data/config/locales/fr-CA.yml +0 -12
  54. data/config/locales/fr.yml +0 -12
  55. data/config/locales/ga-IE.yml +0 -8
  56. data/config/locales/gl.yml +0 -12
  57. data/config/locales/he-IL.yml +0 -12
  58. data/config/locales/hu.yml +0 -12
  59. data/config/locales/id-ID.yml +0 -11
  60. data/config/locales/is-IS.yml +0 -12
  61. data/config/locales/it.yml +0 -12
  62. data/config/locales/ja.yml +1 -12
  63. data/config/locales/ko.yml +0 -12
  64. data/config/locales/lb.yml +0 -12
  65. data/config/locales/lt.yml +0 -12
  66. data/config/locales/lv.yml +0 -11
  67. data/config/locales/nl.yml +0 -12
  68. data/config/locales/no.yml +0 -12
  69. data/config/locales/pl.yml +6 -12
  70. data/config/locales/pt-BR.yml +0 -12
  71. data/config/locales/pt.yml +0 -12
  72. data/config/locales/ro-RO.yml +0 -12
  73. data/config/locales/ru.yml +0 -11
  74. data/config/locales/si-LK.yml +0 -5
  75. data/config/locales/sk.yml +0 -11
  76. data/config/locales/sl.yml +0 -4
  77. data/config/locales/sq-AL.yml +0 -12
  78. data/config/locales/sr-CS.yml +0 -11
  79. data/config/locales/sv.yml +0 -12
  80. data/config/locales/th-TH.yml +213 -0
  81. data/config/locales/tr-TR.yml +0 -12
  82. data/config/locales/uk.yml +0 -11
  83. data/config/locales/zh-CN.yml +0 -11
  84. data/config/locales/zh-TW.yml +0 -12
  85. data/decidim-accountability.gemspec +1 -1
  86. data/lib/decidim/accountability/component.rb +0 -4
  87. data/lib/decidim/accountability/seeds.rb +76 -67
  88. data/lib/decidim/accountability/test/factories.rb +0 -4
  89. data/lib/decidim/accountability/version.rb +1 -1
  90. data/lib/decidim/api/result_type.rb +1 -1
  91. metadata +28 -30
  92. data/app/commands/decidim/accountability/admin/destroy_result.rb +0 -43
  93. data/app/services/decidim/accountability/result_stats_calculator.rb +0 -49
  94. 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
@@ -8,7 +8,9 @@ module Decidim
8
8
  helper Decidim::TraceabilityHelper
9
9
  helper Decidim::Accountability::BreadcrumbHelper
10
10
 
11
- helper_method :results, :result, :first_class_categories, :count_calculator, :nav_paths
11
+ helper_method :results, :result, :first_class_categories, :count_calculator
12
+
13
+ before_action :set_controller_breadcrumb
12
14
 
13
15
  def show
14
16
  raise ActionController::RoutingError, "Not Found" unless result
@@ -29,24 +31,6 @@ module Decidim
29
31
  @result ||= search_collection.includes(:timeline_entries).find_by(id: params[:id])
30
32
  end
31
33
 
32
- def next_result
33
- return if search_collection.size < 2
34
-
35
- search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].gt(result.id)).first
36
- end
37
-
38
- def prev_result
39
- return if search_collection.size < 2
40
-
41
- search_collection.order(:start_date, :id).where(Decidim::Accountability::Result.arel_table[:id].lt(result.id)).last
42
- end
43
-
44
- def nav_paths
45
- return {} if result.blank?
46
-
47
- { prev_path: prev_result, next_path: next_result }.compact_blank.transform_values { |result| result_path(result) }
48
- end
49
-
50
34
  def search_collection
51
35
  Result.where(component: current_component)
52
36
  end
@@ -66,6 +50,24 @@ module Decidim
66
50
  def count_calculator(scope_id, category_id)
67
51
  Decidim::Accountability::ResultsCalculator.new(current_component, scope_id, category_id).count
68
52
  end
53
+
54
+ def controller_breadcrumb_items
55
+ @controller_breadcrumb_items ||= []
56
+ end
57
+
58
+ def set_controller_breadcrumb
59
+ controller_breadcrumb_items << breadcrumb_item
60
+ end
61
+
62
+ def breadcrumb_item
63
+ return {} if result&.parent.blank?
64
+
65
+ {
66
+ label: translated_attribute(result.parent.title),
67
+ url: result_path(result.parent),
68
+ active: true
69
+ }
70
+ end
69
71
  end
70
72
  end
71
73
  end
@@ -20,6 +20,10 @@ module Decidim
20
20
  def proposal
21
21
  @proposal ||= resource.linked_resources(:proposals, "included_proposals").find_by(id: extra[:proposal_id])
22
22
  end
23
+
24
+ def hidden_resource?
25
+ super || (proposal.respond_to?(:hidden?) && proposal.hidden?)
26
+ end
23
27
  end
24
28
  end
25
29
  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
@@ -50,7 +50,7 @@
50
50
  <th>
51
51
  <%= sort_link(query, :created_at, t("models.result.fields.created_at", scope: "decidim.accountability") ) %>
52
52
  </th>
53
- <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
53
+ <th><%= t("actions.title", scope: "decidim.accountability") %></th>
54
54
  </tr>
55
55
  </thead>
56
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>
@@ -4,7 +4,7 @@
4
4
 
5
5
  <% if current_component.has_subscopes? %>
6
6
  <div class="filter-container">
7
- <button id="dropdown-trigger-accountability" data-component="dropdown" data-target="dropdown-menu-accountability" data-auto-close="true" data-disabled-md="true">
7
+ <button id="dropdown-trigger-accountability" data-component="dropdown" data-target="dropdown-menu-accountability" data-auto-close="true">
8
8
  <% items.each do |item| %>
9
9
  <%= content_tag :span, class: "#{"is-active" if item[:active]}" do %>
10
10
  <span class="sr-only"><%= item[:sr_text] %></span>
@@ -15,7 +15,7 @@
15
15
  <%= icon "arrow-down-s-line", class: "w-8 h-8 flex-none text-secondary fill-current" %>
16
16
  <%= icon "arrow-up-s-line", class: "w-8 h-8 flex-none text-secondary fill-current" %>
17
17
  </button>
18
- <ul id="dropdown-menu-accountability" data-scope-filters>
18
+ <ul id="dropdown-menu-accountability" data-scope-filters aria-hidden="true">
19
19
  <% items.each do |item| %>
20
20
  <li>
21
21
  <%= link_to item[:url], class: "filter#{" is-active" if item[:active]}" do %>
@@ -1,5 +1,5 @@
1
1
  <%= form_tag results_path, method: :get do %>
2
- <div class="filter-search">
2
+ <div class="filter-search filter-container">
3
3
  <label>
4
4
  <span class="sr-only"><%= t("search", scope: "decidim.accountability.results.search") %></span>
5
5
  <%= search_field_tag(
@@ -10,9 +10,9 @@
10
10
  value: "",
11
11
  title: t("search", scope: "decidim.accountability.results.search")
12
12
  ) %>
13
- <button type="submit" aria-label="<%= t("search", scope: "decidim.accountability.results.search") %>">
14
- <%= icon "search-line" %>
15
- </button>
16
13
  </label>
14
+ <button type="submit" aria-label="<%= t("search", scope: "decidim.accountability.results.search") %>">
15
+ <%= icon "search-line" %>
16
+ </button>
17
17
  </div>
18
18
  <% end %>
@@ -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: