decidim-accountability 0.20.0 → 0.23.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim/accountability/admin/accountability_admin.js.es6 +6 -42
  3. data/app/assets/stylesheets/decidim/accountability/accountability/_categories.scss +8 -1
  4. data/app/assets/stylesheets/decidim/accountability/accountability/_lines_breadcrumb.scss +8 -0
  5. data/app/assets/stylesheets/decidim/accountability/accountability/_results.scss +0 -3
  6. data/app/cells/decidim/accountability/highlighted_results_for_component/show.erb +3 -3
  7. data/app/cells/decidim/accountability/highlighted_results_for_component_cell.rb +1 -1
  8. data/app/commands/decidim/accountability/admin/create_imported_result.rb +106 -0
  9. data/app/commands/decidim/accountability/admin/update_imported_result.rb +110 -0
  10. data/app/controllers/decidim/accountability/admin/import_results_controller.rb +34 -0
  11. data/app/controllers/decidim/accountability/admin/results_controller.rb +2 -20
  12. data/app/controllers/decidim/accountability/results_controller.rb +0 -1
  13. data/app/controllers/decidim/accountability/versions_controller.rb +7 -8
  14. data/app/forms/decidim/accountability/admin/result_form.rb +3 -9
  15. data/app/helpers/decidim/accountability/admin/application_helper.rb +13 -0
  16. data/app/helpers/decidim/accountability/application_helper.rb +1 -1
  17. data/app/jobs/application_job.rb +4 -0
  18. data/app/jobs/decidim/accountability/admin/import_results_csv_job.rb +19 -0
  19. data/app/mailers/decidim/accountability/import_mailer.rb +26 -0
  20. data/app/models/decidim/accountability/result.rb +4 -1
  21. data/app/models/decidim/accountability/status.rb +3 -0
  22. data/app/models/decidim/accountability/timeline_entry.rb +3 -0
  23. data/app/queries/decidim/accountability/metrics/results_metric_manage.rb +2 -8
  24. data/app/services/decidim/accountability/result_search.rb +2 -20
  25. data/app/services/decidim/accountability/result_stats_calculator.rb +1 -1
  26. data/app/services/decidim/accountability/results_csv_importer.rb +139 -0
  27. data/app/types/decidim/accountability/accountability_type.rb +32 -0
  28. data/app/types/decidim/accountability/result_type.rb +35 -0
  29. data/app/types/decidim/accountability/status_type.rb +20 -0
  30. data/app/types/decidim/accountability/timeline_entry_type.rb +18 -0
  31. data/app/views/decidim/accountability/admin/import_results/new.html.erb +22 -0
  32. data/app/views/decidim/accountability/admin/results/_form.html.erb +3 -7
  33. data/app/views/decidim/accountability/admin/results/index.html.erb +3 -0
  34. data/app/views/decidim/accountability/admin/results/proposals_picker.html.erb +1 -0
  35. data/app/views/decidim/accountability/import_mailer/import.html.erb +25 -0
  36. data/app/views/decidim/accountability/results/_linked_results.html.erb +1 -1
  37. data/app/views/decidim/accountability/results/_results_leaf.html.erb +5 -5
  38. data/app/views/decidim/accountability/results/_results_parent.html.erb +2 -2
  39. data/app/views/decidim/accountability/results/_scope_filters.html.erb +17 -4
  40. data/app/views/decidim/accountability/results/_search.html.erb +3 -3
  41. data/app/views/decidim/accountability/results/_stats_box.html.erb +11 -5
  42. data/app/views/decidim/accountability/results/_timeline.html.erb +2 -2
  43. data/app/views/decidim/accountability/versions/index.html.erb +7 -25
  44. data/app/views/decidim/accountability/versions/show.html.erb +9 -31
  45. data/app/views/decidim/participatory_spaces/_result.html.erb +3 -3
  46. data/config/locales/am-ET.yml +1 -0
  47. data/config/locales/ar.yml +1 -24
  48. data/config/locales/bg-BG.yml +220 -0
  49. data/config/locales/bg.yml +226 -0
  50. data/config/locales/ca.yml +22 -22
  51. data/config/locales/cs.yml +48 -48
  52. data/config/locales/da-DK.yml +1 -0
  53. data/config/locales/da.yml +1 -0
  54. data/config/locales/de.yml +22 -22
  55. data/config/locales/el-GR.yml +1 -0
  56. data/config/locales/el.yml +224 -0
  57. data/config/locales/en.yml +22 -22
  58. data/config/locales/eo.yml +1 -0
  59. data/config/locales/es-MX.yml +22 -22
  60. data/config/locales/es-PY.yml +22 -22
  61. data/config/locales/es.yml +22 -22
  62. data/config/locales/et-EE.yml +1 -0
  63. data/config/locales/et.yml +1 -0
  64. data/config/locales/eu.yml +1 -24
  65. data/config/locales/fi-plain.yml +22 -22
  66. data/config/locales/fi.yml +35 -35
  67. data/config/locales/fr-CA.yml +226 -0
  68. data/config/locales/fr.yml +22 -22
  69. data/config/locales/ga-IE.yml +1 -0
  70. data/config/locales/gl.yml +1 -24
  71. data/config/locales/hr-HR.yml +1 -0
  72. data/config/locales/hr.yml +1 -0
  73. data/config/locales/hu.yml +19 -22
  74. data/config/locales/id-ID.yml +1 -24
  75. data/config/locales/is-IS.yml +177 -0
  76. data/config/locales/is.yml +177 -0
  77. data/config/locales/it.yml +40 -40
  78. data/config/locales/ja-JP.yml +222 -0
  79. data/config/locales/ja.yml +224 -0
  80. data/config/locales/ko-KR.yml +1 -0
  81. data/config/locales/ko.yml +1 -0
  82. data/config/locales/lt-LT.yml +1 -0
  83. data/config/locales/lt.yml +1 -0
  84. data/config/locales/lv.yml +218 -0
  85. data/config/locales/mt-MT.yml +1 -0
  86. data/config/locales/mt.yml +1 -0
  87. data/config/locales/nl.yml +21 -22
  88. data/config/locales/no.yml +26 -28
  89. data/config/locales/om-ET.yml +1 -0
  90. data/config/locales/pl.yml +75 -75
  91. data/config/locales/pt-BR.yml +2 -25
  92. data/config/locales/pt.yml +60 -62
  93. data/config/locales/ro-RO.yml +224 -0
  94. data/config/locales/ru.yml +1 -24
  95. data/config/locales/sk-SK.yml +224 -0
  96. data/config/locales/sk.yml +207 -0
  97. data/config/locales/sl.yml +130 -0
  98. data/config/locales/so-SO.yml +1 -0
  99. data/config/locales/sr-CS.yml +205 -0
  100. data/config/locales/sv.yml +22 -24
  101. data/config/locales/ti-ER.yml +1 -0
  102. data/config/locales/tr-TR.yml +1 -24
  103. data/config/locales/uk.yml +1 -21
  104. data/config/locales/vi-VN.yml +1 -0
  105. data/config/locales/vi.yml +1 -0
  106. data/config/locales/zh-CN.yml +223 -0
  107. data/config/locales/zh-TW.yml +1 -0
  108. data/db/migrate/20200320105903_index_foreign_keys_in_decidim_accountability_results.rb +7 -0
  109. data/db/migrate/20200827154103_add_commentable_counter_cache_to_results.rb +9 -0
  110. data/lib/decidim/accountability/admin_engine.rb +4 -3
  111. data/lib/decidim/accountability/component.rb +7 -1
  112. data/lib/decidim/accountability/engine.rb +0 -1
  113. data/lib/decidim/accountability/test/factories.rb +3 -1
  114. data/lib/decidim/accountability/version.rb +1 -1
  115. metadata +85 -28
  116. data/app/controllers/decidim/accountability/result_widgets_controller.rb +0 -19
  117. data/app/views/decidim/accountability/admin/results/_proposals.html.erb +0 -12
  118. data/app/views/decidim/accountability/versions/_version.html.erb +0 -20
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Accountability
5
+ ResultType = GraphQL::ObjectType.define do
6
+ interfaces [
7
+ -> { Decidim::Core::ComponentInterface },
8
+ -> { Decidim::Core::CategorizableInterface },
9
+ -> { Decidim::Comments::CommentableInterface },
10
+ -> { Decidim::Core::ScopableInterface }
11
+ ]
12
+
13
+ name "Result"
14
+ description "A result"
15
+
16
+ field :id, !types.ID, "The internal ID for this result"
17
+ field :title, Decidim::Core::TranslatedFieldType, "The title for this result"
18
+ field :description, Decidim::Core::TranslatedFieldType, "The description for this result"
19
+ field :reference, types.String, "The reference for this result"
20
+ field :startDate, Decidim::Core::DateType, "The start date for this result", property: :start_date
21
+ field :endDate, Decidim::Core::DateType, "The end date for this result", property: :end_date
22
+ field :progress, types.Float, "The progress for this result"
23
+ field :createdAt, Decidim::Core::DateTimeType, "When this result was created", property: :created_at
24
+ field :updatedAt, Decidim::Core::DateTimeType, "When this result was updated", property: :updated_at
25
+ field :childrenCount, types.Int, "The number of children results", property: :children_count
26
+ field :weight, !types.Int, "The order of this result"
27
+ field :externalId, types.String, "The external ID for this result", property: :external_id
28
+
29
+ field :children, types[Decidim::Accountability::ResultType], "The childrens results"
30
+ field :parent, Decidim::Accountability::ResultType, "The parent result"
31
+ field :status, Decidim::Accountability::StatusType, "The status for this result"
32
+ field :timelineEntries, types[Decidim::Accountability::TimelineEntryType], "The timeline entries for this result", property: :timeline_entries
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Accountability
5
+ StatusType = GraphQL::ObjectType.define do
6
+ name "Status"
7
+ description "A status"
8
+
9
+ field :id, !types.ID, "The internal ID for this status"
10
+ field :key, types.String, "The key for this status"
11
+ field :name, Decidim::Core::TranslatedFieldType, "The name for this status"
12
+ field :createdAt, Decidim::Core::DateType, "When this status was created", property: :created_at
13
+ field :updatedAt, Decidim::Core::DateType, "When this status was updated", property: :updated_at
14
+ field :description, Decidim::Core::TranslatedFieldType, "The description for this status"
15
+ field :progress, types.Int, "The progress for this status"
16
+
17
+ field :results, types[Decidim::Accountability::ResultType], "The results for this status"
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Accountability
5
+ TimelineEntryType = GraphQL::ObjectType.define do
6
+ name "TimelineEntry"
7
+ description "A Timeline Entry"
8
+
9
+ field :id, !types.ID, "The internal ID for this timeline entry"
10
+ field :entryDate, Decidim::Core::DateType, "The entry date for this timeline entry", property: :entry_date
11
+ field :description, Decidim::Core::TranslatedFieldType, "The description for this timeline entry"
12
+ field :createdAt, Decidim::Core::DateTimeType, "When this timeline entry was created", property: :created_at
13
+ field :updatedAt, Decidim::Core::DateTimeType, "When this timeline entry was updated", property: :updated_at
14
+
15
+ field :result, Decidim::Accountability::ResultType, "The result for this timeline entry"
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,22 @@
1
+ <%= form_tag(import_results_path, multipart: true, class: "form new_import") do %>
2
+ <div class="card">
3
+ <div class="card-divider">
4
+ <h2 class="card-title">
5
+ <%= t(".title") %>
6
+ </h2>
7
+ </div>
8
+
9
+ <div class="card-section">
10
+ <div class="row column">
11
+ <%= file_field_tag :csv_file %>
12
+ </div>
13
+ </div>
14
+ </div>
15
+
16
+ <div class="button--double form-general-submit">
17
+ <%= submit_tag t(".import"), class: "button" %>
18
+ </div>
19
+ <div class="import-process-info">
20
+ <%= t(".info", link_new_status: new_status_path, link_new_result: new_result_path, link_export_csv: link_to(t(".link"), exports_path(@current_component, id: "results", format: "CSV"), method: :post)).try("html_safe") %>
21
+ </div>
22
+ <% end %>
@@ -20,9 +20,9 @@
20
20
 
