decidim-debates 0.27.5 → 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/debates/debate_activity_cell.rb +1 -12
- data/app/cells/decidim/debates/debate_card_metadata_cell.rb +43 -0
- data/app/cells/decidim/debates/debate_cell.rb +6 -1
- data/app/cells/decidim/debates/debate_l_cell.rb +49 -0
- data/app/cells/decidim/debates/debate_s_cell.rb +21 -0
- data/app/commands/decidim/debates/admin/close_debate.rb +1 -1
- data/app/commands/decidim/debates/close_debate.rb +1 -1
- data/app/commands/decidim/debates/create_debate.rb +13 -4
- data/app/commands/decidim/debates/update_debate.rb +15 -2
- data/app/controllers/decidim/debates/admin/debate_closes_controller.rb +2 -2
- data/app/controllers/decidim/debates/admin/debates_controller.rb +5 -5
- data/app/controllers/decidim/debates/debates_controller.rb +7 -8
- data/app/events/decidim/debates/close_debate_event.rb +1 -1
- data/app/events/decidim/debates/create_debate_event.rb +1 -1
- data/app/forms/decidim/debates/admin/close_debate_form.rb +1 -1
- data/app/forms/decidim/debates/close_debate_form.rb +2 -2
- data/app/forms/decidim/debates/debate_form.rb +2 -2
- data/app/helpers/decidim/debates/application_helper.rb +42 -17
- data/app/jobs/decidim/debates/hide_all_created_by_author_job.rb +13 -0
- data/app/jobs/decidim/debates/settings_change_job.rb +2 -2
- data/app/models/decidim/debates/debate.rb +4 -4
- data/app/packs/entrypoints/decidim_debates.js +2 -0
- data/app/packs/images/decidim/gamification/badges/decidim_gamification_badges_commented_debates.svg +42 -1
- data/app/presenters/decidim/debates/admin_log/debate_presenter.rb +2 -2
- data/app/views/decidim/debates/admin/debate_closes/edit.html.erb +26 -14
- data/app/views/decidim/debates/admin/debates/_form.html.erb +40 -39
- data/app/views/decidim/debates/admin/debates/edit.html.erb +16 -6
- data/app/views/decidim/debates/admin/debates/index.html.erb +60 -58
- data/app/views/decidim/debates/admin/debates/new.html.erb +16 -6
- data/app/views/decidim/debates/debates/_close_debate_modal.html.erb +22 -11
- data/app/views/decidim/debates/debates/_debates.html.erb +5 -6
- data/app/views/decidim/debates/debates/_form.html.erb +10 -19
- data/app/views/decidim/debates/debates/edit.html.erb +16 -20
- data/app/views/decidim/debates/debates/index.html.erb +19 -23
- data/app/views/decidim/debates/debates/index.js.erb +3 -4
- data/app/views/decidim/debates/debates/new.html.erb +16 -20
- data/app/views/decidim/debates/debates/show.html.erb +106 -109
- data/app/views/decidim/debates/versions/show.html.erb +14 -5
- data/config/locales/ar.yml +0 -17
- data/config/locales/bg.yml +0 -4
- data/config/locales/ca.yml +8 -29
- data/config/locales/cs.yml +8 -29
- data/config/locales/de.yml +9 -30
- data/config/locales/el.yml +3 -28
- data/config/locales/en.yml +9 -30
- data/config/locales/es-MX.yml +8 -29
- data/config/locales/es-PY.yml +9 -30
- data/config/locales/es.yml +8 -29
- data/config/locales/eu.yml +11 -32
- data/config/locales/fi-plain.yml +8 -29
- data/config/locales/fi.yml +8 -29
- data/config/locales/fr-CA.yml +9 -30
- data/config/locales/fr.yml +9 -30
- data/config/locales/ga-IE.yml +0 -15
- data/config/locales/gl.yml +0 -16
- data/config/locales/hu.yml +3 -29
- data/config/locales/id-ID.yml +0 -15
- data/config/locales/is-IS.yml +0 -9
- data/config/locales/it.yml +0 -31
- data/config/locales/ja.yml +9 -33
- data/config/locales/lb.yml +0 -25
- data/config/locales/lt.yml +7 -29
- data/config/locales/lv.yml +0 -17
- data/config/locales/nl.yml +0 -28
- data/config/locales/no.yml +0 -31
- data/config/locales/pl.yml +8 -30
- data/config/locales/pt-BR.yml +0 -36
- data/config/locales/pt.yml +0 -31
- data/config/locales/ro-RO.yml +3 -29
- data/config/locales/ru.yml +0 -12
- data/config/locales/sk.yml +0 -17
- data/config/locales/sl.yml +0 -3
- data/config/locales/sr-CS.yml +0 -6
- data/config/locales/sv.yml +4 -31
- data/config/locales/tr-TR.yml +1 -30
- data/config/locales/uk.yml +0 -12
- data/config/locales/zh-CN.yml +0 -29
- data/config/locales/zh-TW.yml +2 -28
- data/lib/decidim/debates/component.rb +4 -88
- data/lib/decidim/debates/engine.rb +29 -7
- data/lib/decidim/debates/seeds.rb +104 -0
- data/lib/decidim/debates/test/factories.rb +3 -1
- data/lib/decidim/debates/version.rb +1 -1
- metadata +27 -28
- data/app/cells/decidim/debates/debate_m/data.erb +0 -10
- data/app/cells/decidim/debates/debate_m/footer.erb +0 -10
- data/app/cells/decidim/debates/debate_m/multiple_dates.erb +0 -17
- data/app/cells/decidim/debates/debate_m/open_date.erb +0 -7
- data/app/cells/decidim/debates/debate_m/single_date.erb +0 -9
- data/app/cells/decidim/debates/debate_m/tags.erb +0 -1
- data/app/cells/decidim/debates/debate_m_cell.rb +0 -86
- data/app/controllers/decidim/debates/widgets_controller.rb +0 -19
- data/app/views/decidim/debates/debates/_count.html.erb +0 -1
- data/app/views/decidim/debates/debates/_filters.html.erb +0 -34
- data/app/views/decidim/debates/debates/_filters_small_view.html.erb +0 -18
- data/config/environment.rb +0 -3
@@ -6,8 +6,8 @@ module Decidim
|
|
6
6
|
# This class holds the logic to present a `Decidim::Debate`
|
7
7
|
# for the `AdminLog` log.
|
8
8
|
#
|
9
|
-
# Usage should be automatic and you
|
10
|
-
# directly, but here
|
9
|
+
# Usage should be automatic and you should not need to call this class
|
10
|
+
# directly, but here is an example:
|
11
11
|
#
|
12
12
|
# action_log = Decidim::ActionLog.last
|
13
13
|
# view_helpers # => this comes from the views
|
@@ -1,17 +1,29 @@
|
|
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(@form, url: debate_debate_close_path(debate, @form), html: { class: "form form-defaults edit_close_debate" }) do |f| %>
|
10
|
+
<div class="form__wrapper">
|
11
|
+
<div class="card pt-4 pb-4">
|
6
12
|
|
7
|
-
|
8
|
-
|
9
|
-
|
13
|
+
<div class="card-section">
|
14
|
+
<div class="row column">
|
15
|
+
<%= f.translated :editor, :conclusions, autofocus: true, rows: 15 %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="item__edit-sticky">
|
20
|
+
<div class="item__edit-sticky-container">
|
21
|
+
<%= f.submit t(".close"), class: "button button__sm button__secondary" %>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
25
|
+
</div>
|
10
26
|
</div>
|
11
|
-
|
27
|
+
<% end %>
|
12
28
|
</div>
|
13
|
-
|
14
|
-
<div class="button--double form-general-submit">
|
15
|
-
<%= f.submit t(".close") %>
|
16
|
-
</div>
|
17
|
-
<% end %>
|
29
|
+
</div>
|
@@ -1,53 +1,54 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="card-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<div class="row column hashtags__container">
|
8
|
-
<%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true %>
|
9
|
-
</div>
|
10
|
-
|
11
|
-
<div class="row column hashtags__container">
|
12
|
-
<%= form.translated :editor, :description, hashtaggable: true %>
|
13
|
-
</div>
|
1
|
+
<div class="form__wrapper">
|
2
|
+
<div class="card pt-4">
|
3
|
+
<div class="card-section debate-fields">
|
4
|
+
<div class="row column hashtags__container">
|
5
|
+
<%= form.translated :text_field, :title, autofocus: true, class: "js-hashtags", hashtaggable: true, aria: { label: :title } %>
|
6
|
+
</div>
|
14
7
|
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
<div class="row column hashtags__container">
|
9
|
+
<%= form.translated :editor, :description, hashtaggable: true, aria: { label: :description } %>
|
10
|
+
</div>
|
18
11
|
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
<div class="row column">
|
13
|
+
<%= form.translated :editor, :instructions, aria: { label: :instructions } %>
|
14
|
+
</div>
|
22
15
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
</div>
|
16
|
+
<div class="row column">
|
17
|
+
<%= form.translated :editor, :information_updates, aria: { label: :information_updates } %>
|
18
|
+
</div>
|
27
19
|
|
28
|
-
|
29
|
-
|
30
|
-
|
20
|
+
<div class="row column">
|
21
|
+
<%= label_tag :debate_type, t(".debate_type") %>
|
22
|
+
<div>
|
23
|
+
<%= form.collection_radio_buttons(:finite, [[t(".finite"), true], [t(".open"), false]], :last, :first) do |builder|
|
24
|
+
builder.label(class: "form__wrapper-checkbox-label") { builder.radio_button + builder.text } end %>
|
25
|
+
</div>
|
31
26
|
</div>
|
32
|
-
|
33
|
-
|
27
|
+
|
28
|
+
<div class="row column debate-fields--finite">
|
29
|
+
<div class="column">
|
30
|
+
<%= form.datetime_field :start_time %>
|
31
|
+
</div>
|
32
|
+
<div class="column">
|
33
|
+
<%= form.datetime_field :end_time %>
|
34
|
+
</div>
|
34
35
|
</div>
|
35
|
-
</div>
|
36
36
|
|
37
|
-
|
37
|
+
<% if current_component.has_subscopes? %>
|
38
|
+
<div class="row column">
|
39
|
+
<%= scopes_select_field form, :scope_id, root: current_component.scope %>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
42
|
+
|
38
43
|
<div class="row column">
|
39
|
-
<%=
|
44
|
+
<%= form.categories_select :decidim_category_id, current_participatory_space.categories, include_blank: "", disable_parents: false %>
|
40
45
|
</div>
|
41
|
-
<% end %>
|
42
|
-
|
43
|
-
<div class="row column">
|
44
|
-
<%= form.categories_select :decidim_category_id, current_participatory_space.categories, include_blank: "", disable_parents: false %>
|
45
|
-
</div>
|
46
46
|
|
47
|
-
|
48
|
-
|
47
|
+
<div class="row column">
|
48
|
+
<%= form.check_box :comments_enabled, label: t("enabled", scope: "decidim.comments.admin.shared.availability_fields") %>
|
49
|
+
</div>
|
49
50
|
</div>
|
50
51
|
</div>
|
51
52
|
</div>
|
52
53
|
|
53
|
-
<%=
|
54
|
+
<%= append_javascript_pack_tag "decidim_debates_admin" %>
|
@@ -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_debate" }) 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,69 +1,71 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</div>
|
6
|
+
<%= export_dropdown if allowed_to? :export, :comments %>
|
7
|
+
<%= link_to t("actions.new", scope: "decidim.debates"), new_debate_path, class: "button button__sm button__secondary" if allowed_to? :create, :debate %>
|
8
|
+
<%= render partial: "decidim/admin/components/resource_action" %>
|
10
9
|
</h2>
|
11
10
|
</div>
|
11
|
+
<div class="table-scroll">
|
12
|
+
<table class="table-list">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<th><%= t("models.debate.fields.title", scope: "decidim.debates") %></th>
|
16
|
+
<th><%= t("models.debate.fields.start_time", scope: "decidim.debates") %></th>
|
17
|
+
<th><%= t("models.debate.fields.end_time", scope: "decidim.debates") %></th>
|
18
|
+
<%= th_resource_scope_label %>
|
19
|
+
<th class="actions"><%= t("actions.title", scope: "decidim.debates") %></th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<% debates.each do |debate| %>
|
24
|
+
<tr data-id="<%= debate.id %>">
|
25
|
+
<td>
|
26
|
+
<% if allowed_to? :update, :debate, debate: debate %>
|
27
|
+
<%= link_to present(debate).title(html_escape: true), edit_debate_path(debate) %>
|
28
|
+
<% else %>
|
29
|
+
<%= present(debate).title(html_escape: true) %><br>
|
30
|
+
<% end %>
|
31
|
+
</td>
|
32
|
+
<td>
|
33
|
+
<% if debate.start_time %>
|
34
|
+
<%= l debate.start_time, format: :long %>
|
35
|
+
<% end %>
|
36
|
+
</td>
|
37
|
+
<td>
|
38
|
+
<% if debate.end_time %>
|
39
|
+
<%= l debate.end_time, format: :long %>
|
40
|
+
<% end %>
|
41
|
+
</td>
|
42
|
+
<%= td_resource_scope_for(debate.scope) %>
|
43
|
+
<td class="table-list__actions">
|
44
|
+
<% if allowed_to? :update, :debate, debate: debate %>
|
45
|
+
<%= icon_link_to "pencil-line", edit_debate_path(debate), t("actions.edit", scope: "decidim.debates"), class: "action-icon--edit" %>
|
46
|
+
<% else %>
|
47
|
+
<span class="action-space icon"></span>
|
48
|
+
<% end %>
|
12
49
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<th><%= t("models.debate.fields.title", scope: "decidim.debates") %></th>
|
19
|
-
<th><%= t("models.debate.fields.start_time", scope: "decidim.debates") %></th>
|
20
|
-
<th><%= t("models.debate.fields.end_time", scope: "decidim.debates") %></th>
|
21
|
-
<%= th_resource_scope_label %>
|
22
|
-
<th class="actions"><%= t("actions.title", scope: "decidim.debates") %></th>
|
23
|
-
</tr>
|
24
|
-
</thead>
|
25
|
-
<tbody>
|
26
|
-
<% debates.each do |debate| %>
|
27
|
-
<tr data-id="<%= debate.id %>">
|
28
|
-
<td>
|
29
|
-
<%= link_to present(debate).title(html_escape: true), resource_locator(debate).path, target: :blank %><br>
|
30
|
-
</td>
|
31
|
-
<td>
|
32
|
-
<% if debate.start_time %>
|
33
|
-
<%= l debate.start_time, format: :long %>
|
34
|
-
<% end %>
|
35
|
-
</td>
|
36
|
-
<td>
|
37
|
-
<% if debate.end_time %>
|
38
|
-
<%= l debate.end_time, format: :long %>
|
39
|
-
<% end %>
|
40
|
-
</td>
|
41
|
-
<%= td_resource_scope_for(debate.scope) %>
|
42
|
-
<td class="table-list__actions">
|
43
|
-
<% if allowed_to? :update, :debate, debate: debate %>
|
44
|
-
<%= icon_link_to "pencil", edit_debate_path(debate), t("actions.edit", scope: "decidim.debates"), class: "action-icon--edit" %>
|
45
|
-
<% else %>
|
46
|
-
<span class="action-space icon"></span>
|
47
|
-
<% end %>
|
50
|
+
<% if allowed_to? :close, :debate, debate: debate %>
|
51
|
+
<%= icon_link_to "lock-line" , edit_debate_debate_close_path(debate_id: debate.id, id: debate.id), t("actions.close", scope: "decidim.debates"), class: "action-icon--close" %>
|
52
|
+
<% else %>
|
53
|
+
<span class="action-space icon"></span>
|
54
|
+
<% end %>
|
48
55
|
|
49
|
-
|
50
|
-
<%= icon_link_to "lock-locked", edit_debate_debate_close_path(debate_id: debate.id, id: debate.id), t("actions.close", scope: "decidim.debates"), class: "action-icon--close" %>
|
51
|
-
<% else %>
|
52
|
-
<span class="action-space icon"></span>
|
53
|
-
<% end %>
|
56
|
+
<%= icon_link_to "eye-line", resource_locator(debate).path, t("actions.preview", scope: "decidim.admin"), class: "action-icon--preview", target: :blank, data: { "external-link": false } %>
|
54
57
|
|
55
|
-
|
58
|
+
<%= resource_permissions_link(debate) %>
|
56
59
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
</div>
|
60
|
+
<% if allowed_to? :delete, :debate, debate: debate %>
|
61
|
+
<%= icon_link_to "delete-bin-line", debate_path(debate), t("actions.destroy", scope: "decidim.debates"), method: :delete, class: "action-icon--remove", data: { confirm: t("actions.confirm_destroy", scope: "decidim.debates") } %>
|
62
|
+
<% else %>
|
63
|
+
<span class="action-space icon"></span>
|
64
|
+
<% end %>
|
65
|
+
</td>
|
66
|
+
</tr>
|
67
|
+
<% end %>
|
68
|
+
</tbody>
|
69
|
+
</table>
|
68
70
|
</div>
|
69
71
|
</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 new_debate" }) 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,13 +1,24 @@
|
|
1
|
-
|
2
|
-
<div class="reveal__header">
|
3
|
-
<h3 id="closeDebateModal-label" class="reveal__title"><%= t("decidim.debates.debates.show.close_debate") %></h3>
|
4
|
-
<button class="close-button" data-close aria-label="<%= t(".close") %>" type="button">
|
5
|
-
<span aria-hidden="true">×</span>
|
6
|
-
</button>
|
7
|
-
</div>
|
8
|
-
<p><%= t(".description") %></p>
|
1
|
+
<%= decidim_modal id: "close-debate", class:"close-debate-modal" do %>
|
9
2
|
<%= decidim_form_for form, url: close_debate_path(debate), method: :post do |f| %>
|
10
|
-
|
11
|
-
|
3
|
+
<div data-dialog-container>
|
4
|
+
<%= icon "information-line" %>
|
5
|
+
<h3 class="h3" id="dialog-title-close-debate" data-dialog-title>
|
6
|
+
<%= t("close_debate", scope: "decidim.debates.debates.show") %>
|
7
|
+
</h3>
|
8
|
+
<div class="my-8" id="dialog-desc-close-debate">
|
9
|
+
<p><%= t("description", scope: "decidim.debates.debates.close_debate_modal") %></p>
|
10
|
+
<div class="form__wrapper">
|
11
|
+
<%= f.text_area :conclusions, rows: 10 %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
<div data-dialog-actions>
|
16
|
+
<button type="button" data-dialog-close="close-debate" class="button button__sm md:button__lg button__transparent-secondary">
|
17
|
+
<%= t("cancel", scope: "decidim.debates.debates.close_debate_modal") %>
|
18
|
+
</button>
|
19
|
+
<button type="submit" class="button button__sm md:button__lg button__secondary">
|
20
|
+
<%= t("send", scope: "decidim.debates.debates.close_debate_modal") %>
|
21
|
+
</button>
|
22
|
+
</div>
|
12
23
|
<% end %>
|
13
|
-
|
24
|
+
<% end %>
|
@@ -1,12 +1,11 @@
|
|
1
1
|
<% if debates.empty? %>
|
2
2
|
<%= cell("decidim/announcement", params[:filter].present? ? t(".empty_filters") : t(".empty")) %>
|
3
3
|
<% else %>
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<div class="row small-up-1 medium-up-2 card-grid">
|
4
|
+
<h2 class="h5 md:h3 decorator"><%= t("debates_count", scope: "decidim.debates.debates.count", count: paginated_debates.total_count) %></h2>
|
5
|
+
|
6
|
+
<%= order_selector available_orders, i18n_scope: "decidim.debates.debates.orders" %>
|
7
|
+
|
8
|
+
<div class="card__list-list">
|
10
9
|
<%= render paginated_debates %>
|
11
10
|
</div>
|
12
11
|
|
@@ -1,25 +1,16 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="form__wrapper">
|
2
2
|
<%= form.text_field :title %>
|
3
|
-
</div>
|
4
|
-
|
5
|
-
<div class="field">
|
6
3
|
<%= text_editor_for_debate_description(form) %>
|
7
|
-
</div>
|
8
4
|
|
9
|
-
<% if current_component.has_subscopes? %>
|
10
|
-
|
11
|
-
|
12
|
-
</div>
|
13
|
-
<% end %>
|
5
|
+
<% if current_component.has_subscopes? %>
|
6
|
+
<%= scopes_select_field form, :scope_id, root: current_component.scope %>
|
7
|
+
<% end %>
|
14
8
|
|
15
|
-
<% if current_participatory_space.categories&.any? %>
|
16
|
-
<div class="field">
|
9
|
+
<% if current_participatory_space.categories&.any? %>
|
17
10
|
<%= form.categories_select :category_id, current_participatory_space.categories, include_blank: t(".select_a_category"), disable_parents: false %>
|
18
|
-
|
19
|
-
<% end %>
|
11
|
+
<% end %>
|
20
12
|
|
21
|
-
<% if @form.id.blank? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<% end %>
|
13
|
+
<% if @form.id.blank? && Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.any? %>
|
14
|
+
<%= form.select :user_group_id, Decidim::UserGroups::ManageableUserGroups.for(current_user).verified.map { |g| [g.name, g.id] }, prompt: current_user.name %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
@@ -1,24 +1,20 @@
|
|
1
|
-
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
<%=
|
5
|
-
|
6
|
-
<% end %>
|
1
|
+
<%= render layout: "layouts/decidim/shared/layout_center" do %>
|
2
|
+
<div class="text-center py-10">
|
3
|
+
<h1 class="title-decorator inline-block text-left">
|
4
|
+
<%= t("title", scope: "decidim.debates.debates.edit") %>
|
5
|
+
</h1>
|
7
6
|
</div>
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
<div class="row">
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<%= decidim_form_for(@form) do |form| %>
|
16
|
-
<%= render partial: "form", locals: { form: form } %>
|
17
|
-
<div class="actions">
|
18
|
-
<%= form.submit t(".save"), class: "button expanded", data: { disable: true } %>
|
19
|
-
</div>
|
7
|
+
<div class="mb-24">
|
8
|
+
<%= decidim_form_for(@form) do |form| %>
|
9
|
+
<%= render partial: "form", locals: { form: } %>
|
10
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
11
|
+
<%= link_to :back, class: "button button__sm md:button__lg button__text-secondary" do %>
|
12
|
+
<%= icon "arrow-left-line", class: "fill-current" %>
|
13
|
+
<%= t("back", scope: "decidim.debates.debates.edit") %>
|
20
14
|
<% end %>
|
15
|
+
<%= form.submit t("save", scope: "decidim.debates.debates.edit"), class: "button button__sm md:button__lg button__secondary", data: { disable: true } %>
|
16
|
+
</div>
|
21
17
|
</div>
|
22
|
-
|
18
|
+
<% end %>
|
23
19
|
</div>
|
24
|
-
|
20
|
+
<% end %>
|
@@ -1,26 +1,22 @@
|
|
1
|
-
|
1
|
+
<% content_for :aside do %>
|
2
|
+
<h1 class="title-decorator"><%= component_name %></h1>
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<%=
|
7
|
-
</h2>
|
8
|
-
<% if current_settings.creation_enabled? && current_component.participatory_space.can_participate?(current_user) %>
|
9
|
-
<%= action_authorized_link_to :create, new_debate_path, class: "title-action__action button small", data: { "redirect_url" => new_debate_path } do %>
|
10
|
-
<%= t(".new_debate") %>
|
11
|
-
<%= icon "plus", role: "img", "aria-hidden": true %>
|
12
|
-
<% end %>
|
4
|
+
<% if current_settings.creation_enabled? && current_component.participatory_space.can_participate?(current_user) %>
|
5
|
+
<%= action_authorized_link_to :create, new_debate_path, class: "button button__xl button__secondary w-full", data: { "redirect_url" => new_debate_path } do %>
|
6
|
+
<span><%= t(".new_debate") %></span>
|
7
|
+
<%= icon "add-fill" %>
|
13
8
|
<% end %>
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render layout: "decidim/shared/filters", locals: { filter_sections:, search_variable:, skip_to_id: "debates" } do %>
|
12
|
+
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
|
17
|
+
<%= render partial: "decidim/shared/component_announcement" %>
|
18
|
+
|
19
|
+
<section id="debates" class="layout-main__section layout-main__heading">
|
24
20
|
<%= render partial: "debates" %>
|
25
|
-
</
|
26
|
-
|
21
|
+
</section>
|
22
|
+
<% end %>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
var $debates = $('#debates');
|
2
|
-
var $debatesCount = $('#debates-count');
|
3
2
|
var $orderFilterInput = $('.order_filter');
|
4
3
|
|
5
4
|
$debates.html('<%= j(render partial: "debates").strip.html_safe %>');
|
6
|
-
$
|
5
|
+
$orderFilterInput.val('<%= order %>');
|
7
6
|
|
8
|
-
|
9
|
-
|
7
|
+
$debates[0].innerHTML = $debates[0].innerHTML.replace('data-open="false"', 'data-open="true"');
|
8
|
+
document.dispatchEvent(new CustomEvent("ajax:loaded", { detail: $debates[0] }));
|
@@ -1,24 +1,20 @@
|
|
1
|
-
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
<%=
|
5
|
-
|
6
|
-
<% end %>
|
1
|
+
<%= render layout: "layouts/decidim/shared/layout_center" do %>
|
2
|
+
<div class="text-center py-10">
|
3
|
+
<h1 class="title-decorator inline-block text-left">
|
4
|
+
<%= t("title", scope: "decidim.debates.debates.new") %>
|
5
|
+
</h1>
|
7
6
|
</div>
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
<div class="row">
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<%= decidim_form_for(@form) do |form| %>
|
16
|
-
<%= render partial: "form", locals: { form: form } %>
|
17
|
-
<div class="actions">
|
18
|
-
<%= form.submit t(".create"), class: "button expanded", data: { disable: true } %>
|
19
|
-
</div>
|
7
|
+
<div class="mb-24">
|
8
|
+
<%= decidim_form_for(@form) do |form| %>
|
9
|
+
<%= render partial: "form", locals: { form: } %>
|
10
|
+
<div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
|
11
|
+
<%= link_to :back, class: "button button__sm md:button__lg button__text-secondary" do %>
|
12
|
+
<%= icon "arrow-left-line", class: "fill-current" %>
|
13
|
+
<%= t("back", scope: "decidim.debates.debates.new") %>
|
20
14
|
<% end %>
|
15
|
+
<%= form.submit t("create", scope: "decidim.debates.debates.new"), class: "button button__sm md:button__lg button__secondary", data: { disable: true } %>
|
16
|
+
</div>
|
21
17
|
</div>
|
22
|
-
|
18
|
+
<% end %>
|
23
19
|
</div>
|
24
|
-
|
20
|
+
<% end %>
|