decidim-sortitions 0.27.10 → 0.28.0.rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/cells/decidim/sortitions/sortition_cell.rb +1 -1
- data/app/cells/decidim/sortitions/sortition_l_cell.rb +26 -0
- data/app/cells/decidim/sortitions/sortition_metadata_cell.rb +66 -0
- data/app/commands/decidim/sortitions/admin/create_sortition.rb +2 -2
- data/app/commands/decidim/sortitions/admin/destroy_sortition.rb +1 -1
- data/app/commands/decidim/sortitions/admin/update_sortition.rb +1 -1
- data/app/controllers/decidim/sortitions/admin/sortitions_controller.rb +11 -11
- data/app/controllers/decidim/sortitions/sortitions_controller.rb +0 -1
- data/app/helpers/decidim/sortitions/admin/sortitions_helper.rb +1 -0
- data/app/helpers/decidim/sortitions/sortitions_helper.rb +25 -1
- data/app/models/decidim/sortitions/sortition.rb +3 -3
- data/app/packs/entrypoints/decidim_sortitions.js +3 -0
- data/app/packs/stylesheets/sortitions.scss +31 -0
- data/app/permissions/decidim/sortitions/permissions.rb +0 -14
- data/app/presenters/decidim/sortitions/admin_log/sortition_presenter.rb +2 -2
- data/app/queries/decidim/sortitions/admin/participatory_space_proposal_components.rb +1 -1
- data/app/views/decidim/sortitions/admin/sortitions/_form.html.erb +29 -31
- data/app/views/decidim/sortitions/admin/sortitions/confirm_destroy.html.erb +24 -15
- data/app/views/decidim/sortitions/admin/sortitions/edit.html.erb +26 -22
- data/app/views/decidim/sortitions/admin/sortitions/index.html.erb +47 -54
- data/app/views/decidim/sortitions/admin/sortitions/new.html.erb +16 -10
- data/app/views/decidim/sortitions/admin/sortitions/show.html.erb +42 -46
- data/app/views/decidim/sortitions/sortitions/_proposal.html.erb +1 -1
- data/app/views/decidim/sortitions/sortitions/_results_count.html.erb +3 -3
- data/app/views/decidim/sortitions/sortitions/_sortitions.html.erb +10 -11
- data/app/views/decidim/sortitions/sortitions/_tags.html.erb +0 -1
- data/app/views/decidim/sortitions/sortitions/index.html.erb +14 -17
- data/app/views/decidim/sortitions/sortitions/index.js.erb +0 -5
- data/app/views/decidim/sortitions/sortitions/show.html.erb +123 -118
- data/config/locales/ar.yml +2 -24
- data/config/locales/bg.yml +1 -144
- data/config/locales/ca.yml +10 -21
- data/config/locales/cs.yml +7 -22
- data/config/locales/de.yml +10 -21
- data/config/locales/el.yml +6 -19
- data/config/locales/en.yml +14 -25
- data/config/locales/es-MX.yml +9 -20
- data/config/locales/es-PY.yml +9 -20
- data/config/locales/es.yml +9 -20
- data/config/locales/eu.yml +25 -32
- data/config/locales/fi-plain.yml +7 -20
- data/config/locales/fi.yml +27 -40
- data/config/locales/fr-CA.yml +7 -20
- data/config/locales/fr.yml +10 -21
- data/config/locales/ga-IE.yml +0 -6
- data/config/locales/gl.yml +2 -22
- data/config/locales/hu.yml +2 -22
- data/config/locales/id-ID.yml +2 -19
- data/config/locales/is-IS.yml +2 -16
- data/config/locales/it.yml +2 -21
- data/config/locales/ja.yml +7 -19
- data/config/locales/lt.yml +6 -22
- data/config/locales/lv.yml +2 -22
- data/config/locales/nl.yml +2 -21
- data/config/locales/no.yml +2 -21
- data/config/locales/pl.yml +2 -28
- data/config/locales/pt-BR.yml +3 -25
- data/config/locales/pt.yml +2 -21
- data/config/locales/ro-RO.yml +5 -21
- data/config/locales/ru.yml +2 -22
- data/config/locales/sk.yml +2 -23
- data/config/locales/sr-CS.yml +0 -6
- data/config/locales/sv.yml +7 -26
- data/config/locales/tr-TR.yml +3 -21
- data/config/locales/uk.yml +2 -22
- data/config/locales/zh-CN.yml +2 -20
- data/config/locales/zh-TW.yml +5 -18
- data/lib/decidim/sortitions/component.rb +5 -7
- data/lib/decidim/sortitions/engine.rb +8 -3
- data/lib/decidim/sortitions/seeds.rb +24 -0
- data/lib/decidim/sortitions/test/factories.rb +11 -16
- data/lib/decidim/sortitions/version.rb +1 -1
- metadata +28 -31
- data/app/cells/decidim/sortitions/sortition_m/data.erb +0 -15
- data/app/cells/decidim/sortitions/sortition_m/footer.erb +0 -13
- data/app/cells/decidim/sortitions/sortition_m_cell.rb +0 -55
- data/app/controllers/decidim/sortitions/widgets_controller.rb +0 -30
- data/app/packs/stylesheets/decidim/sortitions/_sortitions.scss +0 -49
- data/app/views/decidim/sortitions/sortition_widgets/show.html.erb +0 -4
- data/app/views/decidim/sortitions/sortitions/_filters.html.erb +0 -39
- data/app/views/decidim/sortitions/sortitions/_filters_small_view.html.erb +0 -18
- data/app/views/decidim/sortitions/sortitions/_sortitions_count.html.erb +0 -1
- data/config/locales/he-IL.yml +0 -1
- data/decidim-sortitions.gemspec +0 -32
- data/lib/tasks/decidim/.keep +0 -0
@@ -1,64 +1,57 @@
|
|
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
|
-
|
10
|
-
</div>
|
6
|
+
<% if allowed_to? :create, :sortition %>
|
7
|
+
<%= link_to t("actions.new_sortition", scope: "decidim.sortitions.admin"), new_sortition_path, class: "button button__sm button__secondary" %>
|
8
|
+
<% end %>
|
9
|
+
<%= render partial: "decidim/admin/components/resource_action" %>
|
11
10
|
</h2>
|
12
11
|
</div>
|
12
|
+
<div class="table-scroll">
|
13
|
+
<table class="table-list">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th><%= t("models.sortition.fields.reference", scope: "decidim.sortitions.admin") %></th>
|
17
|
+
<th><%= t("models.sortition.fields.title", scope: "decidim.sortitions.admin") %></th>
|
18
|
+
<th><%= t("models.sortition.fields.created_at", scope: "decidim.sortitions.admin") %></th>
|
19
|
+
<th class="actions"></th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<% sortitions.each do |sortition| %>
|
24
|
+
<tr>
|
25
|
+
<td><%= sortition.reference %></td>
|
26
|
+
<td>
|
27
|
+
<% if allowed_to? :update, :sortition, sortition: sortition %>
|
28
|
+
<%= link_to decidim_html_escape(translated_attribute(sortition.title)), edit_sortition_path(sortition) %>
|
29
|
+
<% else %>
|
30
|
+
<%= decidim_html_escape(translated_attribute(sortition.title)) %>
|
31
|
+
<% end %>
|
32
|
+
</td>
|
33
|
+
<td><%= l sortition.created_at, format: :short %></td>
|
34
|
+
<td class="table-list__actions">
|
35
|
+
<% if allowed_to? :update, :sortition, sortition: sortition %>
|
36
|
+
<%= icon_link_to "pencil-line", edit_sortition_path(sortition), t("actions.edit", scope: "decidim.sortitions.admin"), class: "action-icon--edit" %>
|
37
|
+
<% else %>
|
38
|
+
<span class="action-space icon"></span>
|
39
|
+
<% end %>
|
13
40
|
|
14
|
-
|
15
|
-
<div class="table-scroll">
|
16
|
-
<table class="table-list">
|
17
|
-
<thead>
|
18
|
-
<tr>
|
19
|
-
<th><%= t("models.sortition.fields.reference", scope: "decidim.sortitions.admin") %></th>
|
20
|
-
<th><%= t("models.sortition.fields.title", scope: "decidim.sortitions.admin") %></th>
|
21
|
-
<th><%= t("models.sortition.fields.created_at", scope: "decidim.sortitions.admin") %></th>
|
22
|
-
<th class="actions"></th>
|
23
|
-
</tr>
|
24
|
-
</thead>
|
25
|
-
<tbody>
|
26
|
-
<% sortitions.each do |sortition| %>
|
27
|
-
<tr>
|
28
|
-
<td><%= sortition.reference %></td>
|
29
|
-
<td><%= decidim_html_escape(translated_attribute(sortition.title)) %></td>
|
30
|
-
<td><%= l sortition.created_at, format: :short %></td>
|
31
|
-
<td class="table-list__actions">
|
32
|
-
<%= icon_link_to "eye",
|
33
|
-
sortition_path(sortition),
|
34
|
-
t("actions.show", scope: "decidim.sortitions.admin"),
|
35
|
-
class: "action-icon--preview" %>
|
36
|
-
|
37
|
-
<% if allowed_to? :update, :sortition, sortition: sortition %>
|
38
|
-
<%= icon_link_to "pencil",
|
39
|
-
edit_sortition_path(sortition),
|
40
|
-
t("actions.edit", scope: "decidim.sortitions.admin"),
|
41
|
-
class: "action-icon--edit" %>
|
42
|
-
<% else %>
|
43
|
-
<span class="action-space icon"></span>
|
44
|
-
<% end %>
|
41
|
+
<%= icon_link_to "eye-line", sortition_path(sortition), t("actions.show", scope: "decidim.sortitions.admin"), class: "action-icon--preview", target: "_blank", data: { "external-link": false } %>
|
45
42
|
|
46
|
-
|
43
|
+
<%= resource_permissions_link(sortition) %>
|
47
44
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<% end %>
|
59
|
-
</tbody>
|
60
|
-
</table>
|
61
|
-
<%= paginate sortitions, theme: "decidim" %>
|
62
|
-
</div>
|
45
|
+
<% if allowed_to? :destroy, :sortition, sortition: sortition %>
|
46
|
+
<%= icon_link_to "delete-bin-line", confirm_destroy_sortition_path(sortition), t("actions.destroy", scope: "decidim.sortitions.admin"), class: "action-icon--remove" %>
|
47
|
+
<% else %>
|
48
|
+
<span class="action-space icon"></span>
|
49
|
+
<% end %>
|
50
|
+
</td>
|
51
|
+
</tr>
|
52
|
+
<% end %>
|
53
|
+
</tbody>
|
54
|
+
</table>
|
63
55
|
</div>
|
64
56
|
</div>
|
57
|
+
<%= decidim_paginate sortitions %>
|
@@ -1,12 +1,18 @@
|
|
1
1
|
<% add_decidim_page_title(t(".title")) %>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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_sortition" }) 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"), data: { confirm: t(".confirm") }, class: "button button__sm button__secondary" %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
11
17
|
</div>
|
12
|
-
|
18
|
+
</div>
|
@@ -1,56 +1,52 @@
|
|
1
1
|
<% add_decidim_page_title(translated_attribute(sortition.title)) %>
|
2
2
|
<div class="card" id="sortition">
|
3
|
-
<div class="
|
4
|
-
<h2 class="
|
3
|
+
<div class="item_show__header">
|
4
|
+
<h2 class="item_show__header-title">
|
5
5
|
<%= decidim_html_escape(translated_attribute(sortition.title)) %>
|
6
6
|
</h2>
|
7
7
|
</div>
|
8
|
-
<div class="
|
9
|
-
<
|
10
|
-
<
|
11
|
-
<
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
<
|
23
|
-
<
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
</table>
|
34
|
-
</div>
|
8
|
+
<div class="table-scroll">
|
9
|
+
<table class="table-list sortition">
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th><%= t("models.sortition.fields.request_timestamp", scope: "decidim.sortitions.admin") %></th>
|
13
|
+
<th><%= t("models.sortition.fields.dice", scope: "decidim.sortitions.admin") %></th>
|
14
|
+
<th><%= t("models.sortition.fields.target_items", scope: "decidim.sortitions.admin") %></th>
|
15
|
+
<th><%= t("models.sortition.fields.category", scope: "decidim.sortitions.admin") %></th>
|
16
|
+
<th><%= t("models.sortition.fields.decidim_proposals_component", scope: "decidim.sortitions.admin") %></th>
|
17
|
+
<th><%= t("models.sortition.fields.seed", scope: "decidim.sortitions.admin") %></th>
|
18
|
+
<th></th>
|
19
|
+
</tr>
|
20
|
+
</thead>
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<td><%= l sortition.request_timestamp, format: :long %></td>
|
24
|
+
<td><%= sortition.dice %></td>
|
25
|
+
<td><%= sortition.target_items %></td>
|
26
|
+
<td><%= sortition_category sortition %></td>
|
27
|
+
<td><%= translated_attribute sortition.decidim_proposals_component.name %></td>
|
28
|
+
<td><%= sortition.seed %></td>
|
29
|
+
<td></td>
|
30
|
+
</tr>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
35
33
|
</div>
|
36
|
-
<div class="
|
37
|
-
<
|
38
|
-
<
|
39
|
-
<
|
34
|
+
<div class="table-scroll">
|
35
|
+
<table class="table-list proposals">
|
36
|
+
<thead>
|
37
|
+
<tr>
|
38
|
+
<th><%= t ".selected_proposals" %></th>
|
39
|
+
<th></th>
|
40
|
+
</tr>
|
41
|
+
</thead>
|
42
|
+
<tbody>
|
43
|
+
<% sortition.proposals.each do |proposal| %>
|
40
44
|
<tr>
|
41
|
-
<
|
42
|
-
<
|
45
|
+
<td><%= decidim_html_escape(present(proposal).title).html_safe %></td>
|
46
|
+
<td></td>
|
43
47
|
</tr>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<tr>
|
48
|
-
<td><%= decidim_html_escape(present(proposal).title).html_safe %></td>
|
49
|
-
<td></td>
|
50
|
-
</tr>
|
51
|
-
<% end %>
|
52
|
-
</tbody>
|
53
|
-
</table>
|
54
|
-
</div>
|
48
|
+
<% end %>
|
49
|
+
</tbody>
|
50
|
+
</table>
|
55
51
|
</div>
|
56
52
|
</div>
|
@@ -1 +1 @@
|
|
1
|
-
<%= card_for proposal %>
|
1
|
+
<%= card_for proposal, url_extra_params: { included_in: sortition.to_gid } %>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<div id="sortition-<%= sortition.id %>-results-count"
|
2
|
-
<span class="
|
1
|
+
<div id="sortition-<%= sortition.id %>-results-count">
|
2
|
+
<span class="sortition__aside__count-number">
|
3
3
|
<%= sortition.selected_proposals.count %>
|
4
4
|
</span>
|
5
|
-
<span class="
|
5
|
+
<span class="sortition__aside__count-text">
|
6
6
|
<%= t(".count", count: sortition.selected_proposals.count) %>
|
7
7
|
</span>
|
8
8
|
</div>
|
@@ -1,14 +1,13 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
1
|
+
<% if @sortitions.any? %>
|
2
|
+
<h2 class="h5 md:h3 decorator"><%= t("count", scope: "decidim.sortitions.sortitions.sortitions_count", count: @sortitions.total_count) %></h2>
|
3
|
+
|
4
|
+
<%= order_selector available_orders, i18n_scope: "decidim.sortitions.sortitions.orders" %>
|
5
5
|
|
6
|
-
<div class="
|
7
|
-
<%= render
|
6
|
+
<div class="card__list-list">
|
7
|
+
<%= render @sortitions %>
|
8
8
|
</div>
|
9
|
-
</div>
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
<%= decidim_paginate @sortitions %>
|
11
|
+
<% else %>
|
12
|
+
<%= cell "decidim/announcement", t("empty", scope: "decidim.sortitions.sortitions.index") %>
|
13
|
+
<% end %>
|
@@ -1,18 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div id="sortitions" class="columns mediumlarge-8 large-9" aria-live="polite">
|
1
|
+
<% add_decidim_page_title component_name %>
|
2
|
+
|
3
|
+
<% content_for :aside do %>
|
4
|
+
<h1 class="title-decorator"><%= component_name %></h1>
|
5
|
+
|
6
|
+
<%= render layout: "decidim/shared/filters", locals: { filter_sections: filter_sections_sortitions, search_variable: :search_text_cont, skip_to_id: "sortitions" } do %>
|
7
|
+
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render layout: "layouts/decidim/shared/layout_two_col" do %>
|
12
|
+
<section id="sortitions" class="layout-main__section layout-main__heading">
|
16
13
|
<%= render partial: "sortitions" %>
|
17
|
-
</
|
18
|
-
|
14
|
+
</section>
|
15
|
+
<% end %>
|
@@ -1,10 +1,5 @@
|
|
1
1
|
var $sortitions = $('#sortitions');
|
2
|
-
var $sortitionsCount = $('#sortitions-count');
|
3
2
|
var $orderFilterInput = $('.order_filter');
|
4
3
|
|
5
4
|
$sortitions.html('<%= j(render partial: "sortitions").strip.html_safe %>');
|
6
|
-
$sortitionsCount.html('<%= j(render partial: "sortitions_count").strip.html_safe %>');
|
7
5
|
$orderFilterInput.val('<%= order %>');
|
8
|
-
|
9
|
-
var $dropdownMenu = $('.dropdown.menu', $sortitions);
|
10
|
-
$dropdownMenu.foundation();
|
@@ -1,139 +1,144 @@
|
|
1
1
|
<% add_decidim_meta_tags({
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
}) %>
|
2
|
+
description: decidim_sanitize_editor(translated_attribute(sortition.additional_info)),
|
3
|
+
title: decidim_html_escape(translated_attribute(sortition.title)),
|
4
|
+
url: sortition_url(sortition.to_param)
|
5
|
+
}) %>
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
<%
|
8
|
+
edit_link(
|
9
|
+
resource_locator(sortition).edit,
|
10
|
+
:update,
|
11
|
+
:sortition,
|
12
|
+
sortition:
|
13
|
+
)
|
14
|
+
%>
|
12
15
|
|
13
|
-
|
16
|
+
<%= append_javascript_pack_tag "decidim_sortitions" %>
|
17
|
+
<%= append_stylesheet_pack_tag "decidim_sortitions" %>
|
14
18
|
|
15
|
-
|
16
|
-
|
17
|
-
<%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %>
|
18
|
-
<%= t(".back") %>
|
19
|
-
<% end %>
|
20
|
-
</div>
|
19
|
+
<%= render layout: "layouts/decidim/shared/layout_item", locals: { back_path: :sortitions, commentable: sortition } do %>
|
20
|
+
<%= cell("decidim/announcement", t("introduction", scope: "decidim.sortitions.sortitions.show", reference: sortition.id, target_items: sortition.target_items), callout_class: "secondary") %>
|
21
21
|
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
</div>
|
22
|
+
<section class="layout-main__section layout-main__heading">
|
23
|
+
<h1 class="h1 decorator mb-4">
|
24
|
+
<%= decidim_html_escape(translated_attribute(sortition.title)) %>
|
25
|
+
</h1>
|
26
|
+
<div class="layout-author">
|
27
|
+
<%= cell "decidim/author", present(sortition.author), context_actions: [:date], from: sortition, layout: :compact %>
|
28
|
+
<% if sortition.author&.deleted? %>
|
29
|
+
<span class="label alert">
|
30
|
+
<%= t("deleted", scope: "decidim.sortitions.sortitions.sortition_author") %>
|
31
|
+
</span>
|
32
|
+
<% end %>
|
34
33
|
</div>
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
</div>
|
39
|
-
|
40
|
-
<div class="columns mediumlarge-8 mediumlarge-pull-4">
|
41
|
-
<div class="section">
|
34
|
+
</section>
|
35
|
+
<section class="layout-main__section">
|
36
|
+
<div class="editor-content">
|
42
37
|
<%= decidim_sanitize_editor_admin translated_attribute sortition.additional_info %>
|
43
38
|
</div>
|
44
|
-
</
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
</div>
|
52
|
-
<div class=section>
|
53
|
-
<div class="author-data">
|
54
|
-
<%= render partial: "sortition_cancel_author", locals: { sortition: sortition } %>
|
39
|
+
</section>
|
40
|
+
<section class="layout-main__section">
|
41
|
+
<h2 class="h3">
|
42
|
+
<%= t("witnesses", scope: "decidim.sortitions.sortitions.show") %>
|
43
|
+
</h2>
|
44
|
+
<div class="editor-content">
|
45
|
+
<%= decidim_sanitize_editor translated_attribute sortition.witnesses %>
|
55
46
|
</div>
|
56
|
-
</
|
57
|
-
<div class=section>
|
58
|
-
<%= decidim_sanitize_editor translated_attribute sortition.cancel_reason %>
|
59
|
-
</div>
|
60
|
-
</div>
|
61
|
-
<% end %>
|
47
|
+
</section>
|
62
48
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</div>
|
49
|
+
<% if sortition&.proposals %>
|
50
|
+
<section class="layout-main__section">
|
51
|
+
<h2 id="proposals-count" class="h3 mb-4">
|
52
|
+
<%= t("proposals_selected_by_sortition", scope: "decidim.sortitions.sortitions.show") %>
|
53
|
+
</h2>
|
54
|
+
<div id="proposals">
|
55
|
+
<%= render partial: "proposal", collection: sortition.proposals %>
|
56
|
+
</div>
|
57
|
+
</section>
|
58
|
+
<% end %>
|
71
59
|
|
72
|
-
<% if sortition
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<%= t ".proposals_selected_by_sortition" %>
|
60
|
+
<% if sortition.cancelled? %>
|
61
|
+
<section class="layout-main__section">
|
62
|
+
<h2 class="h3 mt-8 mb-4">
|
63
|
+
<%= t("cancelled", scope: "decidim.sortitions.sortitions.show") %>
|
77
64
|
</h2>
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
65
|
+
<div class="layout-author">
|
66
|
+
<%= cell "decidim/author", present(sortition.cancelled_by_user), context_actions: [:cancelled_on], from: sortition, layout: :compact %>
|
67
|
+
<% if sortition.cancelled_by_user&.deleted? %>
|
68
|
+
<span class="label alert">
|
69
|
+
<%= t("deleted", scope: "decidim.sortitions.sortitions.sortition_author") %>
|
70
|
+
</span>
|
71
|
+
<% end %>
|
84
72
|
</div>
|
85
|
-
|
86
|
-
|
87
|
-
<% end %>
|
73
|
+
<%= cell("decidim/announcement", decidim_sanitize_editor(translated_attribute(sortition.cancel_reason)), callout_class: "alert") %>
|
74
|
+
</section>
|
75
|
+
<% end %>
|
88
76
|
|
89
|
-
<
|
90
|
-
|
91
|
-
|
92
|
-
<h4 class="section-heading"><%= t ".sortition_reproducibility_details" %></h4>
|
93
|
-
</div>
|
94
|
-
<div class=row>
|
95
|
-
<div class="columns small-centered mediumlarge-12 large-12 sortition-details">
|
96
|
-
<div class="sortition-details-item">
|
97
|
-
<span class="sortition-details-title sortition-details-text"><%= t ".dice_result" %></span>
|
98
|
-
<span class=sortition-details-text><%= sortition.dice %></span>
|
99
|
-
</div>
|
77
|
+
<section class="layout-main__section layout-main__buttons" data-buttons>
|
78
|
+
<%= cell "decidim/comments_button", nil %>
|
79
|
+
</section>
|
100
80
|
|
101
|
-
|
102
|
-
|
103
|
-
|
81
|
+
<% content_for :aside do %>
|
82
|
+
<section class="layout-aside__section">
|
83
|
+
<%= render partial: "results_count", locals: { sortition: } %>
|
84
|
+
</section>
|
85
|
+
<section class="layout-aside__section">
|
86
|
+
<div class="text-sm text-gray-2 uppercase font-semibold mb-4 ">
|
87
|
+
<%= t("sortition_reproducibility_details", scope: "decidim.sortitions.sortitions.show") %>
|
88
|
+
</div>
|
89
|
+
<div class="sortition__aside-element bg-background p-4 rounded">
|
90
|
+
<div class="sortition__aside-element-item">
|
91
|
+
<span class="sortition__aside-element-item__title">
|
92
|
+
<%= t("dice_result", scope: "decidim.sortitions.sortitions.show") %>
|
93
|
+
</span>
|
94
|
+
<span class="sortition__aside-element-item__text">
|
95
|
+
<%= sortition.dice %>º
|
96
|
+
</span>
|
104
97
|
</div>
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
98
|
+
<div class="sortition__aside-element-item">
|
99
|
+
<span class="sortition__aside-element-item__title">
|
100
|
+
<%= t("time_seed", scope: "decidim.sortitions.sortitions.show") %>
|
101
|
+
</span>
|
102
|
+
<span class="sortition__aside-element-item__text">
|
103
|
+
<%= sortition.request_timestamp.to_i %>
|
104
|
+
</span>
|
109
105
|
</div>
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
<span class=sortition-details-text>
|
114
|
-
<%= link_to Decidim::Sortitions.sortition_algorithm,
|
115
|
-
Decidim::Sortitions.sortition_algorithm,
|
116
|
-
target: "_blank",
|
117
|
-
title: t(".algorithm") %>
|
106
|
+
<div class="sortition__aside-element-item">
|
107
|
+
<span class="sortition__aside-element-item__title">
|
108
|
+
<%= t("mathematical_result", scope: "decidim.sortitions.sortitions.show") %>
|
118
109
|
</span>
|
110
|
+
<span class="sortition__aside-element-item__text">
|
111
|
+
<%= sortition.seed %>
|
112
|
+
</span>
|
113
|
+
</div>
|
114
|
+
<div class="sortition__aside-element-item">
|
115
|
+
<%= link_to t("algorithm", scope: "decidim.sortitions.sortitions.show"), Decidim::Sortitions.sortition_algorithm, class: "text-secondary sortition__aside-element-item__title underline" %>
|
119
116
|
</div>
|
120
117
|
</div>
|
121
|
-
</
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<div class="row column">
|
126
|
-
<h4 class="section-heading"><%= t ".candidate_proposal_ids" %></h4>
|
127
|
-
</div>
|
128
|
-
<div class="row columns">
|
129
|
-
<%= t ".candidate_proposals_info", category_label: sortition_category_label(sortition) %>:
|
130
|
-
</div>
|
131
|
-
<div class=row>
|
132
|
-
<div class="columns small-centered mediumlarge-12 large-12">
|
133
|
-
<%= sortition_proposal_candidate_ids sortition %>
|
118
|
+
</section>
|
119
|
+
<section class="layout-aside__section">
|
120
|
+
<div class="text-sm text-gray-2 uppercase font-semibold mb-4">
|
121
|
+
<%= t("candidate_proposal_ids", scope: "decidim.sortitions.sortitions.show") %>
|
134
122
|
</div>
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
123
|
+
<div class="sortition__aside-element bg-background p-4 rounded">
|
124
|
+
<div class="sortition__aside-element-item">
|
125
|
+
<span class="sortition__aside-element-item__title">
|
126
|
+
<%= t("candidate_proposals_info", scope: "decidim.sortitions.sortitions.show", category_label: sortition_category_label(sortition)) %>
|
127
|
+
</span>
|
128
|
+
<span class="sortition__aside-element-item__numbers">
|
129
|
+
<%= sortition_proposal_candidate_ids sortition %>
|
130
|
+
</span>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
</section>
|
134
|
+
<section class="layout-aside__section actions__secondary">
|
135
|
+
<%= cell "decidim/share_button", nil %>
|
136
|
+
</section>
|
137
|
+
<% end %>
|
138
|
+
<% content_for :item_footer do %>
|
139
|
+
<%= comments_for sortition %>
|
140
|
+
<ul class="metadata__container layout-main__section" data-metadata-footer>
|
141
|
+
<%= content_tag :li, resource_reference(sortition), class: "metadata__item" %>
|
142
|
+
</ul>
|
143
|
+
<% end %>
|
144
|
+
<% end %>
|