<% add_decidim_meta_tags({ description: @collaborative_draft.body, title: @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" %> <%= t(".back") %> <% end %>

<%= @collaborative_draft.title %>

<%= cell("decidim/coauthorships", @collaborative_draft, has_actions: true, size: 3) %>
<% 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 %>
<%= t("version", scope:"decidim.proposals.collaborative_drafts.show", number: "#{@collaborative_draft.versions_count}") %> <%= t("of_versions", scope:"decidim.proposals.collaborative_drafts.show", number: "#{@collaborative_draft.versions_count}") %>
<%= link_to t("see_other_versions", scope:"decidim.proposals.collaborative_drafts.show"), 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 secondary 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") + " " + "#{@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") + " " + "#{@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") + " " + "#{@collaborative_draft.comments.count}" %> <% end %> <% end %>
<%= render partial: "collaborator_requests" %> <%= resource_reference(@collaborative_draft) %> <%= render partial: "decidim/shared/share_modal" %>
<%== cell("decidim/proposals/collaborative_draft_m", @collaborative_draft, full_badge: true).badge %> <%= simple_format @collaborative_draft.body %> <% 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"] } %>
<%= attachments_for @collaborative_draft %> <%= comments_for @collaborative_draft %> <%= javascript_include_tag "decidim/proposals/social_share" %> <%= stylesheet_link_tag "decidim/proposals/social_share" %> <%= render partial: "decidim/shared/flag_modal", locals: { reportable: @collaborative_draft, form: @report_form, url: decidim.report_path(sgid: @collaborative_draft.to_sgid.to_s) } %>