decidim-accountability 0.23.3 → 0.24.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/decidim/accountability/accountability/_categories.scss +5 -4
  3. data/app/cells/decidim/accountability/content_blocks/highlighted_results/elements.erb +5 -0
  4. data/app/cells/decidim/accountability/content_blocks/highlighted_results/heading.erb +1 -0
  5. data/app/cells/decidim/accountability/content_blocks/highlighted_results_cell.rb +18 -0
  6. data/app/cells/decidim/accountability/result_cell.rb +21 -0
  7. data/app/cells/decidim/accountability/result_m/data.erb +23 -0
  8. data/app/cells/decidim/accountability/result_m/footer.erb +22 -0
  9. data/app/cells/decidim/accountability/result_m/tags.erb +1 -0
  10. data/app/cells/decidim/accountability/result_m_cell.rb +37 -0
  11. data/app/controllers/concerns/decidim/accountability/admin/filterable.rb +59 -0
  12. data/app/controllers/decidim/accountability/admin/attachment_collections_controller.rb +32 -0
  13. data/app/controllers/decidim/accountability/admin/attachments_controller.rb +32 -0
  14. data/app/controllers/decidim/accountability/admin/results_controller.rb +7 -2
  15. data/app/helpers/decidim/accountability/admin/filterable_helper.rb +10 -0
  16. data/app/helpers/decidim/accountability/breadcrumb_helper.rb +3 -1
  17. data/app/models/decidim/accountability/result.rb +15 -2
  18. data/app/models/decidim/accountability/status.rb +5 -0
  19. data/app/views/decidim/accountability/admin/results/index.html.erb +52 -2
  20. data/app/views/decidim/accountability/results/_show_leaf.html.erb +2 -0
  21. data/app/views/decidim/accountability/results/_show_parent.html.erb +2 -0
  22. data/config/locales/ar.yml +0 -4
  23. data/config/locales/bg.yml +0 -4
  24. data/config/locales/ca.yml +24 -4
  25. data/config/locales/cs.yml +25 -5
  26. data/config/locales/da.yml +0 -4
  27. data/config/locales/de.yml +24 -4
  28. data/config/locales/el.yml +0 -4
  29. data/config/locales/en.yml +24 -4
  30. data/config/locales/es-MX.yml +24 -4
  31. data/config/locales/es-PY.yml +24 -4
  32. data/config/locales/es.yml +24 -4
  33. data/config/locales/eu.yml +0 -4
  34. data/config/locales/fi-plain.yml +24 -4
  35. data/config/locales/fi.yml +24 -4
  36. data/config/locales/fr-CA.yml +24 -4
  37. data/config/locales/fr.yml +24 -4
  38. data/config/locales/gl.yml +24 -4
  39. data/config/locales/hu.yml +0 -4
  40. data/config/locales/id-ID.yml +0 -4
  41. data/config/locales/is-IS.yml +24 -4
  42. data/config/locales/it.yml +24 -4
  43. data/config/locales/ja.yml +24 -4
  44. data/config/locales/lv.yml +0 -4
  45. data/config/locales/nl.yml +24 -4
  46. data/config/locales/no.yml +21 -4
  47. data/config/locales/pl.yml +25 -5
  48. data/config/locales/pt-BR.yml +0 -4
  49. data/config/locales/pt.yml +0 -4
  50. data/config/locales/ro-RO.yml +33 -9
  51. data/config/locales/ru.yml +0 -4
  52. data/config/locales/si-LK.yml +3 -0
  53. data/config/locales/sk.yml +7 -4
  54. data/config/locales/sl.yml +0 -4
  55. data/config/locales/sr-CS.yml +0 -4
  56. data/config/locales/sv.yml +24 -4
  57. data/config/locales/tr-TR.yml +22 -4
  58. data/config/locales/uk.yml +0 -4
  59. data/config/locales/zh-CN.yml +0 -4
  60. data/lib/decidim/accountability.rb +1 -0
  61. data/lib/decidim/accountability/admin_engine.rb +2 -0
  62. data/lib/decidim/accountability/api.rb +10 -0
  63. data/lib/decidim/accountability/component.rb +20 -8
  64. data/lib/decidim/accountability/engine.rb +0 -17
  65. data/lib/decidim/accountability/version.rb +1 -1
  66. data/lib/decidim/api/accountability_type.rb +26 -0
  67. data/lib/decidim/api/result_type.rb +32 -0
  68. data/lib/decidim/api/status_type.rb +19 -0
  69. data/lib/decidim/api/timeline_entry_type.rb +17 -0
  70. metadata +39 -28
  71. data/app/types/decidim/accountability/accountability_type.rb +0 -32
  72. data/app/types/decidim/accountability/result_type.rb +0 -35
  73. data/app/types/decidim/accountability/status_type.rb +0 -20
  74. data/app/types/decidim/accountability/timeline_entry_type.rb +0 -18
  75. data/app/views/decidim/participatory_processes/participatory_process_groups/_highlighted_results.html.erb +0 -12
  76. data/app/views/decidim/participatory_processes/participatory_process_groups/_result.html.erb +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cd37e0d9df6d52f7f813a03d056210eee28969aa80b787cd301e35e5f5bd465