21
21
  <% else %>
22
22
 
23
- <% if current_participatory_space.has_subscopes? %>
23
+ <% if current_component.has_subscopes? %>
24
24
  <div class="row column">
25
- <%= scopes_picker_field form, :decidim_scope_id %>
25
+ <%= scopes_picker_field form, :decidim_scope_id, root: current_component.scope %>
26
26
  </div>
27
27
  <% end %>
28
28
 
@@ -53,11 +53,7 @@
53
53
  </div>
54
54
 
55
55
  <div class="row column">
56
- <% if @form.proposals %>
57
- <% picker_options = { id: "decidim_accountability_proposals", class: "picker-multiple", name: "result[proposal_ids]", multiple: true }
58
- prompt_params= { url: proposals_results_path(current_component, format: :html), text: t(".add_proposal") } %>
59
- <%= form.data_picker(:proposals, picker_options, prompt_params) {|item| { url:proposals_results_path(current_component, format: :json), text: "##{item.id}- #{present(item).title}" }} %>
60
- <% end %>
56
+ <%= proposals_picker(form, :proposals, proposals_picker_results_path) %>
61
57
  </div>
62
58
 
63
59
  <div class="row column">
@@ -7,6 +7,7 @@
7
7
  <%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")), new_result_path(parent_id: parent_result), class: "button tiny button--simple" if allowed_to? :create, :result %>
