decidim-accountability 0.27.5 → 0.28.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/accountability/content_blocks/highlighted_results_cell.rb +3 -8
  3. data/app/cells/decidim/accountability/highlighted_results/show.erb +3 -1
  4. data/app/cells/decidim/accountability/highlighted_results_for_component/show.erb +19 -19
  5. data/app/cells/decidim/accountability/highlighted_results_for_component_cell.rb +29 -6
  6. data/app/cells/decidim/accountability/project/show.erb +11 -0
  7. data/app/cells/decidim/accountability/project/timeline.erb +22 -0
  8. data/app/cells/decidim/accountability/project_cell.rb +75 -0
  9. data/app/cells/decidim/accountability/result_activity_cell.rb +1 -4
  10. data/app/cells/decidim/accountability/result_card_cell.rb +21 -0
  11. data/app/cells/decidim/accountability/result_cell.rb +2 -2
  12. data/app/cells/decidim/accountability/result_l/extra_data.erb +3 -0
  13. data/app/cells/decidim/accountability/result_l_cell.rb +30 -0
  14. data/app/cells/decidim/accountability/result_metadata/project_aside.erb +6 -0
  15. data/app/cells/decidim/accountability/result_metadata/show_footer.erb +11 -0
  16. data/app/cells/decidim/accountability/result_metadata/versions.erb +1 -0
  17. data/app/cells/decidim/accountability/result_metadata_cell.rb +136 -0
  18. data/app/cells/decidim/accountability/results/show.erb +7 -0
  19. data/app/cells/decidim/accountability/results_cell.rb +14 -0
  20. data/app/cells/decidim/accountability/status/show.erb +9 -0
  21. data/app/cells/decidim/accountability/status/status.erb +16 -0
  22. data/app/cells/decidim/accountability/status_cell.rb +91 -0
  23. data/app/commands/decidim/accountability/admin/import_projects_to_accountability.rb +37 -0
  24. data/app/controllers/concerns/decidim/accountability/admin/filterable.rb +2 -2
  25. data/app/controllers/decidim/accountability/admin/import_results_controller.rb +18 -6
  26. data/app/controllers/decidim/accountability/admin/projects_import_controller.rb +31 -0
  27. data/app/controllers/decidim/accountability/admin/results_controller.rb +4 -5
  28. data/app/controllers/decidim/accountability/admin/statuses_controller.rb +3 -3
  29. data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +3 -3
  30. data/app/controllers/decidim/accountability/results_controller.rb +20 -2
  31. data/app/forms/decidim/accountability/admin/import_results_form.rb +22 -0
  32. data/app/forms/decidim/accountability/admin/result_import_projects_form.rb +51 -0
  33. data/app/helpers/decidim/accountability/admin/application_helper.rb +1 -0
  34. data/app/helpers/decidim/accountability/application_helper.rb +43 -2
  35. data/app/helpers/decidim/accountability/breadcrumb_helper.rb +10 -0
  36. data/app/jobs/decidim/accountability/admin/import_projects_job.rb +72 -0
  37. data/app/mailers/decidim/accountability/import_projects_mailer.rb +25 -0
  38. data/app/models/decidim/accountability/result.rb +1 -1
  39. data/app/packs/entrypoints/decidim_accountability.js +4 -1
  40. data/app/packs/entrypoints/decidim_accountability_admin_imports.js +3 -0
  41. data/app/packs/images/decidim/accountability/breadcrumb_arrow.svg +3 -0
  42. data/app/packs/src/decidim/accountability/admin/imports.js +15 -0
  43. data/app/packs/stylesheets/accountability.scss +169 -0
  44. data/app/permissions/decidim/accountability/admin/permissions.rb +17 -6
  45. data/app/presenters/decidim/accountability/admin_log/result_presenter.rb +2 -2
  46. data/app/presenters/decidim/accountability/admin_log/status_presenter.rb +2 -2
  47. data/app/presenters/decidim/accountability/admin_log/timeline_entry_presenter.rb +2 -2
  48. data/app/queries/decidim/accountability/metrics/results_metric_manage.rb +1 -1
  49. data/app/services/decidim/accountability/results_calculator.rb +1 -1
  50. data/app/services/decidim/accountability/results_csv_importer.rb +2 -2
  51. data/app/views/decidim/accountability/admin/import_results/new.html.erb +27 -23
  52. data/app/views/decidim/accountability/admin/projects_import/new.html.erb +45 -0
  53. data/app/views/decidim/accountability/admin/results/_form.html.erb +46 -46
  54. data/app/views/decidim/accountability/admin/results/edit.html.erb +18 -7
  55. data/app/views/decidim/accountability/admin/results/index.html.erb +102 -91
  56. data/app/views/decidim/accountability/admin/results/new.html.erb +18 -8
  57. data/app/views/decidim/accountability/admin/shared/_subnav.html.erb +1 -1
  58. data/app/views/decidim/accountability/admin/statuses/_form.html.erb +15 -17
  59. data/app/views/decidim/accountability/admin/statuses/edit.html.erb +16 -6
  60. data/app/views/decidim/accountability/admin/statuses/index.html.erb +33 -36
  61. data/app/views/decidim/accountability/admin/statuses/new.html.erb +16 -6
  62. data/app/views/decidim/accountability/admin/timeline_entries/_form.html.erb +12 -14
  63. data/app/views/decidim/accountability/admin/timeline_entries/edit.html.erb +17 -6
  64. data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +35 -34
  65. data/app/views/decidim/accountability/admin/timeline_entries/new.html.erb +17 -6
  66. data/app/views/decidim/accountability/import_projects_mailer/import.html.erb +2 -0
  67. data/app/views/decidim/accountability/results/_home_categories.html.erb +28 -73
  68. data/app/views/decidim/accountability/results/_linked_results.html.erb +3 -12
  69. data/app/views/decidim/accountability/results/_project.html.erb +29 -0
  70. data/app/views/decidim/accountability/results/_projects_aside.html.erb +40 -0
  71. data/app/views/decidim/accountability/results/_scope_filters.html.erb +27 -27
  72. data/app/views/decidim/accountability/results/_search.html.erb +15 -9
  73. data/app/views/decidim/accountability/results/_stats_box.html.erb +3 -3
  74. data/app/views/decidim/accountability/results/home.html.erb +34 -8
  75. data/app/views/decidim/accountability/results/index.html.erb +15 -15
  76. data/app/views/decidim/accountability/results/index.js.erb +3 -0
  77. data/app/views/decidim/accountability/results/show.html.erb +9 -10
  78. data/app/views/decidim/accountability/versions/show.html.erb +12 -9
  79. data/app/views/decidim/participatory_spaces/_result.html.erb +2 -2
  80. data/config/assets.rb +2 -2
  81. data/config/locales/ar.yml +22 -60
  82. data/config/locales/bg.yml +0 -36
  83. data/config/locales/ca.yml +53 -30
  84. data/config/locales/cs.yml +58 -29
  85. data/config/locales/da.yml +0 -36
  86. data/config/locales/de.yml +59 -36
  87. data/config/locales/el.yml +62 -29
  88. data/config/locales/en.yml +55 -31
  89. data/config/locales/es-MX.yml +52 -29
  90. data/config/locales/es-PY.yml +52 -29
  91. data/config/locales/es.yml +53 -30
  92. data/config/locales/eu.yml +53 -30
  93. data/config/locales/fi-plain.yml +51 -28
  94. data/config/locales/fi.yml +52 -29
  95. data/config/locales/fr-CA.yml +51 -28
  96. data/config/locales/fr.yml +52 -29
  97. data/config/locales/ga-IE.yml +0 -4
  98. data/config/locales/gl.yml +0 -41
  99. data/config/locales/hu.yml +41 -29
  100. data/config/locales/id-ID.yml +0 -30
  101. data/config/locales/is-IS.yml +0 -32
  102. data/config/locales/it.yml +0 -41
  103. data/config/locales/ja.yml +55 -39
  104. data/config/locales/kaa.yml +20 -1
  105. data/config/locales/ko.yml +0 -15
  106. data/config/locales/lb.yml +0 -41
  107. data/config/locales/lt.yml +60 -41
  108. data/config/locales/lv.yml +0 -36
  109. data/config/locales/nl.yml +0 -41
  110. data/config/locales/no.yml +8 -49
  111. data/config/locales/pl.yml +17 -40
  112. data/config/locales/pt-BR.yml +41 -29
  113. data/config/locales/pt.yml +0 -41
  114. data/config/locales/ro-RO.yml +14 -39
  115. data/config/locales/ru.yml +0 -30
  116. data/config/locales/si-LK.yml +0 -3
  117. data/config/locales/sk.yml +0 -40
  118. data/config/locales/sl.yml +0 -11
  119. data/config/locales/sq-AL.yml +82 -7
  120. data/config/locales/sr-CS.yml +0 -30
  121. data/config/locales/sv.yml +23 -38
  122. data/config/locales/tr-TR.yml +9 -62
  123. data/config/locales/uk.yml +0 -28
  124. data/config/locales/zh-CN.yml +0 -36
  125. data/config/locales/zh-TW.yml +52 -43
  126. data/lib/decidim/accountability/admin_engine.rb +3 -2
  127. data/lib/decidim/accountability/component.rb +4 -99
  128. data/lib/decidim/accountability/engine.rb +9 -1
  129. data/lib/decidim/accountability/result_serializer.rb +1 -1
  130. data/lib/decidim/accountability/seeds.rb +115 -0
  131. data/lib/decidim/accountability/test/factories.rb +3 -2
  132. data/lib/decidim/accountability/version.rb +1 -1
  133. metadata +61 -48
  134. data/app/cells/decidim/accountability/content_blocks/highlighted_results/elements.erb +0 -5
  135. data/app/cells/decidim/accountability/content_blocks/highlighted_results/heading.erb +0 -1
  136. data/app/cells/decidim/accountability/result_m/data.erb +0 -23
  137. data/app/cells/decidim/accountability/result_m/footer.erb +0 -22
  138. data/app/cells/decidim/accountability/result_m/tags.erb +0 -1
  139. data/app/cells/decidim/accountability/result_m_cell.rb +0 -37
  140. data/app/packs/stylesheets/decidim/accountability/_accountability.scss +0 -4
  141. data/app/packs/stylesheets/decidim/accountability/accountability/_cards.scss +0 -11
  142. data/app/packs/stylesheets/decidim/accountability/accountability/_categories.scss +0 -121
  143. data/app/packs/stylesheets/decidim/accountability/accountability/_lines_breadcrumb.scss +0 -37
  144. data/app/packs/stylesheets/decidim/accountability/accountability/_results.scss +0 -148
  145. data/app/views/decidim/accountability/admin/results/proposals_picker.html.erb +0 -1
  146. data/app/views/decidim/accountability/result_widgets/show.html.erb +0 -2
  147. data/app/views/decidim/accountability/results/_home_header.html.erb +0 -23
  148. data/app/views/decidim/accountability/results/_results_leaf.html.erb +0 -47
  149. data/app/views/decidim/accountability/results/_results_parent.html.erb +0 -32
  150. data/app/views/decidim/accountability/results/_show_leaf.html.erb +0 -81
  151. data/app/views/decidim/accountability/results/_show_parent.html.erb +0 -30
  152. data/app/views/decidim/accountability/results/_stats.html.erb +0 -15
  153. data/app/views/decidim/accountability/results/_timeline.html.erb +0 -30
  154. data/app/views/decidim/accountability/versions/index.html.erb +0 -12
  155. data/config/environment.rb +0 -3