4
- data.tar.gz: cd46056322cdb4919559155b5b60b9c3f33fb750e62c86a3c4596accc5432fcf
3
+ metadata.gz: 684355228a0dc3c075f871e273c988bbfb646697ff2da66552ce3a2ce85e9eba
4
+ data.tar.gz: 9149a6766c974da0bb70e2bed038c962386e7c465f94827a140be6cc3846b185
5
5
  SHA512:
6
- metadata.gz: 184831b8b5647f609156aa43af35b4f1a3aee8242dca6046ba3cedb7c919da7f6a853c027a9225e97d2df1c3b0ef8f9f2a4741cbf7b619d6e494dc2d266e2cc1
7
- data.tar.gz: 1200ab9f34b844ec8e9596cd0a5fdf90c3429d07fb1ffd4b4a42848384c13bb51fc2e33a46b490cf3d7cb18ff5f7ea1f204cc0870f3be8fefaf3e971debc419c
6
+ metadata.gz: e3a27ad2594c5f4a5ab7cc303d6a7f8f046fbc08fd2c89e767536ac830e46a11e6b31e19d901fcd5e9c2892701866deade27e63fbc21baa720b9db6d9732f17a
7
+ data.tar.gz: 76c5a5cf92bb6277b91b2fc7904ab827a6fe6738d9f75f8fe02bf815d58315908e478ae53caf5de8bd6bba8fb40899bb7cc6caa81fff31395853ceac76e09a95
@@ -1,6 +1,7 @@
1
1
  .accountability{
2
2
  .categories{
3
3
  a:hover{
4
+ background-color: var(--secondary);
4
5
  text-decoration: underline;
5
6
  }
6
7
 
@@ -68,7 +69,7 @@
68
69
 
69
70
  .card__link{
70
71
  .category--line{
71
- background: $light-gray-dark;
72
+ background-color: var(--secondary);
72
73
  border-radius: 4px;
73
74
  min-height: 9rem;
74
75
  padding: 1rem;
@@ -77,7 +78,7 @@
77
78
 
78
79
  strong{
79
80
  font-weight: 600;
80
- color: $secondary;
81
+ color: var(--secondary);
81
82
  }
82
83
 
83
84
  .progress-figure{
@@ -86,7 +87,7 @@
86
87
  }
87
88
 
88
89
  .category--count{
89
- color: lighten($dark-gray, 50);
90
+ color: lighten($secondary, 50);
90
91
  position: absolute;
91
92
  right: 1rem;
92
93
  bottom: 1rem;
@@ -96,7 +97,7 @@
96
97
 
97
98
  &:hover{
98
99
  .category--count{
99
- color: lighten($dark-gray, 50);
100
+ color: lighten($secondary, 50);
100
101
  }
101
102
 
102
103
  strong{
@@ -0,0 +1,5 @@
1
+ <div class="row small-up-1 medium-up-2 mediumlarge-up-3 large-up-3 card-grid">
2
+ <% elements.each do |element| %>
3
+ <%= card_for element, context: { show_space: true } %>
4
+ <% end %>
5
+ </div>
@@ -0,0 +1 @@
1
+ <h2 class="section-heading"><%= t("decidim.accountability.content_blocks.highlighted_results.results") %></h2>
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Accountability
5
+ module ContentBlocks
6
+ class HighlightedResultsCell < Decidim::ContentBlocks::HighlightedElementsCell
7
+ include Cell::ViewModel::Partial
8
+ include Decidim::IconHelper
9
+ include Decidim::Accountability::ApplicationHelper
10
+ include ActiveSupport::NumberHelper
11
+
12
+ def base_relation
13
+ @base_relation ||= Decidim::Accountability::Result.where(component: published_components)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cell/partial"
4
+
5
+ module Decidim
6
+ module Accountability
7
+ # This cell renders the result card for an instance of a Result
8
+ # the default size is the Medium Card (:m)
9
+ class ResultCell < Decidim::ViewModel
10
+ def show
11
+ cell card_size, model, options
12
+ end
13
+
14
+ private
15
+
16
+ def card_size
17
+ "decidim/accountability/result_m"
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,23 @@
1
+ <% if has_dates? %>
2
+ <div class="card__icondata">
3
+ <ul class="card-data">
4
+ <li class="card-data__item">
5
+ <%= icon "datetime", class: "icon--big", role: "img", aria_label: t("decidim.accountability.content_blocks.highlighted_results.dates") %>
6
+ </li>
7
+ <li class="card-data__item">
8
+ <div class="card-data__item--centerblock">
9
+ <strong><%= t("activemodel.attributes.result.start_date") %></strong>
10
+ <br>
11
+ <%= start_date ? l(start_date, format: :decidim_short) : t("decidim.accountability.content_blocks.highlighted_results.unspecified") %>
12
+ </div>
13
+ </li>
14
+ <li class="card-data__item">
15
+ <div class="card-data__item--centerblock">
16
+ <strong><%= t("activemodel.attributes.result.end_date") %></strong>
17
+ <br>
18
+ <%= end_date ? l(end_date, format: :decidim_short) : t("decidim.accountability.content_blocks.highlighted_results.unspecified") %>
19
+ </div>
20
+ </li>
21
+ </ul>
22
+ </div>
23
+ <% end %>
@@ -0,0 +1,22 @@
1
+ <div class="card__footer">
2
+ <div class="card__support">
3
+ <% if progress.present? %>
4
+ <div id="<%= "accountability-result-#{model.id}-progress" %>" class="progress__bar">
5
+ <div class="progress__bar__title">
6
+ <span class="progress__bar__number"><%= progress_text %></span>
7
+ <span class="progress__bar__text"><%= t("decidim.accountability.result_m.executed") %></span>
8
+ </div>
9
+ <div class="progress progress__bar__bar" role="progressbar" tabindex="0" aria-valuenow="<%= progress %>" aria-valuemin="0" aria-valuetext="<%= progress %> percent" aria-valuemax="100">
10
+ <div class="progress-meter progress__bar__bar--complete" style="width: <%= progress %>%"></div>
11
+ <div class="progress__bar__bar--incomplete" style="width:calc(100% - <%= progress %>%);"></div>
12
+ </div>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= link_to(
17
+ t("decidim.accountability.result_m.view"),
18
+ resource_path,
19
+ class: "card__button button button--sc secondary light small"
20
+ ) %>
21
+ </div>
22
+ </div>
@@ -0,0 +1 @@
1
+ <%= cell "decidim/tags", model, context: { extra_classes: ["tags--result"] } %>
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cell/partial"
4
+
5
+ module Decidim
6
+ module Accountability
7
+ # This cell renders the Medium (:m) result card
8
+ # for an instance of a Result
9
+ class ResultMCell < Decidim::CardMCell
10
+ include Decidim::SanitizeHelper
11
+ include Decidim::TranslationsHelper
12
+ include ActiveSupport::NumberHelper
13
+
14
+ delegate :start_date, :end_date, :progress, to: :model
15
+
16
+ private
17
+
18
+ def resource_path
19
+ resource_locator(model).path
20
+ end
21
+
22
+ def progress_text
23
+ return if progress.blank?
24
+
25
+ number_to_percentage(progress, precision: 1, strip_insignificant_zeros: true, locale: I18n.locale, format: "%n%")
26
+ end
27
+
28
+ def statuses
29
+ []
30
+ end
31
+
32
+ def has_dates?
33
+ start_date.present? && end_date.present?
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/concern"
4
+
5
+ module Decidim
6
+ module Accountability
7
+ module Admin
8
+ module Filterable
9
+ extend ActiveSupport::Concern
10
+
11
+ included do
12
+ include Decidim::Admin::Filterable
13
+
14
+ helper Decidim::Accountability::Admin::FilterableHelper
15
+
16
+ private
17
+
18
+ def base_query
19
+ collection
20
+ end
21
+
22
+ def search_field_predicate
23
+ :id_string_or_title_cont
24
+ end
25
+
26
+ def filters
27
+ [
28
+ :scope_id_eq,
29
+ :category_id_eq,
30
+ :status_id_eq
31
+ ]
32
+ end
33
+
34
+ def filters_with_values
35
+ {
36
+ scope_id_eq: scope_ids_hash(scopes.top_level),
37
+ category_id_eq: category_ids_hash(categories.first_class),
38
+ status_id_eq: status_ids_hash(statuses)
39
+ }
40
+ end
41
+
42
+ # Can't user `super` here, because it does not belong to a superclass
43
+ # but to a concern.
44
+ def dynamically_translated_filters
45
+ [:scope_id_eq, :category_id_eq, :status_id_eq]
46
+ end
47
+
48
+ def status_ids_hash(statuses)
49
+ statuses.each_with_object({}) { |status, hash| hash[status.id] = status.id }
50
+ end
51
+
52
+ def translated_status_id_eq(id)
53
+ translated_attribute(statuses.find_by(id: id).name)
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Accountability
5
+ module Admin
6
+ # Controller that allows managing all the attachment collections for an
7
+ # accountability result.
8
+ #
9
+ class AttachmentCollectionsController < Admin::ApplicationController
10
+ include Decidim::Admin::Concerns::HasAttachmentCollections
11
+
12
+ def after_destroy_path
13
+ result_attachment_collections_path(result, result.component, current_participatory_space)
14
+ end
15
+
16
+ def collection_for
17
+ result
18
+ end
19
+
20
+ def result
21
+ @result ||= results.find(params[:result_id])
22
+ end
23
+
24
+ private
25
+
26
+ def results
27
+ @results ||= Result.where(component: current_component)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Accountability
5
+ module Admin
6
+ # Controller that allows managing all the attachments for an
7
+ # accountability result.
8
+ #
9
+ class AttachmentsController < Admin::ApplicationController
10
+ include Decidim::Admin::Concerns::HasAttachments
11
+
12
+ def after_destroy_path
13
+ results_path
14
+ end
15
+
16
+ def attached_to
17
+ result
18
+ end
19
+
20
+ def result
21
+ @result ||= results.find(params[:result_id])
22
+ end
23
+
24
+ private
25
+
26
+ def results
27
+ @results ||= Result.where(component: current_component)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -8,9 +8,15 @@ module Decidim
8
8
  include Decidim::ApplicationHelper
9
9
  include Decidim::SanitizeHelper
10
10
  include Decidim::Proposals::Admin::Picker
11
+ include Decidim::Accountability::Admin::Filterable
11
12
 
12
13
  helper_method :results, :parent_result, :parent_results, :statuses, :present
13
14
 
15
+ def collection
16
+ parent_id = params[:parent_id].presence
17
+ @collection ||= Result.where(component: current_component, parent_id: parent_id).page(params[:page]).per(15)
18
+ end
19
+
14
20
  def new
15
21
  enforce_permission_to :create, :result
16
22
 
@@ -75,8 +81,7 @@ module Decidim
75
81
  private
76
82
 
77
83
  def results
78
- parent_id = params[:parent_id].presence
79
- @results ||= Result.where(component: current_component, parent_id: parent_id).page(params[:page]).per(15)
84
+ @results ||= filtered_collection
80
85
  end
81
86
 
82
87
  def result
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Accountability
5
+ module Admin
6
+ module FilterableHelper
7
+ end
8
+ end
9
+ end
10
+ end
@@ -18,7 +18,9 @@ module Decidim
18
18
  end
19
19
 
20
20
  def category
21
- current_participatory_space.categories.find(params[:filter][:category_id]) if params[:filter] && params[:filter][:category_id].present?
21
+ return if (category_id = params.dig(:filter, :category_id)).blank?
22
+
23
+ @category ||= current_participatory_space.categories.find(category_id.is_a?(Array) ? category_id.first : category_id)
22
24
  end
23
25
  end
24
26
  end
@@ -6,6 +6,8 @@ module Decidim
6
6
  # title, description and any other useful information to render a custom result.
7
7
  class Result < Accountability::ApplicationRecord
8
8
  include Decidim::Resourceable
9
+ include Decidim::HasAttachments
10
+ include Decidim::HasAttachmentCollections
9
11
  include Decidim::HasComponent
10
12
  include Decidim::ScopableResource
11
13
  include Decidim::HasCategory
@@ -23,13 +25,15 @@ module Decidim
23
25
  translatable_fields :title, :description
24
26
 
25
27
  has_many :children, foreign_key: "parent_id", class_name: "Decidim::Accountability::Result", inverse_of: :parent, dependent: :destroy
26
- belongs_to :parent, foreign_key: "parent_id", class_name: "Decidim::Accountability::Result", inverse_of: :children, optional: true, counter_cache: :children_count
28
+ belongs_to :parent, class_name: "Decidim::Accountability::Result", inverse_of: :children, optional: true, counter_cache: :children_count
27
29
 
28
30
  belongs_to :status, foreign_key: "decidim_accountability_status_id", class_name: "Decidim::Accountability::Status", inverse_of: :results, optional: true
29
31
 
30
32
  has_many :timeline_entries, -> { order(:entry_date) }, foreign_key: "decidim_accountability_result_id",
31
33
  class_name: "Decidim::Accountability::TimelineEntry", inverse_of: :result, dependent: :destroy
32
34
 
35
+ scope :order_by_most_recent, -> { order(created_at: :desc) }
36
+
33
37
  after_save :update_parent_progress, if: -> { parent_id.present? }
34
38
 
35
39
  searchable_fields(
@@ -87,6 +91,15 @@ module Decidim
87
91
  can_participate_in_space?(user)
88
92
  end
89
93
 
94
+ ransacker :id_string do
95
+ Arel.sql(%{cast("decidim_accountability_results"."id" as text)})
96
+ end
97
+
98
+ # Allow ransacker to search for a key in a hstore column (`title`.`en`)
99
+ ransacker :title do |parent|
100
+ Arel::Nodes::InfixOperation.new("->>", parent.table[:title], Arel::Nodes.build_quoted(I18n.locale.to_s))
101
+ end
102
+
90
103
  private
91
104
 
92
105
  # Private: When a row uses weight 1 and there's more than one, weight shouldn't be considered
@@ -94,7 +107,7 @@ module Decidim
94
107
  def children_use_weighted_progress?
95
108
  return false if children.pluck(:weight).all?(&:nil?)
96
109
 
97
- children.length == 1 || children.pluck(:weight).none? { |weight| weight == 1.0 }
110
+ children.length == 1 || children.pluck(:weight).none? { |weight| weight&.to_d == 1.0.to_d }
98
111
  end
99
112
  end
100
113
  end
@@ -16,6 +16,11 @@ module Decidim
16
16
 
17
17
  validates :key, presence: true, uniqueness: { scope: :decidim_component_id }
18
18
  validates :name, presence: true
19
+
20
+ # Allow ransacker to search for a key in a hstore column (`name`.`en`)
21
+ ransacker :name do |parent|
22
+ Arel::Nodes::InfixOperation.new("->>", parent.table[:name], Arel::Nodes.build_quoted(I18n.locale.to_s))
23
+ end
19
24
  end
20
25
  end
21
26
  end
@@ -12,23 +12,65 @@
12
12
  </h2>
13
13
  </div>
14
14
 
15
+ <%= admin_filter_selector(:results) %>
15
16
  <div class="card-section">
16
17
  <div class="table-scroll">
17
18
  <table class="table-list">
18
19
  <thead>
19
20
  <tr>
20
- <th><%= t("models.result.fields.title", scope: "decidim.accountability") %></th>
21
- <%= th_resource_scope_label %>
21
+ <th>
22
+ <%= sort_link(query, :id, t("models.result.fields.id", scope: "decidim.accountability"), default_order: :desc ) %>
23
+ </th>
24
+ <th>
25
+ <%= sort_link(query, :title, t("models.result.fields.title", scope: "decidim.accountability")) %>
26
+ </th>
27
+ <th>
28
+ <%= sort_link(query, :category_name, t("models.result.fields.category", scope: "decidim.accountability") ) %>
29
+ </th>
30
+ <% if resource_with_scopes_enabled? %>
31
+ <th>
32
+ <%= sort_link(query, :scope_name, t("models.result.fields.scope", scope: "decidim.accountability") ) %>
33
+ </th>
34
+ <% end %>
35
+ <th>
36
+ <%= sort_link(query, :status_name, t("models.result.fields.status", scope: "decidim.accountability") ) %>
37
+ </th>
38
+ <th>
39
+ <%= sort_link(query, :progress, t("models.result.fields.progress", scope: "decidim.accountability") ) %>
40
+ </th>
41
+ <th>
42
+ <%= sort_link(query, :created_at, t("models.result.fields.created_at", scope: "decidim.accountability") ) %>
43
+ </th>
22
44
  <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
23
45
  </tr>
24
46
  </thead>
25
47
  <tbody>
26
48
  <% results.each do |result| %>
27
49
  <tr data-id="<%= result.id %>">
50
+ <td>
51
+ <%= result.id %><br>
52
+ </td>
28
53
  <td>
29
54
  <%= link_to translated_attribute(result.title), results_path(parent_id: result.id) %><br>
30
55
  </td>
56
+ <td>
57
+ <% if result.category %>
58
+ <%= translated_attribute result.category.name %>
59
+ <% end %>
60
+ </td>
31
61
  <%= td_resource_scope_for(result.scope) %>
62
+ <td>
63
+ <% if result.status %>
64
+ <%= translated_attribute result.status.name %>
65
+ <% end %>
66
+ </td>
67
+ <td>
68
+ <%= result.progress&.to_i %>
69
+ </td>
70
+ <td>
71
+ <%= l result.created_at, format: :decidim_short %>
72
+ </td>
73
+
32
74
  <td class="table-list__actions">
33
75
  <%= icon_link_to "eye", resource_locator(result).path, t("actions.preview", scope: "decidim.accountability"), class: "action-icon--preview", target: :blank %>
34
76
 
@@ -44,6 +86,14 @@
44
86
  <%= icon_link_to "pencil", edit_result_path(result), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
45
87
  <% end %>
46
88
 
89
+ <% if allowed_to? :update, :result, result: result %>
90
+ <%= icon_link_to "folder", result_attachment_collections_path(result), t("actions.attachment_collections", scope: "decidim.accountability"), class: "action-icon--attachment_collections" %>
91
+ <% end %>
92
+
93
+ <% if allowed_to? :update, :result, result: result %>
94
+ <%= icon_link_to "paperclip", result_attachments_path(result), t("actions.attachments", scope: "decidim.accountability"), class: "action-icon--attachments" %>
95
+ <% end %>
96
+
47
97
  <% if allowed_to? :destroy, :result, result: result %>
48
98
  <%= icon_link_to "circle-x", result_path(result), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")) } %>
49
99
  <% end %>