8
8
  <%= render partial: "decidim/accountability/admin/shared/subnav" unless parent_result %>
9
9
  <%= export_dropdown %>
10
+ <%= link_to t("actions.import_csv", scope: "decidim.accountability"), import_results_path, class: "button tiny button--simple" if allowed_to? :create, :result %>
10
11
  </div>
11
12
  </h2>
12
13
  </div>
@@ -17,6 +18,7 @@
17
18
  <thead>
18
19
  <tr>
19
20
  <th><%= t("models.result.fields.title", scope: "decidim.accountability") %></th>
21
+ <%= th_resource_scope_label %>
20
22
  <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
21
23
  </tr>
22
24
  </thead>
@@ -26,6 +28,7 @@
26
28
  <td>
27
29
  <%= link_to translated_attribute(result.title), results_path(parent_id: result.id) %><br>
28
30
  </td>
31
+ <%= td_resource_scope_for(result.scope) %>
29
32
  <td class="table-list__actions">
30
33
  <%= icon_link_to "eye", resource_locator(result).path, t("actions.preview", scope: "decidim.accountability"), class: "action-icon--preview", target: :blank %>
31
34
 
@@ -0,0 +1 @@
1
+ <%= cell "decidim/proposals/proposals_picker", current_component %>
@@ -0,0 +1,25 @@
1
+ <% if @errors.empty? %>
2
+ <p><%= t(".success") %></p>
3
+ <% else %>
4
+ <p><%= t(".errors_present") %>:</p>
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th><%= t(".row_number") %></th>
9
+ <th><%= t(".errors") %></th>
10
+ </tr>
11
+ </thead>
12
+ <% @errors.each do |error| %>
13
+ <tr>
14
+ <td><%= error.first %></td>
15
+ <td>
16
+ <ul>
17
+ <% error.last.each do |error_message| %>
18
+ <li><%= error_message %></li>
19
+ <% end %>
20
+ </ul>
21
+ </td>
22
+ </tr>
23
+ <% end %>
24
+ </table>
25
+ <% end %>
@@ -1,7 +1,7 @@
1
1
  <div class="card card--action card--list">