@@ -1,111 +1,122 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="card">
3
- <div class="card-divider">
4
- <h2 class="card-title">
5
- <%= link_to "#{translated_attribute(parent_result.title)} > ", edit_result_path(parent_result) if parent_result %>
3
+ <div class="item_show__header">
4
+ <h2 class="item_show__header-title">
5
+ <% if parent_result %>
6
+ <%= "#{translated_attribute(parent_result.title)} > " %>
7
+ <% end %>
6
8
  <%= t(".title") %>
7
- <div class="button--title">
8
- <%= 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 %>
9
- <%= render partial: "decidim/accountability/admin/shared/subnav" unless parent_result %>
10
- <%= export_dropdown %>
11
- <%= link_to t("actions.import_csv", scope: "decidim.accountability"), import_results_path, class: "button tiny button--simple" if allowed_to? :create, :result %>
12
- </div>
9
+
10
+ <%= export_dropdowns(query) %>
11
+ <%= import_dropdown do %>
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>
18
+ <% end %>
19
+ <%= render partial: "decidim/accountability/admin/shared/subnav" unless parent_result %>
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 %>
21
+ <%= render partial: "decidim/admin/components/resource_action" %>
13
22
  </h2>
14
23
  </div>
15
24
 
16
25
  <%= admin_filter_selector(:results) %>
