decidim-accountability 0.27.9 → 0.28.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/cells/decidim/accountability/content_blocks/highlighted_results_cell.rb +3 -8
- data/app/cells/decidim/accountability/highlighted_results/show.erb +3 -1
- data/app/cells/decidim/accountability/highlighted_results_for_component/show.erb +19 -19
- data/app/cells/decidim/accountability/highlighted_results_for_component_cell.rb +29 -6
- data/app/cells/decidim/accountability/project/show.erb +11 -0
- data/app/cells/decidim/accountability/project/timeline.erb +22 -0
- data/app/cells/decidim/accountability/project_cell.rb +75 -0
- data/app/cells/decidim/accountability/result_activity_cell.rb +1 -4
- data/app/cells/decidim/accountability/result_card_cell.rb +21 -0
- data/app/cells/decidim/accountability/result_cell.rb +2 -2
- data/app/cells/decidim/accountability/result_l/extra_data.erb +3 -0
- data/app/cells/decidim/accountability/result_l_cell.rb +30 -0
- data/app/cells/decidim/accountability/result_metadata/project_aside.erb +6 -0
- data/app/cells/decidim/accountability/result_metadata/show_footer.erb +11 -0
- data/app/cells/decidim/accountability/result_metadata/versions.erb +1 -0
- data/app/cells/decidim/accountability/result_metadata_cell.rb +136 -0
- data/app/cells/decidim/accountability/results/show.erb +7 -0
- data/app/cells/decidim/accountability/results_cell.rb +14 -0
- data/app/cells/decidim/accountability/status/show.erb +9 -0
- data/app/cells/decidim/accountability/status/status.erb +16 -0
- data/app/cells/decidim/accountability/status_cell.rb +91 -0
- data/app/commands/decidim/accountability/admin/import_projects_to_accountability.rb +37 -0
- data/app/controllers/concerns/decidim/accountability/admin/filterable.rb +2 -2
- data/app/controllers/decidim/accountability/admin/import_results_controller.rb +18 -6
- data/app/controllers/decidim/accountability/admin/projects_import_controller.rb +31 -0
- data/app/controllers/decidim/accountability/admin/results_controller.rb +4 -5
- data/app/controllers/decidim/accountability/admin/statuses_controller.rb +3 -3
- data/app/controllers/decidim/accountability/admin/timeline_entries_controller.rb +3 -3
- data/app/controllers/decidim/accountability/results_controller.rb +20 -2
- data/app/events/decidim/accountability/proposal_linked_event.rb +18 -1
- data/app/events/decidim/accountability/result_progress_updated_event.rb +18 -2
- data/app/forms/decidim/accountability/admin/import_results_form.rb +22 -0
- data/app/forms/decidim/accountability/admin/result_import_projects_form.rb +51 -0
- data/app/helpers/decidim/accountability/admin/application_helper.rb +1 -0
- data/app/helpers/decidim/accountability/application_helper.rb +43 -2
- data/app/helpers/decidim/accountability/breadcrumb_helper.rb +10 -0
- data/app/jobs/decidim/accountability/admin/import_projects_job.rb +72 -0
- data/app/mailers/decidim/accountability/import_projects_mailer.rb +25 -0
- data/app/models/decidim/accountability/result.rb +1 -1
- data/app/packs/entrypoints/decidim_accountability.js +4 -1
- data/app/packs/entrypoints/decidim_accountability_admin_imports.js +3 -0
- data/app/packs/images/decidim/accountability/breadcrumb_arrow.svg +3 -0
- data/app/packs/src/decidim/accountability/admin/imports.js +15 -0
- data/app/packs/stylesheets/accountability.scss +169 -0
- data/app/permissions/decidim/accountability/admin/permissions.rb +17 -6
- data/app/presenters/decidim/accountability/admin_log/result_presenter.rb +2 -2
- data/app/presenters/decidim/accountability/admin_log/status_presenter.rb +2 -2
- data/app/presenters/decidim/accountability/admin_log/timeline_entry_presenter.rb +2 -2
- data/app/queries/decidim/accountability/metrics/results_metric_manage.rb +1 -1
- data/app/services/decidim/accountability/results_calculator.rb +1 -1
- data/app/services/decidim/accountability/results_csv_importer.rb +2 -2
- data/app/views/decidim/accountability/admin/import_results/new.html.erb +27 -23
- data/app/views/decidim/accountability/admin/projects_import/new.html.erb +45 -0
- data/app/views/decidim/accountability/admin/results/_form.html.erb +46 -46
- data/app/views/decidim/accountability/admin/results/edit.html.erb +18 -7
- data/app/views/decidim/accountability/admin/results/index.html.erb +102 -91
- data/app/views/decidim/accountability/admin/results/new.html.erb +18 -8
- data/app/views/decidim/accountability/admin/shared/_subnav.html.erb +1 -1
- data/app/views/decidim/accountability/admin/statuses/_form.html.erb +15 -17
- data/app/views/decidim/accountability/admin/statuses/edit.html.erb +16 -6
- data/app/views/decidim/accountability/admin/statuses/index.html.erb +33 -36
- data/app/views/decidim/accountability/admin/statuses/new.html.erb +16 -6
- data/app/views/decidim/accountability/admin/timeline_entries/_form.html.erb +12 -14
- data/app/views/decidim/accountability/admin/timeline_entries/edit.html.erb +17 -6
- data/app/views/decidim/accountability/admin/timeline_entries/index.html.erb +35 -34
- data/app/views/decidim/accountability/admin/timeline_entries/new.html.erb +17 -6
- data/app/views/decidim/accountability/import_projects_mailer/import.html.erb +2 -0
- data/app/views/decidim/accountability/results/_home_categories.html.erb +28 -73
- data/app/views/decidim/accountability/results/_linked_results.html.erb +3 -12
- data/app/views/decidim/accountability/results/_project.html.erb +29 -0
- data/app/views/decidim/accountability/results/_projects_aside.html.erb +40 -0
- data/app/views/decidim/accountability/results/_scope_filters.html.erb +27 -27
- data/app/views/decidim/accountability/results/_search.html.erb +15 -9
- data/app/views/decidim/accountability/results/_stats_box.html.erb +3 -3
- data/app/views/decidim/accountability/results/home.html.erb +34 -8
- data/app/views/decidim/accountability/results/index.html.erb +15 -15
- data/app/views/decidim/accountability/results/index.js.erb +3 -0
- data/app/views/decidim/accountability/results/show.html.erb +9 -10
- data/app/views/decidim/accountability/versions/show.html.erb +13 -10
- data/app/views/decidim/participatory_spaces/_result.html.erb +4 -4
- data/config/assets.rb +2 -2
- data/config/locales/ar.yml +23 -61
- data/config/locales/bg.yml +0 -96
- data/config/locales/ca.yml +54 -31
- data/config/locales/cs.yml +58 -29
- data/config/locales/da.yml +1 -36
- data/config/locales/de.yml +59 -36
- data/config/locales/el.yml +62 -29
- data/config/locales/en.yml +55 -31
- data/config/locales/es-MX.yml +52 -29
- data/config/locales/es-PY.yml +52 -29
- data/config/locales/es.yml +55 -32
- data/config/locales/eu.yml +53 -30
- data/config/locales/fi-plain.yml +51 -28
- data/config/locales/fi.yml +54 -31
- data/config/locales/fr-CA.yml +51 -28
- data/config/locales/fr.yml +52 -29
- data/config/locales/ga-IE.yml +0 -4
- data/config/locales/gl.yml +0 -41
- data/config/locales/hu.yml +41 -29
- data/config/locales/id-ID.yml +1 -30
- data/config/locales/is-IS.yml +0 -32
- data/config/locales/it.yml +0 -43
- data/config/locales/ja.yml +55 -39
- data/config/locales/kaa.yml +20 -1
- data/config/locales/ko.yml +0 -188
- data/config/locales/lb.yml +1 -42
- data/config/locales/lt.yml +60 -41
- data/config/locales/lv.yml +1 -36
- data/config/locales/nl.yml +0 -41
- data/config/locales/no.yml +8 -49
- data/config/locales/pl.yml +17 -61
- data/config/locales/pt-BR.yml +41 -29
- data/config/locales/pt.yml +0 -42
- data/config/locales/ro-RO.yml +39 -66
- data/config/locales/ru.yml +1 -30
- data/config/locales/si-LK.yml +0 -4
- data/config/locales/sk.yml +1 -40
- data/config/locales/sl.yml +0 -11
- data/config/locales/sq-AL.yml +82 -7
- data/config/locales/sr-CS.yml +1 -30
- data/config/locales/sv.yml +36 -51
- data/config/locales/th-TH.yml +0 -140
- data/config/locales/tr-TR.yml +9 -75
- data/config/locales/uk.yml +1 -28
- data/config/locales/zh-CN.yml +1 -36
- data/config/locales/zh-TW.yml +52 -43
- data/lib/decidim/accountability/admin_engine.rb +3 -2
- data/lib/decidim/accountability/component.rb +4 -99
- data/lib/decidim/accountability/engine.rb +9 -1
- data/lib/decidim/accountability/result_serializer.rb +1 -1
- data/lib/decidim/accountability/seeds.rb +115 -0
- data/lib/decidim/accountability/test/factories.rb +18 -29
- data/lib/decidim/accountability/version.rb +1 -1
- data/lib/decidim/api/result_type.rb +1 -0
- metadata +62 -51
- data/app/cells/decidim/accountability/content_blocks/highlighted_results/elements.erb +0 -5
- data/app/cells/decidim/accountability/content_blocks/highlighted_results/heading.erb +0 -1
- data/app/cells/decidim/accountability/result_m/data.erb +0 -23
- data/app/cells/decidim/accountability/result_m/footer.erb +0 -22
- data/app/cells/decidim/accountability/result_m/tags.erb +0 -1
- data/app/cells/decidim/accountability/result_m_cell.rb +0 -37
- data/app/events/decidim/accountability/base_result_event.rb +0 -29
- data/app/packs/stylesheets/decidim/accountability/_accountability.scss +0 -4
- data/app/packs/stylesheets/decidim/accountability/accountability/_cards.scss +0 -11
- data/app/packs/stylesheets/decidim/accountability/accountability/_categories.scss +0 -121
- data/app/packs/stylesheets/decidim/accountability/accountability/_lines_breadcrumb.scss +0 -37
- data/app/packs/stylesheets/decidim/accountability/accountability/_results.scss +0 -148
- data/app/views/decidim/accountability/admin/results/proposals_picker.html.erb +0 -1
- data/app/views/decidim/accountability/result_widgets/show.html.erb +0 -2
- data/app/views/decidim/accountability/results/_home_header.html.erb +0 -23
- data/app/views/decidim/accountability/results/_results_leaf.html.erb +0 -47
- data/app/views/decidim/accountability/results/_results_parent.html.erb +0 -32
- data/app/views/decidim/accountability/results/_show_leaf.html.erb +0 -81
- data/app/views/decidim/accountability/results/_show_parent.html.erb +0 -30
- data/app/views/decidim/accountability/results/_stats.html.erb +0 -15
- data/app/views/decidim/accountability/results/_timeline.html.erb +0 -30
- data/app/views/decidim/accountability/versions/index.html.erb +0 -12
- data/config/locales/he-IL.yml +0 -219
- data/decidim-accountability.gemspec +0 -38
@@ -1,111 +1,122 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="card">
|
3
|
-
<div class="
|
4
|
-
<h2 class="
|
5
|
-
|
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
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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="
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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, :
|
41
|
+
<%= sort_link(query, :scope_name, t("models.result.fields.scope", scope: "decidim.accountability") ) %>
|
38
42
|
</th>
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
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
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
-
|
76
|
-
|
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
|
-
|
79
|
-
|
80
|
-
|
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
|
-
|
83
|
-
|
84
|
-
|
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
|
-
|
87
|
-
<%= icon_link_to "
|
88
|
-
|
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
|
-
|
91
|
-
|
92
|
-
|
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
|
-
|
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
|
-
|
110
|
+
<%= resource_permissions_link(result) %>
|
99
111
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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
|
-
|
3
|
-
|
2
|
+
<div class="item_show__header">
|
3
|
+
<h2 class="item_show__header-title">
|
4
|
+
<%= t(".title") %>
|
5
|
+
</h2>
|
6
|
+
</div>
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
1
|
+
<%= link_to t(".statuses"), statuses_path, class: "button button__sm button__secondary" %>
|
@@ -1,23 +1,21 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="card-
|
3
|
-
<
|
4
|
-
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</div>
|
8
|
+
<div class="row column">
|
9
|
+
<%= form.translated :text_field, :name, aria: { label: :name } %>
|
10
|
+
</div>
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
20
|
-
|
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
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
18
|
+
</div>
|
@@ -1,45 +1,42 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
2
|
<div class="card">
|
3
|
-
<div class="
|
4
|
-
<h2 class="
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h2 class="item_show__header-title">
|
5
5
|
<%= t(".title") %>
|
6
|
-
<%= link_to t("actions.
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
22
|
-
|
23
|
-
|
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
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
18
|
+
</div>
|
@@ -1,19 +1,17 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="card-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
12
|
-
|
13
|
-
|
8
|
+
<div class="row column">
|
9
|
+
<%= form.translated :text_field, :title, aria: { label: :title } %>
|
10
|
+
</div>
|
14
11
|
|
15
|
-
|
16
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
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="
|
3
|
-
<h2 class="
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
-
|
20
|
-
|
21
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
-
|
18
|
+
</div>
|