<% add_decidim_page_title(Decidim::Proposals::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", scope:"decidim.proposals.collaborative_drafts.show").html_safe %>
<% end %>
<%= link_to collaborative_drafts_path do %> <%= icon "chevron-left", class: "icon--small", role: "img", "aria-hidden": true %> <%= t("back", scope:"decidim.proposals.collaborative_drafts.show") %> <% 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/proposals/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %> <%= render_proposal_body(@collaborative_draft) %> <% if component_settings.geocoding_enabled? %> <%= render partial: "decidim/shared/static_map", locals: { icon_name: "proposals", 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/proposals/irreversible_action_modal", @collaborative_draft, action: :publish %>
<%= t("publish_info", scope:"decidim.proposals.collaborative_drafts.show") %> <%= cell "decidim/proposals/irreversible_action_modal", @collaborative_draft, action: :withdraw %>
<% end %>
<% if @collaborative_draft.published? %> <%= cell "decidim/proposals/collaborative_draft_link_to_proposal", @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.proposals.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.proposals.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.proposals.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.proposals.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) %>