<% add_decidim_meta_tags({ description: decidim_sanitize_editor(translated_attribute(sortition.additional_info)), title: decidim_html_escape(translated_attribute(sortition.title)), url: sortition_url(sortition.to_param) }) %> <% edit_link( resource_locator(sortition).edit, :update, :sortition, sortition: ) %> <%= append_javascript_pack_tag "decidim_sortitions" %> <%= append_stylesheet_pack_tag "decidim_sortitions" %> <%= render layout: "layouts/decidim/shared/layout_item", locals: { back_path: :sortitions, commentable: sortition } do %> <%= cell("decidim/announcement", t("introduction", scope: "decidim.sortitions.sortitions.show", reference: sortition.id, target_items: sortition.target_items), callout_class: "secondary") %>

<%= decidim_html_escape(translated_attribute(sortition.title)) %>

<%= cell "decidim/author", present(sortition.author), context_actions: [:date], from: sortition, layout: :compact %> <% if sortition.author&.deleted? %> <%= t("deleted", scope: "decidim.sortitions.sortitions.sortition_author") %> <% end %>
<%= decidim_sanitize_editor_admin translated_attribute sortition.additional_info %>

<%= t("witnesses", scope: "decidim.sortitions.sortitions.show") %>

<%= decidim_sanitize_editor translated_attribute sortition.witnesses %>
<% if sortition&.proposals %>

<%= t("proposals_selected_by_sortition", scope: "decidim.sortitions.sortitions.show") %>

<%= render partial: "proposal", collection: sortition.proposals %>
<% end %> <% if sortition.cancelled? %>

<%= t("cancelled", scope: "decidim.sortitions.sortitions.show") %>

<%= cell "decidim/author", present(sortition.cancelled_by_user), context_actions: [:cancelled_on], from: sortition, layout: :compact %> <% if sortition.cancelled_by_user&.deleted? %> <%= t("deleted", scope: "decidim.sortitions.sortitions.sortition_author") %> <% end %>
<%= cell("decidim/announcement", decidim_sanitize_editor(translated_attribute(sortition.cancel_reason)), callout_class: "alert") %>
<% end %>
<%= cell "decidim/comments_button", nil %>
<% content_for :aside do %>
<%= render partial: "results_count", locals: { sortition: } %>
<%= t("sortition_reproducibility_details", scope: "decidim.sortitions.sortitions.show") %>
<%= t("dice_result", scope: "decidim.sortitions.sortitions.show") %> <%= sortition.dice %>ยบ
<%= t("time_seed", scope: "decidim.sortitions.sortitions.show") %> <%= sortition.request_timestamp.to_i %>
<%= t("mathematical_result", scope: "decidim.sortitions.sortitions.show") %> <%= sortition.seed %>
<%= link_to t("algorithm", scope: "decidim.sortitions.sortitions.show"), Decidim::Sortitions.sortition_algorithm, class: "text-secondary sortition__aside-element-item__title underline" %>
<%= t("candidate_proposal_ids", scope: "decidim.sortitions.sortitions.show") %>
<%= t("candidate_proposals_info", scope: "decidim.sortitions.sortitions.show", category_label: sortition_category_label(sortition)) %> <%= sortition_proposal_candidate_ids sortition %>
<%= cell "decidim/share_button", nil %>
<% end %> <% content_for :item_footer do %> <%= comments_for sortition %> <% end %> <% end %>