17
- <div class="card-section">
18
- <div class="table-scroll">
19
- <table class="table-list">
20
- <thead>
21
- <tr>
22
- <th>
23
- <%= sort_link(query, :id, t("models.result.fields.id", scope: "decidim.accountability"), default_order: :desc ) %>
24
- </th>
25
- <th>
26
- <%= sort_link(query, :title, t("models.result.fields.title", scope: "decidim.accountability")) %>
27
- </th>
28
- <th>
29
- <%= sort_link(query, :category_name, t("models.result.fields.category", scope: "decidim.accountability") ) %>
30
- </th>
31
- <% if resource_with_scopes_enabled? %>
32
- <th>
33
- <%= sort_link(query, :scope_name, t("models.result.fields.scope", scope: "decidim.accountability") ) %>
34
- </th>
35
- <% end %>
26
+ <div class="table-scroll">
27
+ <table class="table-list">
28
+ <thead>
29
+ <tr>
30
+ <th>
31
+ <%= sort_link(query, :id, t("models.result.fields.id", scope: "decidim.accountability"), default_order: :desc ) %>
32
+ </th>
33
+ <th>
34
+ <%= sort_link(query, :title, t("models.result.fields.title", scope: "decidim.accountability")) %>
35
+ </th>
36
+ <th>
37
+ <%= sort_link(query, :category_name, t("models.result.fields.category", scope: "decidim.accountability") ) %>
38
+ </th>
39
+ <% if resource_with_scopes_enabled? %>
36
40
  <th>