2
2
  <% resources.each do |result| %>
3
3
  <div class="card--list__item">
4
- <%= icon "actions", class: "card--list__icon", remove_icon_class: true %>
4
+ <%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
5
5
  <%= link_to resource_locator(result).path, class: "card--list__text card__link card__link--block" do %>
6
6
  <h5 class="card--list__heading">
7
7
  <%= translated_attribute(result.title) %>
@@ -1,7 +1,7 @@
1
1
  <div class="title-action">
2
- <h2 id="results-count" class="title-action__title section-heading">
2
+ <h3 id="results-count" class="title-action__title section-heading">
3
3
  <%= heading_leaf_level_results(total_count) %>
4
- </h2>
4
+ </h3>
5
5
  </div>
6
6
 
7
7
  <div class="row">
@@ -9,12 +9,12 @@
9
9
  <div class="card card--action card--list">
10
10
  <% results.each do |result| %>
11
11
  <div class="card--list__item">
12
- <%= icon "actions", class: "card--list__icon", remove_icon_class: true %>
12
+ <%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
13
13
 
14
14
  <%= link_to result_path(result), class: "card--list__text card__link card__link--block" do %>
15
- <h5 class="card--list__heading">
15
+ <h4 class="card--list__heading">
16
16
  <%= translated_attribute(result.title) %>
