<% add_decidim_page_title(Decidim::EnhancedTextwork::CollaborativeDraft.model_name.human(count: 2)) %> <% add_decidim_meta_tags({ description: present(@collaborative_draft).body, title: present(@collaborative_draft).title, url: collaborative_draft_url(@collaborative_draft.id) }) %> <% if current_user.nil? || allowed_to?(:request_access, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
<%= t(".info-message").html_safe %>
<% end %>
<%= link_to collaborative_drafts_path do %> <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %> <%= t(".back") %> <% end %>

<%= present(@collaborative_draft).title(links: true, html_escape: true) %>

<%= cell("decidim/coauthorships", @collaborative_draft, has_actions: true, size: 3, context: { current_user: current_user }) %>
<%== cell("decidim/enhanced_textwork/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %> <%= simple_format(present(@collaborative_draft).body(links: true, strip_tags: true), nil, sanitize: false) %> <% if component_settings.geocoding_enabled? %> <%= render partial: "decidim/shared/static_map", locals: { icon_name: "paragraphs", geolocalizable: @collaborative_draft } %> <% end %> <%= cell "decidim/tags", @collaborative_draft, context: { extra_classes: ["tags--collaborative-draft"] } %>
<% if allowed_to?(:publish, :collaborative_draft, collaborative_draft: @collaborative_draft) %>
<%= cell "decidim/enhanced_textwork/irreversible_action_modal", @collaborative_draft, action: :publish %>
<%= t("publish_info", scope:"decidim.enhanced_textwork.collaborative_drafts.show") %> <%= cell "decidim/enhanced_textwork/irreversible_action_modal", @collaborative_draft, action: :withdraw %>
<% end %>
<% if @collaborative_draft.published? %> <%= cell "decidim/enhanced_textwork/collaborative_draft_link_to_paragraph", @collaborative_draft %> <% else %>
<%= resource_version_number(@collaborative_draft.versions_count, "text-large") %>
<%= resource_version_of(@collaborative_draft.versions_count) %>
<%= link_to_other_resource_versions(collaborative_draft_versions_path(@collaborative_draft)) %>
<% end %> <% if allowed_to?(:edit, :collaborative_draft, collaborative_draft: @collaborative_draft) %> <%= link_to t("edit", scope:"decidim.enhanced_textwork.collaborative_drafts.show"), edit_collaborative_draft_path(@collaborative_draft), class: "button hollow expanded button--sc mt-s", id: "collaborative_draft_edit" %> <% end %> <%= render "request_access_form" %> <% if @collaborative_draft.requesters.include? current_user %> <% end %>
  • <%= with_tooltip t("decidim.enhanced_textwork.models.collaborative_draft.fields.authors") do %> <%= icon("people", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.group_by(&:whodunnit).size}" %> <% end %>
  • <%= link_to collaborative_draft_versions_path(@collaborative_draft) do %> <%= with_tooltip t("decidim.enhanced_textwork.models.collaborative_draft.fields.contributions") do %> <%= icon("pencil", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.versions.count}" %> <% end %> <% end %>
  • <%= link_to "#comments" do %> <%= with_tooltip t("decidim.enhanced_textwork.models.collaborative_draft.fields.comments") do %> <%= icon("comment-square", class: "icon--small", role: "img", "aria-hidden": true) + " " + "#{@collaborative_draft.comments_count}" %> <% end %> <% end %>
<%= render partial: "collaborator_requests" %> <%= resource_reference(@collaborative_draft) %> <%= render partial: "decidim/shared/share_modal" %>
<%= attachments_for @collaborative_draft %> <%= comments_for @collaborative_draft %> <%= cell("decidim/flag_modal", @collaborative_draft) %>