37
- <%= sort_link(query, :status_name, t("models.result.fields.status", scope: "decidim.accountability") ) %>
41
+ <%= sort_link(query, :scope_name, t("models.result.fields.scope", scope: "decidim.accountability") ) %>
38
42
  </th>
39
- <th>
40
- <%= sort_link(query, :progress, t("models.result.fields.progress", scope: "decidim.accountability") ) %>
41
- </th>
42
- <th>
43
- <%= sort_link(query, :created_at, t("models.result.fields.created_at", scope: "decidim.accountability") ) %>
44
- </th>
45
- <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
46
- </tr>
47
- </thead>
48
- <tbody>
49
- <% results.each do |result| %>
50
- <tr data-id="<%= result.id %>">
51
- <td>
52
- <%= result.id %><br>
53
- </td>
54
- <td>
43
+ <% end %>
44
+ <th>
45
+ <%= sort_link(query, :status_name, t("models.result.fields.status", scope: "decidim.accountability") ) %>
46
+ </th>
47
+ <th>
48
+ <%= sort_link(query, :progress, t("models.result.fields.progress", scope: "decidim.accountability") ) %>
49
+ </th>
50
+ <th>
51
+ <%= sort_link(query, :created_at, t("models.result.fields.created_at", scope: "decidim.accountability") ) %>
52
+ </th>
53
+ <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
54
+ </tr>
55
+ </thead>
56
+ <tbody>
57
+ <% results.each do |result| %>
58
+ <tr data-id="<%= result.id %>">
59
+ <td>
60
+ <%= result.id %><br>
61
+ </td>
62
+ <td>
63
+ <% if result.parent_id.nil? %>
55
64
  <%= link_to translated_attribute(result.title), results_path(parent_id: result.id) %><br>
56
- </td>
57
- <td>
58
- <% if result.category %>
59
- <%= translated_attribute result.category.name %>
60
- <% end %>
61
- </td>
62
- <%= td_resource_scope_for(result.scope) %>
63
- <td>
64
- <% if result.status %>
65
- <%= translated_attribute result.status.name %>
66
- <% end %>
67
- </td>
68
- <td>
69
- <%= result.progress&.to_i %>
70
- </td>
71
- <td>
72
- <%= l result.created_at, format: :decidim_short %>
73
- </td>
65
+ <% else %>
66
+ <%= translated_attribute(result.title) %>
67
+ <% end %>
68
+ </td>
69
+ <td>
70
+ <% if result.category %>
71
+ <%= translated_attribute result.category.name %>
72
+ <% end %>
73
+ </td>
74
+ <%= td_resource_scope_for(result.scope) %>
75
+ <td>
76
+ <% if result.status %>
77
+ <%= translated_attribute result.status.name %>
78
+ <% end %>
79
+ </td>
80
+ <td>
81
+ <%= result.progress&.to_i %>
82
+ </td>
83
+ <td>
84
+ <%= l result.created_at, format: :decidim_short %>
85
+ </td>
74
86
 