17
- </h5>
17
+ </h4>
18
18
 
19
19
  <div class="text-small card--meta">
20
20
  <% if result.start_date %>
@@ -12,9 +12,9 @@
12
12
  <%= icon "proposals", class: "card--list__icon", remove_icon_class: true %>
13
13
 
14
14
  <%= link_to result, class: "card--list__text card__link card__link--block" do %>
15
- <h5 class="card--list__heading">
15
+ <h3 class="card--list__heading">
16
16
  <%= translated_attribute result.title %>
17
- </h5>
17
+ </h3>
18
18
 
19
19
  <span class="text-small"><%= heading_leaf_level_results(result.children.count) %></span>
20
20
  <% end %>
@@ -1,17 +1,30 @@
1
1
  <div class="scope-filters section">
2
- <% if current_participatory_space.has_subscopes? %>
2
+ <% if current_component.has_subscopes? %>
3
3
  <div><%= t("results.filters.scopes", scope: "decidim.accountability") %></div>
4
4
 
5
5
  <ul class="tags tags--action">
6
- <li <%= active_class_if_current(nil) %>><%= link_to t("results.filters.all", scope: "decidim.accountability"), url_for(filter: { category_id: category.try(:id) }) %></li>
6
+ <li <%= active_class_if_current(nil) %>>
7
+ <%= link_to url_for(filter: { category_id: category.try(:id) }) do %>
8
+ <span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 2) %></span>
9
+ <%= t("results.filters.all", scope: "decidim.accountability") %>
10
+ <% end %>
11
+ </li>
7
12
 
8
13
  <% if current_participatory_space.scope %>
9
14
  <li <%= active_class_if_current(current_participatory_space.scope.id) %>>
10
- <%= link_to translated_attribute(current_participatory_space.scope.name), url_for(filter: { scope_id: current_participatory_space.scope.id, category_id: category.try(:id) }) %>
15
+ <%= link_to url_for(filter: { scope_id: current_participatory_space.scope.id, category_id: category.try(:id) }) do %>
16
+ <span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 1) %></span>
17
+ <%= translated_attribute(current_participatory_space.scope.name) %>
18
+ <% end %>
11
19
  </li>
12
20
  <% end %>
13
21
  <% current_participatory_space.subscopes.each do |scope| %>
14
- <li <%= active_class_if_current(scope.id) %>><%= link_to translated_attribute(scope.name), url_for(filter: { scope_id: scope.id, category_id: category.try(:id) }) %></li>
22
+ <li <%= active_class_if_current(scope.id) %>>
23
+ <%= link_to url_for(filter: { scope_id: scope.id, category_id: category.try(:id) }) do %>
24
+ <span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 1) %></span>
25
+ <%= translated_attribute(scope.name) %>
26
+ <% end %>
27
+ </li>
15
28
  <% end %>
16
29
  </ul>
17
30
  <% end %>
@@ -1,10 +1,10 @@
1
1
  <%= form_tag results_path, method: :get do %>
2
2
  <div class="filters__search">
3
3
  <div class="input-group">
4
- <%= search_field_tag "filter[search_text]", nil, label: false, class: "input-group-field", placeholder: t(".search"), value: "" %>
4
+ <%= search_field_tag "filter[search_text]", nil, class: "input-group-field", placeholder: t(".search"), value: "", title: t(".search") %>
5
5
  <div class="input-group-button">
6
- <button type="submit" class="button button--muted">
7
- <%= icon "magnifying-glass", aria_label: t(".search") %>
6
+ <button type="submit" class="button">
7
+ <%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
8
8
  </button>
9
9
  </div>
10
10
  </div>
@@ -20,10 +20,17 @@
20
20
  <div class="definition-data">
21
21
  <% if result.versions.any? %>
22
22
  <div class="definition-data__item versions_count">
23
- <span class="definition-data__title"><%= t("results.show.stats.version_number", scope: "decidim.accountability") %></span>
24
- <%= result.versions.count %>
25
- <div class="pr-s pl-s">
26
- <%= link_to t("results.show.stats.show_all_versions", scope: "decidim.accountability"), result_versions_path(result), class: "button button--sc hollow secondary small expanded" %>
23
+ <div>
24
+ <%= resource_version_number(result.versions_count, "text-large") %>
25
+ <small class="text-medium">
26
+ <%= resource_version_of(result.versions_count) %>
27
+ </small>
28
+ </div>
29
+
30
+ <div>
31
+ <span class="text-medium">
32
+ <%= link_to_other_resource_versions(result_versions_path(result)) %>
33
+ </span>
27
34
  </div>
28
35
  </div>
29
36
  <% if result.last_editor.present? %>
@@ -69,5 +76,4 @@
69
76
 
70
77
  <%= resource_reference(result) %>
71
78
  <%= render partial: "decidim/shared/share_modal" %>
72
- <%= embed_modal_for result_result_widget_url(result, format: :js) %>
73
79
  </div>
@@ -12,9 +12,9 @@
12
12
  <span class="timeline__date text-small">
13
13
  <%= timeline_entry.entry_date %>
14
14
  </span>
15
- <h6 class="timeline__title">
15
+ <h4 class="timeline__title">
16
16
  <%= translated_attribute timeline_entry.description %>
17
- </h6>
17
+ </h4>
18
18
  </div>
19
19
  </div>
20
20
  </li>
@@ -1,30 +1,12 @@
1
1
  <div class="row accountability">
2
2
  <div class="small-12 columns">
3
- <%= render partial: "decidim/accountability/results/nav_breadcrumb", locals: { category: result.parent.try(:category) || result.try(:category) } %>
3
+ <%= render partial: "decidim/accountability/results/nav_breadcrumb", locals: { category: versioned_resource.parent.try(:category) || versioned_resource.try(:category) } %>
4
4
  </div>
5
- <div class="small-12 columns">
6
- <h2 class="heading2"><%= t(".changes_at_title", title: translated_attribute(result.title)) %></h2>
7
- <h3 class="section-heading"><%= t(".title") %></h3>
8
- <div class="row">
9
- <div class="mediumlarge-8 columns">
10
- <div class="section">
11
- <div class="card card--list">
12
- <% result.versions.each_with_index do |version, index| %>
13
- <%= render partial: "version", locals: { version: version, index: index } %>
14
- <% end %>
15
- </div>
16
- </div>
17
- </div>
18
5
 
19
- <div class="columns section mediumlarge-4 large-3">
20
- <div class="card extra definition-data">
21
- <div class="definition-data__item versions_count">
22
- <span class="definition-data__title"><%= t("results.show.stats.number_of_versions", scope: "decidim.accountability") %></span>
23
- <%= result.versions.count %>
24
- <%= link_to t("results.show.stats.back_to_result", scope: "decidim.accountability"), result_path(result), class: "button button--sc hollow secondary small expanded" %>
25
- </div>
26
- </div>
27
- </div>
28
- </div>
29
- </div>
6
+ <%= cell(
7
+ "decidim/versions_list",
8
+ versioned_resource,
9
+ version_path: proc { |version_index| url_for(action: :show, id: version_index) },
10
+ i18n_scope: "decidim.accountability.results.show.stats"
11
+ ) %>
30
12
  </div>
@@ -2,37 +2,15 @@
2
2
  <%= javascript_include_tag "decidim/accountability/accountability" %>
3
3
  <div class="row accountability">
4
4
  <div class="small-12 columns">
5
- <%= render partial: "decidim/accountability/results/nav_breadcrumb", locals: { category: result.parent.try(:category) || result.try(:category) } %>
5
+ <%= render partial: "decidim/accountability/results/nav_breadcrumb", locals: { category: versioned_resource.parent.try(:category) || versioned_resource.try(:category) } %>
6
6
  </div>
7
- <div class="small-12 columns">
8
- <h2 class="heading2"><%= t(".changes_at_title", title: translated_attribute(result.title)) %></h2>
9
- <div class="row">
10
- <div class="mediumlarge-8 columns">
11
- <div class="section">
12
- <%= cell("decidim/diff", current_version) %>
13
- </div>
14
- </div>
15
7
 