75
- <td class="table-list__actions">
76
- <%= icon_link_to "eye", resource_locator(result).path, t("actions.preview", scope: "decidim.accountability"), class: "action-icon--preview", target: :blank %>
87
+ <td class="table-list__actions">
88
+ <% if allowed_to? :update, :result, result: result %>
89
+ <%= icon_link_to "pencil-line", edit_result_path(result), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
90
+ <% end %>
77
91
 
78
- <% if allowed_to? :create_children, :result, result: result %>
79
- <%= icon_link_to "plus", results_path(parent_id: result.id), t("actions.new", scope: "decidim.accountability", name: t("models.result.name", scope: "decidim.accountability.admin")), class: "action-icon--plus" %>
80
- <% end %>
92
+ <% if allowed_to? :create_children, :result, result: result %>
93
+ <%= icon_link_to "add-line", results_path(parent_id: result.id), t("actions.new_result", scope: "decidim.accountability"), class: "action-icon--plus" %>
94
+ <% end %>
81
95
 
82
- <% if allowed_to? :update, :result, result: result %>
83
- <%= icon_link_to "clock", result_timeline_entries_path(result), t("actions.timeline_entries", scope: "decidim.accountability"), class: "action-icon--clock" %>
84
- <% end %>
96
+ <% if allowed_to? :update, :result, result: result %>
97
+ <%= icon_link_to "time-line", result_timeline_entries_path(result), t("actions.timeline_entries", scope: "decidim.accountability"), class: "action-icon--clock" %>
98
+ <% end %>
85
99
 
86
- <% if allowed_to? :update, :result, result: result %>
87
- <%= icon_link_to "pencil", edit_result_path(result), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
88
- <% end %>
100
+ <% if allowed_to? :update, :result, result: result %>
101
+ <%= icon_link_to "folder-line", result_attachment_collections_path(result), t("actions.attachment_collections", scope: "decidim.accountability"), class: "action-icon--attachment_collections" %>
102
+ <% end %>
89
103
 
90
- <% if allowed_to? :update, :result, result: result %>
91
- <%= icon_link_to "folder", result_attachment_collections_path(result), t("actions.attachment_collections", scope: "decidim.accountability"), class: "action-icon--attachment_collections" %>
92
- <% end %>
104
+ <% if allowed_to? :update, :result, result: result %>
105
+ <%= icon_link_to "attachment-line", result_attachments_path(result), t("actions.attachments", scope: "decidim.accountability"), class: "action-icon--attachments" %>
106
+ <% end %>
93
107
 