16
- <div class="columns section mediumlarge-4 large-3">
17
- <div class="card extra definition-data">
18
- <div class="definition-data__item versions_count">
19
- <span class="definition-data__title"><%= t("results.show.stats.version_number", scope: "decidim.accountability") %></span>
20
- <%= t("results.show.stats.version_number_out_of_total", scope: "decidim.accountability", current_version: params[:id], total_count: result.versions_count) %>
21
- <%= link_to t("results.show.stats.show_all_versions", scope: "decidim.accountability"), result_versions_path(result), class: "button button--sc hollow secondary small expanded" %>
22
- <%= link_to t("results.show.stats.back_to_result", scope: "decidim.accountability"), result_path(result), class: "button button--sc hollow secondary small expanded" %>
23
- </div>
24
- <% if current_version.whodunnit.present? %>
25
- <div class="definition-data__item last_revision_by">
26
- <span class="definition-data__title"><%= t("results.show.stats.version_author", scope: "decidim.accountability") %></span>
27
- <%= render_resource_editor(current_version) %>
28
- </div>
29
- <% end %>
30
- <div class="definition-data__item versions_count">
31
- <span class="definition-data__title"><%= t("results.show.stats.version_created_at", scope: "decidim.accountability") %></span>
32
- <%= l current_version.created_at, format: :decidim_short %>
33
- </div>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
8
+ <%= cell(
9
+ "decidim/version",
10
+ current_version,
11
+ index: params[:id],
12
+ versioned_resource: versioned_resource,
13
+ versions_path: proc { url_for(action: :index) },
14
+ i18n_scope: "decidim.accountability.results.show.stats"
15
+ ) %>
38
16
  </div>
@@ -1,10 +1,10 @@
1
1
  <div class="card--list__item">
2
- <%= icon "actions", class: "card--list__icon", remove_icon_class: true %>
2
+ <%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
3
3
 
4
4
  <%= link_to resource_locator(result).path, class: "card--list__text card__link card__link--block" do %>
5
- <h5 class="card--list__heading">
5
+ <h4 class="card--list__heading heading6">
6
6
  <%= translated_attribute(result.title) %>
7
- </h5>
7
+ </h4>
8
8
 
9
9
  <div class="text-small card--meta">
10
10
  <% if result.start_date %>
@@ -0,0 +1 @@
1
+ am:
@@ -62,17 +62,11 @@ ar:
62
62
  edit:
63
63
  title: تحرير النتيجة
64
64
  update: تحديث النتيجة
65
- form:
66
- add_proposal: إضافة اقتراح
67
65
  index:
68
66
  title: النتائج
69
67
  new:
70
68
  create: إنشاء نتيجة
71
69
  title: نتيجة جديدة
72
- proposals:
73
- close: قريب
74
- current_selection: الإختيار الحالي
75
- select: تحديد
76
70
  update:
77
71
  invalid: حدثت مشكلة أثناء تحديث هذه النتيجة
78
72
  success: تم تحديث النتيجة بنجاح
@@ -165,30 +159,16 @@ ar:
165
159
  show:
166
160
  stats:
167
161
  attendees: الحاضرين
168
- back_to_result: العودة إلى النتيجة
162
+ back_to_resource: العودة إلى النتيجة
169
163
  comments: تعليقات
170
164
  contributions: مساهمات
171
165
  last_edited_by: التعديل الأخير تم بواسطة
172
166
  last_updated_at: آخر تحديث في
173
167
  meetings: اجتماعات
174
- number_of_versions: إصدارات
175
168
  proposals: اقتراحات
176
- show_all_versions: عرض جميع الإصدارات
177
- version_author: مؤلف الإصدار
178
- version_created_at: تم إنشاء الإصدار في
179
- version_number: رقم الإصدار
180
- version_number_out_of_total: "%{current_version} من %{total_count}"
181
169
  votes: الدعم
182
170
  timeline:
183
171
  title: تطور المشروع
184
- versions:
185
- index:
186
- changes_at_title: التغييرات في "%{title}"
187
- title: إصدارات
188
- show:
189
- changes_at_title: التغييرات في "%{title}"
190
- version:
191
- version_index: الإصدار %{index}
192
172
  components:
193
173
  accountability:
194
174
  name: المسائلة
@@ -224,9 +204,6 @@ ar:
224
204
  participatory_process_groups:
225
205
  highlighted_results:
226
206
  results: النتائج
227
- participatory_spaces:
228
- highlighted_results:
229
- see_all: شاهد الكل (%{count})
230
207
  resource_links:
231
208
  included_projects:
232
209
  result_project: المشاريع المدرجة في هذه النتيجة