94
- <% if allowed_to? :update, :result, result: result %>
95
- <%= icon_link_to "paperclip", result_attachments_path(result), t("actions.attachments", scope: "decidim.accountability"), class: "action-icon--attachments" %>
96
- <% end %>
108
+ <%= icon_link_to "eye-line", resource_locator(result).path, t("actions.preview", scope: "decidim.accountability"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %>
97
109
 
98
- <%= resource_permissions_link(result) %>
110
+ <%= resource_permissions_link(result) %>
99
111
 
100
- <% if allowed_to? :destroy, :result, result: result %>
101
- <%= 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")) } %>
102
- <% end %>
103
- </td>
104
- </tr>
105
- <% end %>
106
- </tbody>
107
- </table>
108
- <%= paginate results, theme: "decidim" %>
109
- </div>
112
+ <% if allowed_to? :destroy, :result, result: result %>
113
+ <%= icon_link_to "delete-bin-line", 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")) } %>
114
+ <% end %>
115
+ </td>
116
+ </tr>
117
+ <% end %>
118
+ </tbody>
119
+ </table>
110
120
  </div>
111
121
  </div>
122
+ <%= decidim_paginate results %>
@@ -1,10 +1,20 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
- <%= decidim_form_for(@form, html: { class: "form new_result" }) do |f| %>
3
- <%= render partial: "form", object: f, locals: { title: t(".title") } %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t(".title") %>
5
+ </h2>
6
+ </div>
4
7
 
5
- <div class="button--double form-general-submit">
6
- <%= f.submit t(".create") %>
7
- </div>
8
- <% end %>
9
-
10
- <%= javascript_pack_tag "decidim_accountability_admin" %>
8
+ <div class="item__edit item__edit-1col">
9
+ <div class="item__edit-form">
10
+ <%= decidim_form_for(@form, html: { class: "form form-defaults new_result" }) do |f| %>
11
+ <%= render partial: "form", object: f %>
12
+ <div class="item__edit-sticky">
13
+ <div class="item__edit-sticky-container">
14
+ <%= f.submit t(".create"), class: "button button__sm button__secondary" %>
15
+ </div>
16
+ </div>
17
+ <% end %>
18
+ </div>
19
+ </div>
20
+ <%= append_javascript_pack_tag "decidim_accountability_admin" %>
@@ -1 +1 @@
1
- <%= link_to t(".statuses"), statuses_path, class: "button tiny button--simple" %>
1
+ <%= link_to t(".statuses"), statuses_path, class: "button button__sm button__secondary" %>
@@ -1,23 +1,21 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title"><%= title %></h2>
4
- </div>
1
+ <div class="form__wrapper">
2
+ <div class="card pt-4">
3
+ <div class="card-section">
4
+ <div class="row column">
5
+ <%= form.text_field :key, autofocus: true %>
6
+ </div>
5
7
 
6
- <div class="card-section">
7
- <div class="row column">
8
- <%= form.text_field :key, autofocus: true %>
9
- </div>
8
+ <div class="row column">
9
+ <%= form.translated :text_field, :name, aria: { label: :name } %>
10
+ </div>
10
11
 
11
- <div class="row column">
12
- <%= form.translated :text_field, :name %>
13
- </div>
14
-
15
- <div class="row column">
16
- <%= form.translated :text_area, :description %>
17
- </div>
12
+ <div class="row column">
13
+ <%= form.translated :text_area, :description, aria: { label: :description } %>
14
+ </div>
18
15
 
19
- <div class="row column">
20
- <%= form.number_field :progress %>
16
+ <div class="row column">
17
+ <%= form.number_field :progress %>
18
+ </div>
21
19
  </div>
22
20
  </div>
23
21
  </div>
@@ -1,8 +1,18 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
- <%= decidim_form_for(@form, html: { class: "form edit_status" }) do |f| %>
3
- <%= render partial: "form", object: f, locals: { title: t(".title") } %>
4
-
5
- <div class="button--double form-general-submit">
6
- <%= f.submit t(".update") %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t(".title") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for(@form, html: { class: "form-defaults form edit_status" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t(".update"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
7
17
  </div>
8
- <% end %>
18
+ </div>
@@ -1,45 +1,42 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="card">
3
- <div class="card-divider">
4
- <h2 class="card-title">
3
+ <div class="item_show__header">
4
+ <h2 class="item_show__header-title">
5
5
  <%= t(".title") %>
6
- <%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.status.name", scope: "decidim.accountability.admin")), new_status_path, class: "button tiny button--title" if allowed_to? :create, :status %>
6
+ <%= link_to t("actions.new_status", scope: "decidim.accountability"), new_status_path, class: "button button__sm button__secondary" if allowed_to? :create, :status %>
7
7
  </h2>
8
8
  </div>
9
+ <div class="table-scroll">
10
+ <table class="table-list">
11
+ <thead>
12
+ <tr>
13
+ <th><%= t("models.status.fields.key", scope: "decidim.accountability") %></th>
14
+ <th><%= t("models.status.fields.name", scope: "decidim.accountability") %></th>
15
+ <th><%= t("models.status.fields.description", scope: "decidim.accountability") %></th>
16
+ <th><%= t("models.status.fields.progress", scope: "decidim.accountability") %></th>
17
+ <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
18
+ </tr>
19
+ </thead>
20
+ <tbody>
21
+ <% statuses.each do |status| %>
22
+ <tr data-id="<%= status.id %>">
23
+ <td><%= status.key %><br></td>
24
+ <td><%= translated_attribute(status.name) %></td>
25
+ <td><%= truncate translated_attribute(status.description), lenght: 50 %></td>
26
+ <td><%= status.progress %></td>
27
+ <td class="table-list__actions">
28
+ <% if allowed_to? :update, :status, status: status %>
29
+ <%= icon_link_to "pencil-line", edit_status_path(status), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
30
+ <% end %>
9
31
 
10
- <div class="card-section">
11
- <div class="table-scroll">
12
- <table class="table-list">
13
- <thead>
14
- <tr>
15
- <th><%= t("models.status.fields.key", scope: "decidim.accountability") %></th>
16
- <th><%= t("models.status.fields.name", scope: "decidim.accountability") %></th>
17
- <th><%= t("models.status.fields.description", scope: "decidim.accountability") %></th>
18
- <th><%= t("models.status.fields.progress", scope: "decidim.accountability") %></th>
19
- <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
32
+ <% if allowed_to? :destroy, :status, status: status %>
33
+ <%= icon_link_to "delete-bin-line", status_path(status), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability", name: t("models.status.name", scope: "decidim.accountability.admin")) } %>
34
+ <% end %>
35
+ </td>
20
36
  </tr>
21
- </thead>
22
- <tbody>
23
- <% statuses.each do |status| %>
24
- <tr data-id="<%= status.id %>">
25
- <td><%= status.key %><br></td>
26
- <td><%= translated_attribute(status.name) %></td>
27
- <td><%= truncate translated_attribute(status.description), lenght: 50 %></td>
28
- <td><%= status.progress %></td>
29
- <td class="table-list__actions">
30
- <% if allowed_to? :update, :status, status: status %>
31
- <%= icon_link_to "pencil", edit_status_path(status), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
32
- <% end %>
33
-
34
- <% if allowed_to? :destroy, :status, status: status %>
35
- <%= icon_link_to "circle-x", status_path(status), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability", name: t("models.status.name", scope: "decidim.accountability.admin")) } %>
36
- <% end %>
37
- </td>
38
- </tr>
39
- <% end %>
40
- </tbody>
41
- </table>
42
- <%= paginate statuses, theme: "decidim" %>
43
- </div>
37
+ <% end %>
38
+ </tbody>
39
+ </table>
44
40
  </div>
45
41
  </div>
42
+ <%= decidim_paginate statuses %>
@@ -1,8 +1,18 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
- <%= decidim_form_for(@form, html: { class: "form new_status" }) do |f| %>
3
- <%= render partial: "form", object: f, locals: { title: t(".title") } %>
4
-
5
- <div class="button--double form-general-submit">
6
- <%= f.submit t(".create") %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t(".title") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for(@form, html: { class: "form-defaults form new_status" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t(".create"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
7
17
  </div>
8
- <% end %>
18
+ </div>
@@ -1,19 +1,17 @@
1
- <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title"><%= title %></h2>
4
- </div>
5
-
6
- <div class="card-section">
7
- <div class="row column">
8
- <%= form.date_field :entry_date %>
9
- </div>
1
+ <div class="form__wrapper">
2
+ <div class="card pt-4">
3
+ <div class="card-section">
4
+ <div class="row column">
5
+ <%= form.date_field :entry_date %>
6
+ </div>
10
7
 
11
- <div class="row column">
12
- <%= form.translated :text_field, :title %>
13
- </div>
8
+ <div class="row column">
9
+ <%= form.translated :text_field, :title, aria: { label: :title } %>
10
+ </div>
14
11
 
15
- <div class="row column">
16
- <%= form.translated :editor, :description %>
12
+ <div class="row column">
13
+ <%= form.translated :editor, :description, aria: { label: :description } %>
14
+ </div>
17
15
  </div>
18
16
  </div>
19
17
  </div>
@@ -1,7 +1,18 @@
1
- <%= decidim_form_for([result, @form], html: { class: "form edit_timeline_entry" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t(".title") } %>
3
-
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t(".update") %>
1
+ <% add_decidim_page_title(t(".title")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t(".title") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for([result, @form], html: { class: "form-defaults form edit_timeline_entry" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t(".update"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
6
17
  </div>
7
- <% end %>
18
+ </div>
@@ -1,41 +1,42 @@
1
+ <% add_decidim_page_title(t(".title")) %>
2
+ <% add_decidim_page_title(translated_attribute(result.title)) %>
1
3
  <div class="card">
2
- <div class="card-divider">
3
- <h2 class="card-title">
4
- <%= link_to "#{translated_attribute(result.title)} > ", edit_result_path(result) %>
5
- <%= t(".title") %>
6
- <%= link_to t("actions.new", scope: "decidim.accountability", name: t("models.timeline_entry.name", scope: "decidim.accountability.admin")), new_result_timeline_entry_path(result), class: "button tiny button--title" if allowed_to? :create, :timeline_entry %>
4
+ <div class="item_show__header">
5
+ <h2 class="item_show__header-title">
6
+ <div>
7
+ <%= link_to "#{translated_attribute(result.title)} > ", edit_result_path(result) %>
8
+ <%= t(".title") %>
9
+ </div>
10
+ <%= link_to t("actions.new_timeline_entry", scope: "decidim.accountability"), new_result_timeline_entry_path(result), class: "button button__sm button__secondary button--title" if allowed_to? :create, :timeline_entry %>
7
11
  </h2>
8
12
  </div>
13
+ <div class="table-scroll">
14
+ <table class="table-list">
15
+ <thead>
16
+ <tr>
17
+ <th><%= t("models.timeline_entry.fields.entry_date", scope: "decidim.accountability") %></th>
18
+ <th><%= t("models.timeline_entry.fields.title", scope: "decidim.accountability") %></th>
19
+ <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
20
+ </tr>
21
+ </thead>
22
+ <tbody>
23
+ <% timeline_entries.each do |timeline_entry| %>
24
+ <tr data-id="<%= timeline_entry.id %>">
25
+ <td><%= l timeline_entry.entry_date, format: :decidim_short %><br></td>
26
+ <td><%= translated_attribute(timeline_entry.title) %></td>
27
+ <td class="table-list__actions">
28
+ <% if allowed_to? :update, :timeline_entry, timeline_entry: timeline_entry %>
29
+ <%= icon_link_to "pencil-line", edit_result_timeline_entry_path(timeline_entry.result, timeline_entry), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
30
+ <% end %>
9
31
 
10
- <div class="card-section">
11
- <div class="table-scroll">
12
- <table class="table-list">
13
- <thead>
14
- <tr>
15
- <th><%= t("models.timeline_entry.fields.entry_date", scope: "decidim.accountability") %></th>
16
- <th><%= t("models.timeline_entry.fields.title", scope: "decidim.accountability") %></th>
17
- <th class="actions"><%= t("actions.title", scope: "decidim.accountability") %></th>
32
+ <% if allowed_to? :destroy, :timeline_entry, timeline_entry: timeline_entry %>
33
+ <%= icon_link_to "delete-bin-line", result_timeline_entry_path(timeline_entry.result, timeline_entry), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability") } %>
34
+ <% end %>
35
+ </td>
18
36
  </tr>
19
- </thead>
20
- <tbody>
21
- <% timeline_entries.each do |timeline_entry| %>
22
- <tr data-id="<%= timeline_entry.id %>">
23
- <td><%= l timeline_entry.entry_date, format: :decidim_short %><br></td>
24
- <td><%= translated_attribute(timeline_entry.title) %></td>
25
- <td class="table-list__actions">
26
- <% if allowed_to? :update, :timeline_entry, timeline_entry: timeline_entry %>
27
- <%= icon_link_to "pencil", edit_result_timeline_entry_path(timeline_entry.result, timeline_entry), t("actions.edit", scope: "decidim.accountability"), class: "action-icon--edit" %>
28
- <% end %>
29
-
30
- <% if allowed_to? :destroy, :timeline_entry, timeline_entry: timeline_entry %>
31
- <%= icon_link_to "circle-x", result_timeline_entry_path(timeline_entry.result, timeline_entry), t("actions.destroy", scope: "decidim.accountability"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.accountability") } %>
32
- <% end %>
33
- </td>
34
- </tr>
35
- <% end %>
36
- </tbody>
37
- </table>
38
- <%= paginate timeline_entries, theme: "decidim" %>
39
- </div>
37
+ <% end %>
38
+ </tbody>
39
+ </table>
40
40
  </div>
41
41
  </div>
42
+ <%= decidim_paginate timeline_entries %>
@@ -1,7 +1,18 @@
1
- <%= decidim_form_for([result, @form], html: { class: "form new_timeline_entry" }) do |f| %>
2
- <%= render partial: "form", object: f, locals: { title: t(".title") } %>
3
-
4
- <div class="button--double form-general-submit">
5
- <%= f.submit t(".create") %>
1
+ <% add_decidim_page_title(t(".title")) %>
2
+ <div class="item_show__header">
3
+ <h2 class="item_show__header-title">
4
+ <%= t(".title") %>
5
+ </h2>
6
+ </div>
7
+ <div class="item__edit item__edit-1col">
8
+ <div class="item__edit-form">
9
+ <%= decidim_form_for([result, @form], html: { class: "form-defaults form new_timeline_entry" }) do |f| %>
10
+ <%= render partial: "form", object: f %>
11
+ <div class="item__edit-sticky">
12
+ <div class="item__edit-sticky-container">
13
+ <%= f.submit t(".create"), class: "button button__sm button__secondary" %>
14
+ </div>
15
+ </div>
16
+ <% end %>
6
17
  </div>
7
- <% end %>
18
+ </div>
@@ -0,0 +1,2 @@
1
+ <p><%= t(".success", component_name: @component.name["en"]) %></p>
2
+ <p> <%= t(".added_projects", count: @projects) %></p>